From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Digital Output Values

Hey, how do I take six boolean values and put them into a DAQ Assistant box that's set up to output data.  The DAQ assistant says it wants an array, but when I merge the signals, they form DDT.

Can I take six wires and "merge" them into an array?
0 Kudos
Message 1 of 4
(2,490 Views)
I found "build array", but it's not quite what I need.  I need to control individual lines in a single DigitalOut port, I believe.  How would I set "P0.1" to zero?
0 Kudos
Message 2 of 4
(2,483 Views)
Hello bmunden,
when you set up DI/O in DAQ assistant express VI, youc an choose either 'write to lines' or 'write to port'. In the first case, you will need to add as many channels on the port as you have Boolean inputs (six in your case). Then the input will accept your boolean array, as in the upper block of code in the attached screenshot. If you are just addressing the port, it is expecting a number (like '5) which is then converted to boolean output (0101). A work-around to convert the array to number is shown in the lower block of code, but I really think you want to go with the top example, but with six booleans.
 
-Mello
 
 
 

Data Science Automation

CTA, CLA, CLED
SHAZAM!
Message 3 of 4
(2,473 Views)
Ah, but of course.  "Write to line" is one of those pieces of instructions that I normally overlook when I'm in a hurry to get the thing working.  I've been using Windows too long.
0 Kudos
Message 4 of 4
(2,468 Views)