ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital IO test

Solved!
Go to solution

Hello,

 

Could someone please show/explain how i would get an input port to turn on an indicator in labview. there 8 switches i need to turn on. i'm confused how to convert numeric to true false? I've attached my VI and picture of physical setup

 

Cheers

 

WP_20130116_001.jpg

0 Kudos
Message 1 of 3
(2,926 Views)
Solution
Accepted by topic author Terreh

It appears that your "DigitalIn" task is configured to read the entire port. So you will get an 8bit number representing all 8 lines of the port.

You can convert the number to a boolean array and then index out each line.

 

porttobits.png

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Message 2 of 3
(2,894 Views)

Ahh thank you vey much 🙂

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