01-30-2012 07:41 PM
I am programming in Borland Delphi using the DAQmx C library. My hardware configuration is a cDAQ 9174/9178 with a 9222, 9401, and 9403 module. Here's where I am running into problems at the moment:
I want to run three different tasks on my 9403 module:
Task1 is a buffered output with the chassis sample clock /cDAQ1/do/SampleClockTimebase at 100kHz (channels 0-5)
Task2 is a software timed output (channels 20-25)
Task3 is a software timed input (channels 26-31)
Task2 and Task3 give me -201105 errors when I try to use DAQmxWriteDigitalLines and DAQmxReadDigitalLines, respectively. Creating the channels for these tasks works fine, however. There is apparently some reason to believe that the 9403 won't perform Task1, except that it works without throwing errors. Does this work by accident, and only because I am using channels 0-5? Is this why I am getting errors when trying to use tasks 2 and 3?
Any thoughts are appreciated.
Solved! Go to Solution.
01-31-2012 01:17 PM
Hi Andrew,
This is expected behavior and is documented in the Digital I/O Considerations for C Series Devices in the DAQmx help.
The 9403 is listed a a serial module which has the following restrictions:
You can do task 1, or you can do task 2 and 3. You cannot do tasks 1, 2, and 3 together, as you've seen. You can accomplish this with an additional 9403 if you move the software timed tasks to the other module.
The 9401 is a parallel module which does not have those restrictions. It is nibble configurable, however, which means you have to set the direction in groups of 4, but it looks like you are using too many lines for a single 9401.
01-31-2012 05:19 PM
It turns out that don't necessarily need any more than one task at a time, so I'm just creating and clearing tasks as needed. Not the way I wanted to go, but it works fine since the states of the physical output channels are persistent, even while the tasks using those channels are created or cleared.
Thanks for pointing me in the right direction...I'm new to NI and am finding all these support resources to be a huge help.