Chapter 13 Structured Texts 13.2.8 Function Block Structure Format Description The function block is executed. Rules and limits The state of the En pin of the function block does not need to be specified in the function block. When the statement is executed, the function block is executed. An IF statement functioning as an En pin can be used with the applied instruction. As long as the structure of the operands and the structure of the keywords are not destroyed, starting new lines is allowed. The function block is a statement, and therefore it ends with a semicolon. The input/output pins of the function block and the corresponding operands must be put in parentheses.
A pin and the corresponding operand form a group. The groups are separated by commas. The data types of the operands are specified in the function block definition. The function block before the parentheses is a function block instance rather than a function block definition, that is, the symbol before the parentheses is a symbol whose data type is a function block. Please refer to chapter 7 for more information about function block definitions and function block instances. The assignment mark for an input pin is := , and the assignment mark for an output pin is => . The pins and the operands are arranged according to the definition of the function block.
The arrangement can not be changed. The En pin and the Eno pin are excluded. The input pins are listed above all the output pins. A pin of the VAR_IN_OUT class is an input pin. Please refer to the ladder diagram and the structured text below for more information. 13-23