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,578 Views)
Solution
Accepted by 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,546 Views)

Ahh thank you vey much 🙂

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