P_KL1501
IO template for parameterizing a KL1501: 1-channel up/down counter. On PLC restart this template configures the terminal with the parameters entered in the Project Builder and then switches to process data mode. This template is based on the function block FB_KL1501Config.
Interface
VAR_OUTPUT
uiDataIn0 : UINT;
uiDataIn1 : UINT;
udiDataIn : UDINT;
usiState : USINT;
udiErrorId : UDINT;
uiDataIn0: Corresponds to the data variable 0 of the input process data. This output is suitable for direct processing in process data mode of the terminal.
uiDataIn1: Corresponds to the data variable 1 of the input process data. This output is suitable for direct processing in process data mode of the terminal.
udiDataIn: This variable of type UDINT is used for improved evaluation, if a 32-bit counter is selected. It consists of the two variables referred to above, uiDataIn0 and uiDataIn1. iDataIn0 is used for the low-order part, iDataIn1 for the high-order part.
usiState: Corresponds to the status variable of the input process data. This output is suitable for status assessment in process data mode of the terminal.
udiErrorId: contains the command-specific error code of the most recently executed command. See Error codes.
Parameter
iSetCounterType : INT;
iSetCounterType: This input is used to set the counter type. The setting is based on the table below.
iSetCounterType | Counter type |
---|---|
0 | 32 bit up/down counter |
1 | 2 *16-bit forward counter |
2 | 32-bit gated counter, gate input Low disables the counter |
3 | 32-bit gated counter, gate input High disables the counter |
Development information
Development environment | BACnet Revision | Target system | required supplement |
---|---|---|---|
TwinCAT 2.11 R3/x64 from build 2254 | n/a | PC/CX | TS8040 | TwinCAT Building Automation from V1.1.0 |
Version history
Version number | Comments |
---|---|
1.0.0.0 | First release |