LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling a bcd 7 segment lcd with labview

I am pretty new to the Labview environment and am having a problem which involves converting a decimal value into its equivalent 4 digit binary number which then needs to trigger the appropriate boolean value to control a bcd 7 segment LCD.

For example, decimal 9 gets converted into 1001, and you have four boolean variables D,C,B,A, the converted binary nine needs to trigger D and A while leaving C and B off. Is this possible in Labview and if so any advice

Regards Shaun Oxley
soxley@student.ecu.edu.au
0 Kudos
Message 1 of 3
(3,451 Views)
To convert a decimal number to boolean I like to use the "Format to String" function with %b for a format specifier. A number goes in and a boolean "0101110..." string comes out. Once you've got the string, you can break it down by characters or turn it into an array of U8 to do lot of fun array stuff to it. I've attached a quick example that demonstrates a few tricks with strings and arrays. It will take a number and output the four LSBs in booleans for you. Fit for wiring to some DIO functions maybe!

Dan Press
www.primetest.com
0 Kudos
Message 2 of 3
(3,451 Views)
Good answer from Dan. You could also use the Number To Boolean Array function in the numeric palette to get the boolean values.

Brian
0 Kudos
Message 3 of 3
(3,451 Views)