Closed dihm closed 2 years ago
@chrisjbillington, you probably already realized this, but I've been looking in to this again and realizing the deeper issue, namely that the NI_DAQmx class does not support differential analog inputs. So even if this particular thing got fixed, the overall class needs to be updated to handle differential inputs. Apparently only supporting differential inputs is common to all NI DAQs that perform simultaneous sampling (instead of the typical multiplexing).
Seeing as we have two of these type of devices (also got a PXIe-6396), I'm somewhat motivated to get this working in the near-term. Is there anything in particular I can do to help? Should I just take a crack at it (if so, any particular pain point I should worry about)?
Also, it appears these devices also do not have a Sample Clock Delay property (found by skipping the AI check in get_capabilities.py
(labscript) PS C:\Users\naqsL\labscript\labscript-devices\labscript_devices\NI_DAQmx\models> python .\get_capabilities.py
found device: usb_6366 USB-6366 (64 MS) (BNC)
{'supports_buffered_AO': True, 'max_DO_sample_rate': 10000000.0, 'supports_buffered_DO': True, 'max_AO_sample_rate': 3333333.3333333335, 'num_AO': 2, 'num_AI': 8, 'max_AI_single_chan_rate': 2000000.0, 'max_AI_multi_chan_rate': 2000000.0, 'ports': {'port0': {'num_lines': 8, 'supports_buffered': True}, 'port1': {'num_lines': 8, 'supports_buffered': False}, 'port2': {'num_lines': 8, 'supports_buffered': False}}, 'num_CI': 4, 'supports_semiperiod_measurement': True, 'min_semiperiod_measurement': 1e-07, 'AO_range': [-10.0, 10.0]}
Traceback (most recent call last):
File ".\get_capabilities.py", line 399, in <module>
capabilities[model]["AI_start_delay"] = AI_start_delay(name)
File ".\get_capabilities.py", line 194, in AI_start_delay
task.GetDelayFromSampClkDelay(delay_from_sample_clock)
File "<string>", line 3, in GetDelayFromSampClkDelay
File "<string>", line 2, in function
File "C:\Users\naqsL\miniconda3\envs\labscript\lib\site-packages\PyDAQmx\DAQmxFunctions.py", line 62, in mafunction
raise exception_class(errBuff.value.decode("utf-8"), f.__name__)
PyDAQmx.DAQmxFunctions.AttributeNotSupportedInTaskContextError: Specified property is not supported by the device or is not applicable to the task.
Property: DAQmx_DelayFromSampClk_Delay
Trying to use the get_capabilities.py script to add a new NI USB-6366 we acquired and I get the following message:
Checking with NI-MAX and the spec sheet, this device only has differential inputs (logically) where each AI+ and AI- are the center pin and shield of the BNC inputs of the breakout box. Kind-of an annoying edge case I guess but there it is.