Jump to content
  • 0

Analog output is -10 V after calling DaqDeviceInfo(board).daq_dev_info.get_ao_info().supported_ranges


martinssonh

Question

Hi,

I have an MCC USB-1608GX-2AO (FW 2.02, FPGA version 2.10) and I control it from Python (3.12.2) using MCC Universal Library on Windows 10.

When I query for the analog output ranges (only 1 is avaliable), the analog output is all of a sudden -10 V, even though it was 0 V earlier. The code below shows when the analog output changes from 0 V to -10 V. How can I prevent this?

Best,

Hans

...

from mcculw import ul

from mcculw.enums import InterfaceType

from mcculw.device_info import DaqDeviceInfo

 

board = 0

ul.ignore_instacal()

inventory = ul.get_daq_device_inventory(InterfaceType.ANY)

descriptor = inventory[0]

ul.create_daq_device(board, descriptor)

daq_dev_info = DaqDeviceInfo(board)

ao_info = daq_dev_info.get_ao_info()

resolution = ao_info.resolution

 

# After this line AO0 is -10 V!

ao_info.supported_ranges

 

# Set AO0 to 0 V

ul.a_out(board, 0, int(0), int(2**(resolution - 1) - 1))

 

# Release the DAQ

ul.release_daq_device(board)

...

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi Fausto,

Thanks a lot for your answer! I hope the update will come in not too long time. In the meantime, I'm explicitly settings all AO channels to 0 after the ao_info.supported_ranges comand, as indicated in the code snippet.

Best,

Hans

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...