According to the IEC61131-3 standards specification, an EN (ENable) boolean input and eventualmente un’uscita booleana ENO (ENable Output) boolean output will have to be used with functions in Ladder.
Execution of the operations defined in the function will be controlled according to the following rules:
The figure above shows a typical use of the EN - ENO states in a Ladder grid.
Equivalent QCL code:
; start of RUNG power_flow = 1 ; management of normally open contact ADD_EN power_flow = power_flow AND ADD_EN ; management of ADD function where a Setpoint is added to 1000 IF power_flow Setpoint = Setpoint + 1000 ENDIF ; management of the normally open coil ADD_OK ADD_OK = power_flow
It can be seen that in the equivalent code, if the EN input of the ADD function is OFF, the whole function is not executed.
The Ladder language defines that each reference varaiable falls under one of the following groups:
( UNCHECKED ) |
( NORMAL ) |
( COMMAND ) |
( ARRAY NAME ) |
( TIMER NAME ) |
( STATIC NAME ) |
( INDEX NAME ) |
( DEVICE NAME ) |
( DEVICE PARAMETER ) |
( DEVICE COMMAND ) |
The UNCHECKED group is used to define variables that do not undergo any validity control. This type of group is only used if absolutely necessary since it does not allow to identify an invalid variable setting during the project Check and Compilation procedures.
Ladder, as in QCL, has the following 3 access types :
R | ( READ ) |
W | ( WRITE ) |
RW | ( READ / WRITE ) |
Ladder, as in QCL, has the following 5 types of data :
F | ( FLAG ) |
B | ( BYTE ) |
W | ( WORD ) |
L | ( LONG ) |
S | ( SINGLE ) |