Navigation:  Equipments (Devices) > SCA06 > Ladder > Data Transfer >

ISTOREBOOL

Previous pageReturn to chapter overviewNext page

Block that indirectly loads the Value value in a bit in a global variable address.

 

Ladder Representation

 

ISTOREBOOL_block

 

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 modified

Value

BOOL

New value of the selected bit

VAR_OUTPUT

ENO

BOOL

End of operation

 

Operation

 

When this block has a TRUE value in EN, it loads the Value value in 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

 

ISTOREBOOL_flowchart

 

Example in Ladder

 

ISTOREBOOL_example01

 

The example above stores the value of VALUE in bit 7 of the address 121 in group 3 (GLOBAL_SYSTEM% C), which represents the disable command of CANopen communication. 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 := 121;

   BIT : BYTE := 7;

   VALUE : BOOL := 1;

END_VAR

 

DO1 := FB_ISTOREBOOL(

   EN:=DI1,

   Group:=3,

   Address:=ADDRESS,

  Bit:=BIT,

  Value:=VALUE);