LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Build 8 bit binary number

Hello
 
I want to build a Binary/hexa decimal data from the buttons
Cancel is 1 bit data its the LSB, amnual/Auto is also 1 bit its the second bit
Noise gain is 4 bit data
Noise sign is 2 bit data
i want to build a binary number & equivalent hexa decimal number for this
Ex. if i click start error button the start error bit is 1 (LSB)
i select Auto, bit is 0
noice gain if i select 50% = 0101
noise sign if  Random 10
so i want to build a 8 bit data like this 10010101
 
thanks
sk

I am using LabVIEW 7.1
0 Kudos
Message 1 of 4
(3,289 Views)
Hello!

You can use "Number to Boolean Array.vi" and then concatenate all the boolean arrays you created. Then you can use "Boolan Array to Number.vi" to have your 8-Bit number. As attachement your modified programm. By 50% Noise Gain you have 0100 and not 0101 (Noisee Gain 50% has index 4 -> 0100)

Best regards

Ken
0 Kudos
Message 2 of 4
(3,283 Views)
Hello sk,

just try this...
(For the number controls I adjusted the range properties.)
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(3,277 Views)
Hello,
you've just to multiply Auto/manual by 2, noise gain by 4, noise sign by 64
and to add all the components.

look at the diagram here : http://cjoint.com/?gxq32THb1m

jerome





"LV Beginner" <x@no.email> a écrit dans le message de news:
1151050208933-382629@exchange.ni.com...
> Hello
> &nbsp;
> I want to build a Binary/hexa decimal data from the buttonsCancel is 1 bit
> data its the LSB, amnual/Auto is also 1 bit its the second bitNoise gain
> is 4 bit dataNoise sign is 2 bit datai want to build a binary number &amp;
> equivalent hexa decimal number for thisEx. if i click start error button
> the start error bit is 1 (LSB)i select Auto, bit is 0 noice gain if i
> select 50% = 0101noise sign if&nbsp; Random 10so i want to build a 8 bit
> data like this 10010101
> &nbsp;
> thanks
> sk
>
>
>
> I am using LabVIEW 7.1
>
>
> q.vi:
> http://forums.ni.com/attachments/ni/170/191663/1/q.vi


0 Kudos
Message 4 of 4
(3,265 Views)