Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Output Toggle ON / OFF

Solved!
Go to solution

I am looking for a way to effectively toggle a certain line in my PXIe digital output module to either ON or OFF. 

 

I was under the impression that I could set a state to a Boolean ON or OFF, similar to Arduino, however I cannot find such a functionality.

 

I am not trying to write 0xFF constantly in an array. Am I missing something?

0 Kudos
Message 1 of 5
(1,897 Views)

You've to be more specific about the instrument model and share the VI you've implemented.

 

FYI - arduino made it simpler if you've to do the same in C on ATMEGA it will still be writing numeric value to registers.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 5
(1,881 Views)

Hi,

 

Thank you for your response. I am currently implementing this in C (LabWindows), however the question would most likely still stand for LabVIEW.

 

To be more specific, is there a way on my DIO Module, PXIe-6509, to set a line to ON.

 

My actuated mechanism is a valve, and I want to send a command to open a desired valve, go about the rest of my program, and later send a command to close the valve.

 

I do not want to write an array of ON (0xFF), because this is finite and requires multithreading.

0 Kudos
Message 3 of 5
(1,874 Views)
Solution
Accepted by topic author BerkeleyBear

Yes, you can. This function takes in boolean or boolean array based on how many channels are included while creating the task.

 

santo_13_0-1627439781985.png

 

As long as it is finite or static write, multithreading is okay, but each DAQmx write call will be a blocking call.

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 4 of 5
(1,866 Views)

Thank You!

 

I will implement this in C

0 Kudos
Message 5 of 5
(1,862 Views)