01-31-2011 10:02 AM
I am trying to create a single task that includes 2 NI-9425 C series modules but when I wire the physical channel constant "Mod3/port0, Mod4/port0" into the DAQmx Create Virtual Channel.vi I receive error -200086 which states physical channel range syntax in the input string is invalid because multiple devices were listed in the string. It is my understanding from LabView help that multidevice tasks are allowed. Also according to this KB article http://digital.ni.com/public.nsf/allkb/CF85114C6025C84C862571C000722DDA multi-device tasks are supported for S Series devices, C Series, and DSA devices, and according to this KB article http://digital.ni.com/public.nsf/websearch/78E44565FD87E7D686257108007F94F8?OpenDocument I have formatted my physical channel constant correctly.
Can someone please explain why I am getting this error when all indications are that this should be a simple thing to do?
My C series modules are in slots 3 and 4 in a cDAQ-9188 chassis, I am currently running LabView 8.5.1, with Windows XP
Thank you,
Eric
Solved! Go to Solution.
01-31-2011 10:37 AM
Multiple cRIO Module Tasks are certainly allowed. We do it all the time at our lab.
This probably means that your problem is something in your MAX settings, so you are going to have to give us more detail about your task. What cRIO modules are you using? This may not be your problem but the cRIO modules that use the full-bridge configuration have an over-sampled clock that cannot be synchronized to a distributed clock, so your timing parameters may be the issue.
Either way we need more detailed information to help you, otherwise you wil have to open a support ticket and have them look at your settings file.
01-31-2011 12:50 PM - edited 01-31-2011 12:52 PM
Hi Eric,
DIO in DAQmx is special because it supports putting multiple lines (physical channels) in a single virtual channel. Then you can refer to the group of lines by a single name, via the "name to assign" parameter on the DAQmx Create Channel VI and the ActiveChans property in the DAQmx Create Channel property node. If you're planning to set a lot of channel properties, this may be convenient.
However, the lines in a virtual channel cannot span multiple devices. If I recall correctly, there are two ways around this:
Either approach should let you include lines from both modules in the same task.
Brad Keryan
NI R&D
01-31-2011 02:39 PM
I did not do a lot of configuration in MAX other than discovering the cDAQ chassis and all of the populated cards in each slot. The attached image is the what MAX shows as the chassis layout. My program does not even get to the point where I can set up the timing involved in the task. I get error -200086 immediately upon trying to create the DAQmx virtual channel (Digital Input). The other image is a snip-it of where I am getting the error.
What I am trying to accomplish is to group all 64 DI points of 2 digital input cards into one virtual channel and one tasks so all I have to do is execute a single DAQmx Read (Digital 1D Bool NChan 1Samp), and get an array of 64 elements out, each element corresponding to each digital input line across the 2 cards (NI-9425)
Brad, I'm not sure I follow you're comment about the lines in a virtual channel cannot span multiple devices. Would daisy chaining two DAQmx Create Virtual Channel vi's with individual device channels not be identical to specifying a list of physical channels in the physical channel constant?
01-31-2011 04:34 PM - edited 01-31-2011 04:37 PM
Hi Eric,
I'm afraid that you can't configure hardware timing with the NI 9425 in CompactDAQ. The NI 9425 data sheet explains: "The NI 9425 is a static digital module, so you can use it to perform software-timed or static operations only when installed in an NI CompactDAQ chassis."
For AI, AO, and counters, daisy chaining multiple calls to DAQmx Create Channel is equivalent to specifying a list of physical channels, but for DIO it's different. A single DIO virtual channel can contain multiple physical channels (lines). It would be completely reasonable to assume that specifying a list of lines with "one channel for all lines" would cause DAQmx to put all of the lines in a single virtual channel, but due to how it's implemented in the DAQmx framework, this is not possible when the lines are on multiple devices. It would also be reasonable to assume that if DAQmx couldn't put all of the lines in a single virtual channel, then it would create one virtual channel per device, but that's also not how it's implemented--it returns the error that you received.
Instead, here are two approaches to putting all 64 lines in one task. Either one should work.
Approach A: Create a single task, containing two virtual channels (MyChan0 and MyChan1). MyChan0 contains cDAQ1Mod3/port0/line0:31 and MyChan1 contains cDAQ1Mod4/port0/line0:31. The Digital 2D Bool NChan 1Samp read VI returns a 2x32 array of Booleans. To flatten this into a 1D 64-element array, you need to use Reshape Array or some other method.
The DAQmx Task >> Channels property is there to show that there are two virtual channels named MyChan0 and MyChan1. Also, I used a for-loop to show that you don't have to hardcode multiple calls to DAQmx Create Channel. The "one channel for all lines" constant is redundant because that is the default.
Approach B: Create a single task, containing 64 virtual channels (MyChan0 through MyChan63). This uses the "one channel for each line" constant, which is not the default. MyChan0 contains cDAQ1Mod3/port0/line0, MyChan1 contains cDAQ1Mod3/port0/line1, etc. The Digital 1D Bool NChan 1Samp read VI returns a 1D 64-element array of Booleans. If you used the Digital 2D Bool NChan 1Samp VI instead, you would get a 64x1 array because there are 64 virtual channels containing 1 line each.
Brad
01-31-2011 05:43 PM
Thank you Brad for your suggestion. I have chosen to implement approach B because it more closely resemble how my user will be selecting channels. I though I would be simplifying things by allowing the user to just select the entire port, but I see now that selecting the entire range of possible channels is what DAQmx requires for DIO.
The full understanding of why specifying Mod3/port0 is different than Mod3/port0/line0:31 still eludes me a bit and I would like to know more about what makes DIO special. But for now I am on deadline and will take your knowledge and apply it and I can learn more about the "why" portion later.
Thank you for your help.
Eric
01-31-2011 06:33 PM
Actually, port0 vs. port0/line0:31 should be equivalent in almost all cases. (Exception: with digital waveform charts/graphs, there are some minor differences.) The important part is to avoid including lines from multiple modules in the same virtual channel.
Brad