Block that indirectly loads the value of a bit in a global variable address.
Ladder Representation

Block Structure
Variable Type |
Name |
Data Type |
Description |
VAR_INPUT |
EN |
BOOL |
Block enabling |
Group# |
BYTE |
Group where the variable is stored |
|
Address |
DWORD UDINT DINT |
Address of the global variable, as its group |
|
Bit |
BYTE USINT SINT |
Position of the bit to be checked |
|
VAR_OUTPUT |
ENO |
BOOL |
End of operation |
Value |
BOOL |
Value of the bit selected by the input arguments |
Operation
When this block has a TRUE value in EN, it loads, in Value, the Bit contents of the Address variable belonging to the Group# group.
When EN has FALSE value, Value remains unchanged.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart

Example in Ladder

The above example loads the value of bit 1 of the address 24 of group 2 (S GLOBAL_SYSTEM%), which represents the status of ESC key for the VALUE variable. The block ends with success and ENO output is activated.
Example in ST
The example below displays the instructions for applying the example above in the ST language.
VAR ADDRESS : DINT := 24; BIT : BYTE := 1; VALUE : BOOL; END_VAR
VALUE := FB_ILOADBOOL( EN:=DI1, Group:=2, Address:=ADDRESS, Bit:=BIT, ENO=>DO1);
|