Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting a bit value from a word

I have from the OPC server a variable value that represents a byte (8 bits). How can I unpack the byte and get the value of each bit?
0 Kudos
Message 1 of 3
(3,179 Views)
Have you tried the 'number to boolean array' function?
(Functions pallette - Boolean - Number to boolean array).

You can then individually test each bit as you need.

Hope I haven't misinterpreted the question..
Mike
Mike Evans
TRW Conekt
N.I. Alliance Member, UK
http://www.Conekt.net
0 Kudos
Message 2 of 3
(3,179 Views)
Sorry about missing details. This is for a Lookout 5.0 application. The OPC Client Object reads a integer value (between 0 and 65535) that represents a 16 bit word. What I want is knowing the integer value, unpack the word into 16 bits. How can I do this in Lookout?
0 Kudos
Message 3 of 3
(3,179 Views)