LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simplified DAQ DOs vi?

Is there a way to simplify the structure of the vi I'm trying to create?  This sample vi contains only 4 digital outs to various ports on a PXI-6513 board.  My final vi will have over 300 digital outs/booleans.   Help is appreciated.
0 Kudos
Message 1 of 3
(2,925 Views)
The physical channel IO variant can be a string instead of the variant that you are using.  you can programmatically manipulate the string to change the physical channel to the desired one.  This means you only need create one subvi for talking to the hardware. 
Good luck.

Paul
0 Kudos
Message 2 of 3
(2,917 Views)
Hello,
 
It sounds like you are wanting to use software timing to update digital output lines with user-input values on several different DAQ devices.  If I have understood your application correctly, I would recommend the following structure to your program:
  • An initialization subVI that creates and starts a DAQmx Digital Output task on each individual DAQ device.  Right now you have one task per line.  It would be greatly simplified if you use one task per device.  Instead of inputting individual boolean values to update a line, you could use an array of booleans to update all lines on the device in one subVI call.  This subVI would pass out an array of DAQmx Tasks. 
  • Inside of a loop, you could have another subVI that accepts the array of DAQmx Tasks from the initialization VI and actually updates the outputs.  The user could enter updates through a boolean array control on the front panel.
  • Outside of the loop you would then need a final subVI to clear all of the tasks created in the VI.

This is just a basic high-level description based on a few assumptions.  Let me know if I misunderstood what you are trying to do, or if you need more details about how to implement this suggestion. 

0 Kudos
Message 3 of 3
(2,889 Views)