|
Type
| Function block |
|
Description
| Implements the mathematic integration over time. The function block is carried out when the ENABLE input is set to TRUE.The following program fragment describes the functionality of the INTEGRAL function block:
Q = NOT R1; IF R1 THEN XOUT = X0; ELSEIF RUN THEN XOUT = XOUT + XIN * TIME_TO_REAL(CYCLE); END_IF |
|
Notes
|
- The value of the operand connected to CYCLE has to correspond to the cycle time of the task in which the function block is used.
- Function blocks have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.
|
|
Parameters
| Inputs
ENABLE
| Data type: | BOOL |
| Description: | TRUE = The function block is executed. |
RUN
| Data type: | BOOL |
| Description: | FALSE = The execution of the function block is halted. |
R1
| Data type: | BOOL |
| Description: | The function block is reset and initialized with the initial value X0. |
XIN
| Data type: | INTEGRAL: REALINTEGRAL_LTIME: LREAL |
| Description: | Input value. |
X0
| Data type: | INTEGRAL: REALINTEGRAL_LTIME: LREAL |
| Description: | Input value. |
CYCLE
| Data type: | INTEGRAL: TIMEINTEGRAL_LTIME: LTIME |
| Description: | Sampling period corresponding to the cycle of the task where the function block is executed. |
Outputs
Q
| Data type: | BOOL |
| Description: | Negated R1. |
XOUT
| Data type: | INTEGRAL: REALINTEGRAL_LTIME: LREAL |
| Description: | Output value. |
|