Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get many digital outputs to work simultaneously?

I am trying to export 2 signals simultaneously through two different lines of NI-6536, but  the result is serial output of the signals, not parallel. Please tell me what changes do I have to make to my vi. My signals are 2 .m files of boolean vectors of 0 and 1.

0 Kudos
Message 1 of 5
(3,644 Views)

LabVIEW programming follows data flow, and your code is writing to the first line, closes that first task, then writes to the second line, then closes that second task.  To have it write the data to the lines in parallel you can combine your two arrays of data into one 2-D array and pass that new array to one task (delete the other) that writes on both lines at the same time since they're on the same port.  You can specify the two lines by entering "Dev1/port0/line0:1". 

 

Since you're writing to just one port, you could write to the whole port and just pack the 2-D array with 6 more columns of 0s.  Take a look at the shipping examples Cont Write Dig Port-Int Clk.vi and Write Dig Port.vi.  


Mark E.
National Instruments

0 Kudos
Message 2 of 5
(3,619 Views)
Thanks, but this is just a miniature. I want 32 outputs eventually. What do I have to do if the other line is port2/line3 for example. I want all 32 lines of to work simultaneously!!!!
0 Kudos
Message 3 of 5
(3,612 Views)
Did you look at the examples mentioned? Either one of them can be set for as many lines/ports as you want. You just have to specify them in the physical channel control!!!!!!
0 Kudos
Message 4 of 5
(3,602 Views)

To find out how to specify multiple channels, you can look in the DAQmx Help or go to this forum thread:

how do i enter multiple channels using the DAQmx AI Voltage VI


Mark E.
National Instruments

0 Kudos
Message 5 of 5
(3,586 Views)