Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

9375 Simultaneous write and read

Solved!
Go to solution

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

0 Kudos
Message 1 of 11
(9,131 Views)

Emach,

 

Yes you can simultaneously write and read from multiple channels but these channels must be of the same task type. The following document explains it pretty well.

 

Simultaneously Read or Write to Multiple Channels
http://digital.ni.com/public.nsf/allkb/0C1ADEF06A54AB2D862575040066FD51

 

Warm Regards,

 

William Fernandez

Applications Engineering

National Instruments

0 Kudos
Message 2 of 11
(9,113 Views)

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

0 Kudos
Message 3 of 11
(9,109 Views)

Emach,

 

The NI 9735 has 16 digital inputs and 16 digital outputs. Is this the NI 9735 we both are talking about? 

 

NI 9375
http://sine.ni.com/nips/cds/view/p/lang/en/nid/210842

 

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

0 Kudos
Message 4 of 11
(9,100 Views)

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

0 Kudos
Message 5 of 11
(9,095 Views)

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
http://www.ni.com/example/30256/en/

 

Warm Regards,

William Fernandez
Applications Engineering
National Instruments

0 Kudos
Message 6 of 11
(9,076 Views)

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.

0 Kudos
Message 7 of 11
(9,067 Views)

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

0 Kudos
Message 8 of 11
(9,062 Views)
Solution
Accepted by topic author Emach

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.

0 Kudos
Message 9 of 11
(9,058 Views)
Hi, are you telling that NI 9375 cannot work both in input and and output simultaneously???
0 Kudos
Message 10 of 11
(7,359 Views)