11-21-2013 09:42 AM
LV2013, EtherCAT chassis via PXI, IndCOMM 2.6, Win7.
I'm working on a general-purpose DAQ system, now using EtherCAT and 92xx modules.
I'm working from programmatic configuration (property nodes), not project-based settings.
There are 32 analog input channels on a 9205.
Each one has a TERMINAL MODE property setting of { RSE, NRSE, or DIFF}
Note that: EACH CHANNEL has a setting.
The manual <NI 9205 User Manual, Page 12> says that the 32 channels are used in pairs when set to DIFF mode.
0 is paired with 8, 1 is paired with 9, 2 paired with 10.... 7 paired with 15, 16 paired with 24, 17 paired with 25.... 23 paired with 31.
OK, that means that we have channels 0..7 and 16..23 available, if we're using all differential.
That's weird enough to have this gap in the channel numbers.
But even worse is the programming.
If I set chan 0 to be RSE, and chan 8 to be RSE, then I get two distinct channels, as expected. Here's the debugging log from configuring it that way:
And here's the data (nothing is connected to the input lines):
No surprises there.
Now, if I set Chan 0 to DIFF and chan 8 to DIFF, I would expect either an error, or duplicate data, because they're really only one channel now. But I get neither:
OK, now for the impossible situation - if I set chan 0 to RSE, then chan 8 ought to be separate. But if I set chan 8 to DIFF, then chan 0 ought to be paired with 8. THIS HAS TO BE AN ERROR. But I get no error, and the data is still separate:
I assure you I am checking for errors - here is the code that sets the properties:
If there was an error setting the properties, the RANGE SET TO x, TERM MODE SET TO DIFF would not appear in the log.
It does, therefore there is no error.
HOW CAN THAT BE?
It HAS to be an error to set ch0 to RSE and chan 8 to DIFF.
It PROBABLY SHOULD BE and error to set ch0 to DIFF, and ch8 to DIFF, although you might make a case that they are now one channel so you can read either to get the differential value, but that is NOT what happens.
It seems like an error to allow DIFF mode to be set on ch8-15 and 24-31.
Am I missing something?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
11-21-2013 02:31 PM
Steve,
and check me as I wander down dim reaches of memory.....
Ch8 = Diff is ignored. Reasoning: ch0 must be diff to set ch8 to ch0- If I recall correctly, there is no way to "Really" set ch8 to diff (since it is set as a ch0 property.) DAQmx just prevents the insanity by ignoring what would appear to the device as "Some id10T isn't reading the manual"
One COULD argue that "ch8=Diff" and "ch8 not consistant with ch0 mode" should throw warnings. You could argue that! But, you would likely lose the argument to the team that wrote it the way its written.
11-21-2013 02:52 PM
Ch8 = Diff is ignored. Reasoning: ch0 must be diff to set ch8 to ch0- If I recall correctly, there is no way to "Really" set ch8 to diff (since it is set as a ch0 property.)
All that makes sense from an electronics standpoint.
But if there's no way to do X, then attempting to do X ought to result in an error.
One COULD argue that "ch8=Diff" and "ch8 not consistant with ch0 mode" should throw warnings.
Yes, one could. I think I already did.
But, you would likely lose the argument to the team that wrote it the way its written.
I'm no stranger to losing arguments with NI. The behavior of these EtherCAT properties is weird. They manage to complain if I try to READ the RTD type of a 9219 channel that is in THERMOCOUPLE mode, but only if I actually WIRE the output of the property node I read it with. If they can do that level of nagging, why can't they complain about a true error such as this?
Blog for (mostly LabVIEW) programmers: Tips And Tricks