FB_CTRL_nPOINT
The function block provides an n-point transfer element in the functional diagram.
Behavior of the output
Data array for the example:
The value of the array with the index (1,1), i.e. the left value in the first row can be chosen freely, since it is not evaluated.
VAR_INPUT
VAR_INPUT
fSetpointValue : FLOAT;
fActualValue : FLOAT;
fManValue : BOOL;
eMode : E_CTRL_MODE;
END_VAR
Name | Type | Description |
---|---|---|
fSetpointValue | FLOAT | Setpoint of the controlled variable |
fActualValue | FLOAT | Actual value of the controlled variable |
fManValue | BOOL | Input whose value is output in manual mode. |
eMode | E_CTRL_MODE | Input that specifies the operation mode of the function block. |
VAR_OUTPUT
VAR_OUTPUT
fOut : nPOINT_CTRL_TABLE_ELEMENT;
eState : E_CTRL_STATE;
eErrorId : E_CTRL_ERRORCODES;
bError : BOOL;
END_VAR
Name | Type | Description |
---|---|---|
fOut | nPOINT_CTRL_ | Output of the n-point element |
eState | E_CTRL_STATE | State of the function block |
eErrorId | E_CTRL_ERRORCODES | Supplies the error number when the output |
bError | BOOL | Becomes TRUE, as soon as an error occurs. |
VAR_IN_OUT
VAR_IN_OUT
stParams : ST_CTRL_nPOINT_PARAMS;
END_VAR
Name | Type | Description |
---|---|---|
stParams | ST_CTRL_nPOINT_PARAMS | Parameter structure of the n-point element |
stParams
consists of the following elements:
TYPE
ST_CTRL_nPOINT_PARAMS :
STRUCT
tCtrlCycleTime : TIME := T#0ms;
tTaskCycleTime : TIME := T#0ms;
pDataTable_ADR : POINTER TO nPOINT_CTRL_TABLE_ELEMENT
:= 0;
nDataTable_SIZEOF : UINT := 0;
nDataTable_NumberOfRows : UINT := 0;
fHysteresisRange : FLOAT;
END_STRUCT
END_TYPE
Name | Type | Description |
---|---|---|
tCtrlCycleTime | TIME | Cycle time with which the control loop is processed. This must be greater than or equal to the TaskCycleTime. The function block uses this input value to calculate internally whether the state and the output values have to be updated in the current cycle. |
tTaskCycle | TIME | Cycle time with which the function block is called. If the function block is called in every cycle this corresponds to the task cycle time of the calling task. |
pDataTable_ | POINTER TO nPOINT_CTRL_ | Address of the data table |
nDataTable_ | UINT | Size of the data table in bytes |
nDataTable_ | UINT | Number of rows in the data table |
fHysteresis | FLOAT | Hysteresis range, see diagram above. The hysteresis range functions as described for FB_CTRL_2POINT. |