04-03-2014 10:17 AM
Hello,
I have a 9375 DIO cDAQ card on a 4 slot USB chassis. My question is can the card be configured to perform simultaneous read and writes? All the DAQmx channel and task VI's want to either read or write. My goal is to be able to use a digital output to trigger a UUT and use one of the digital inputs to read an output from the UUT. I know I can start and stop the digital in and out tasks in order to perform my test but was wondering if I am missing the mark somehow.
Cheers,
Emach
Solved! Go to Solution.
04-04-2014 09:33 AM - last edited on 06-08-2024 02:13 PM by Content Cleaner
Emach,
Yes you can simultaneously write and read from multiple channels but these channels must be of the same task type.
Warm Regards,
William Fernandez
Applications Engineering
National Instruments
04-04-2014 12:16 PM
William,
Thanks for the reply. That article definitely helps for reading OR writing multiple physical channels. The 9375 card has 2 ports on it, port 0 is digital in, port 1 is digital out. Can I create a single task that will allow me to write and read from the two ports of the 9375 without having to stop the write task and then start the read task?
Hope that better explains my conundrum.
Cheers,
Emach
04-04-2014 04:06 PM - last edited on 06-08-2024 02:14 PM by Content Cleaner
Emach,
The NI 9735 has 16 digital inputs and 16 digital outputs. Is this the NI 9735 we both are talking about?
NI 9375
https://www.ni.com/en-us/shop/model/ni-9375.html
And the answer is not, your task will either be a digital input or digital output task. But do not worry, you can create one digital input taks and another digital output task. Then, you can connect more than one channel to each of them as far as they are of the same task type.
Warm Regards,
William Fernandez
Applications Engineering
National Instruments
04-04-2014 04:24 PM
William,
Yes the 9375 is the card in question. My apologies for the dyslexia. When I attempted to start two simulatenous tasks, one writing and one reading from the 9375, I got a resource is reserved error when attempting to define the second task.
Cheers,
Emach
04-07-2014 09:08 AM - last edited on 06-08-2024 02:14 PM by Content Cleaner
Emach,
Please take a look at this example which uses simultaneous digital input and output tasks and compare it to the code that you have.
NI-DAQmx: Correlated Digital I/O with NI CompactDAQ and LabVIEW
https://forums.ni.com/t5/Example-Code/NI-DAQmx-Correlated-Digital-I-O-with-NI-CompactDAQ-and-LabVIEW...
Warm Regards,
William Fernandez
Applications Engineering
National Instruments
04-07-2014 01:15 PM
That example William linked does not apply. It is specific to the cDAQ-9172 chassis and you have a cDAQ-9174.
Digital input and output require separate tasks. You can run both simultaneously with a 9375 as long as you don't have more than one hardware-timed task. This means while you can have any number of on-demand tasks, you cannot run both hardware-timed input and output tasks simultaneously with a single 9375.
This is documented in the NI-DAQmx help under "Digital I/O Considerations for C Series Devices" footnote 2:
"You can only do hardware timing in one direction at a time on a serial bidirectional module."
Unfortunately that restriction is not exactly easy to find.
04-07-2014 02:13 PM
Mark,
Thank you for your reply. So basically unless I am using the DO to emulate some sort of serial or other communication protocol I should use hardware timing for the DI and run on demand for the DO. If I want to emulate something that required rigid DO timing then I really need another DI module.
Regards,
Emach
04-07-2014 02:31 PM
Sorry, I made a mistake in my original post (I blame my lunch for distracting me) when I made it seem like you could do one hardware-timed task and one on-demand. You can either do on-demand tasks OR one hardware-timed task in one direction. This means if you want to do DI and DO, you need to use on-demand or two separate modules.
09-05-2016 11:15 AM