40
Is Binary Input
Note: This option is only available when Go is set to Level 2.
Binary Input uses an 8-bit byte to allow the setting of significant bits from one command. These bytes
are accessed through their decimal equivalent.
The Binary Input command is used to check the state of multiple inputs in one command.
•
Select the either the greater than (>), equal to (=), less than (<), not equal to (<>), greater than or
equal to (>=), less than or equal to (<=) symbol.
•
Enter the decimal equivalent of the byte to be sent by either clicking on the number buttons or use
the Binary calculator to calculate the decimal equivalent and click on Apply.
•
Select OK to enter the completed command into the input symbol.
Calculating the Decimal equivalent
To check if an input is on the bit for the input is set to 1, if not it is set to 0. The decimal is created from
the byte created by setting the bits to check the inputs.
The table below indicates the bit pattern and decimal values for the byte when one input is to be
checked at a time.
Bit 8 Bit 7 Bit 6
Bit 5
Bit 4 Bit 3 Bit 2 Bit 1
Byte
Decimal value
Input
0
0
0
0
0
0
0
0
00000000
0
All off
0
0
0
0
0
0
0
1
00000001
1
1 on
0
0
0
0
0
0
1
0
00000010
2
2 on
0
0
0
0
0
1
0
0
00000100
4
3 on
0
0
0
0
1
0
0
0
00001000
8
4 on
0
0
0
1
0
0
0
0
00010000
16
5 on
0
0
1
0
0
0
0
0
00100000
32
6 on
0
1
0
0
0
0
0
0
01000000
64
7 on
1
0
0
0
0
0
0
0
10000000
128
8 on
To check multiple inputs add together the decimal values for each input and use the total as the Binary
Input value.
Example: To check Inputs 2 and 3 the binary value will be 6 (2 + 4 = 6). The byte sent would be
00000110.
A variable can be compared to the binary code generated by the inputs. This could be used in making
a combination lock, where the variables could be used to store a predefined input code.
back to Table of Contents