This document discusses functions and function blocks in programmable logic controllers. It explains that functions and function blocks require at least one Boolean input and output to control the flow through the block. The addition of these inputs and outputs allows the block to only execute if a 1 signal is received at the enable input. The output then indicates if the block executed correctly or not. It provides examples of adding two variables within a block and implementing a time delay function block within a ladder logic diagram.
This document discusses functions and function blocks in programmable logic controllers. It explains that functions and function blocks require at least one Boolean input and output to control the flow through the block. The addition of these inputs and outputs allows the block to only execute if a 1 signal is received at the enable input. The output then indicates if the block executed correctly or not. It provides examples of adding two variables within a block and implementing a time delay function block within a ladder logic diagram.
This document discusses functions and function blocks in programmable logic controllers. It explains that functions and function blocks require at least one Boolean input and output to control the flow through the block. The addition of these inputs and outputs allows the block to only execute if a 1 signal is received at the enable input. The output then indicates if the block executed correctly or not. It provides examples of adding two variables within a block and implementing a time delay function block within a ladder logic diagram.
elements, LD provides the unlimited use functions and function blocks in so far as this feature is supported by the controller used.
Prerequisite for the incorporation of so-called
organization units, is the availability of at least one Boolean input and one Boolean output of the block in the question. If this is not the case , a Boolean input with the formal parameter EN (enable) is added to the corresponding functions or function modules as well as a Boolean output ENO (enable OK). The Boolean inputs / outputs are required to permit the power flow though the block.
Incorporation of functions
Invocation of function block
The addition shown in fig. B8.3a is only
undertaken, if a 1-signal is applied at the input EN. If this is the case, variables Quantity _1 and Quantity_2 are added and the result of these variables assigned to the variable Fillin_level. At the same time, the value of output ENO indicates, whether the addition has been executed, activated and correct (ENO=1). If the block has not been processed correctly, the output ENO assumes the value 0.
Function modules such as for instance the
signal delay shown in fig. B8.3b can be incorporated in the ladder diagram without additional EN input and ENO output. The function block is connected with the elements of the current rung in the usual manner via the Boolean input IN and the Boolean output Q. If the input %I1.3 In fig. b8.3b assumes the value 1, the function block copy T_starup is processed with the preset time duration of 7sec. The value of output Q of t_startup is assigned to output %Q2.4.