Closed halars closed 6 years ago
i think NI-DAQmx limits you to only one task of any type at a given time. try this:
t = analog_input("Dev1/ai0")
analog_input(t, "Dev2Mod1/ai0")
Unfortunately that does not help. Both your suggestion, and just creating one task (t = analog_input("Dev2Mod1/ai0")), fails, with the same error.
following the relevant code, i wonder what analog_input_ranges("Dev2Mod1")
returns.
following the relevant code, i wonder what analog_input_ranges("Dev2Mod1") returns.
1x2 Array{Float64,2}: -5.0 5.0
I tested with another module (here called Dev2Mod2", which have selectable gains. And the task can be created without any error.
julia> analog_input_ranges("Dev2Mod2")
4x2 Array{Float64,2}:
-0.2 0.2
-1.0 1.0
-5.0 5.0
-10.0 10.0
But yet another module which only have one range, also didn't fail. Dev2Mod1 = 9234 (does not work), single range Dev2Mod2 = 9205 (works), multiple ranges Dev2Mod3 = 9215 (works), single range
Could it be a issue with the selectable AC/DC coupling?
the terminal configuration defaults to differential. do these three devices all support that?
No, NI 9234 uses 'PseudoDifferential', but also have four measurement types: Voltage, Accelerometer, Microphone and IEPE (all are voltages though) And three coupling options: AC, DC and IEPE
I've tried "referenced single-ended", "non-referenced single-ended" and "differential" with no discernible difference in error output.
ahah, can you try modifying the code to include pseudo-diff?
Yes, now it works! Thanks :)
glad i could help. could you please submit a PR so we can share the solution with others?
Ok
I'm having trouble adding analogue channels of a NI module. I have one device (Dev1) and one chassis (Dev2) with a module (Dev2Mod1)., connected. Output from getproperties:
Here are the outputs from analog_input_channels for each element:
Trying to add channel 1 from Dev1 is successful:
But trying to add channel 1 for Dev2Mod1 is unsuccessful.
I suspect no device/driver issues as there is no issue when using Matlab and its DAQ interface.
How should one add such a channel?