P_KL8519

IO template for parameterizing a KL8519: 16-channel digital input signal module. 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_KL8519.

Interface

P_KL8519 1:

VAR_INPUT

bLEDOutGreen01 .. bLEDOutGreen16  : BOOL;
bLEDOutRed01 .. bLEDOutRed16      : BOOL;

bLEDOutGreen01 .. bLEDOutGreen16: Switches the green LED of the respective channel on, if switching of the LED from the PLC via the respective parameter bLEDModePLC01 to bLEDModePLC16 is enabled.

bLEDOutRed01 .. bLEDOutRed16: Switches the red LED of the respective channel on, if switching of the LED from the PLC via the respective parameter bLEDModePLC01 to bLEDModePLC16 is enaled.

VAR_OUTPUT

bDataIn01 .. bDataIn16    : BOOL;
udiErrorId                : UDINT;

bDataIn01 .. bDataIn16: Data input channel 1 to 16.

udiErrorId: contains the command-specific error code of the most recently executed command. See Error codes.

Parameter

bLEDModePLC01 .. bLEDModePLC16        : BOOL;
bLEDColourAuto01 .. bLEDColourAuto16  : BOOL;

bLEDModePLC01 .. bLEDModePLC16: If this parameter is TRUE, the standard function of the LEDs for this channel is deselected. That is, it is no longer set via a high-signal of the channel set, but directly via the inputs bLEDOutGreen01 to bLEDOutGreen16 for the green colour scheme and bLEDOutRed01 to bLEDOutRed16 for the red colour scheme. It is possible to set both colours simultaneously.

bLEDColourAuto01 .. bLEDColourAuto16: If the standard mode for a channel is active (bLEDModePLCxx = FALSE), these parameters can be used to select the signal colour for the channel: bLEDColourAutoxx = FALSE: the green LED is selected for the signal status "High", bLEDColourAutoxx = FALSE: the red LED is selected.

bDualColourAuto01 .. bDualColourAuto16: If this parameter is set to TRUE, the respective channel is in two-colour mode. A high signal level at the input activates the colour selected under bLEDColourAutoxx, a low state the other colour.

bLEDInvertAuto01 .. bLEDInvertAuto16: If one of these parameters is set to TRUE, the respective low and high signal behaviour, as defined with the parameters bLEDColourAutoxx and bLEDDualAutoxx, is reversed.

iKBusOffMode: This parameter can be used to define the behaviour of the LEDs in the event of a K-bus error. The setting only applies for the LEDs, for which the standard mode was deselected through bLEDModePLCxx = TRUE. 0: LED remains on, if it was set via the PLC. 1: If the LED was switched on, it flashes with 500 ms clock frequency. 2: If the LED was switched on, it flashes with 1000 ms clock frequency. All other inputs are interpreted as "0".

Parameter assignment example channel 1 for the standard mode bLEDModePLC01 = FALSE:

In the interest of clarity, the example lists the parameter combinations for the three parameters bLEDColourAuto01, bLEDDualAuto01 and bLEDInvertAuto01 together with the LED switching characteristics for channel 1. All other channels can be parameterized differently.

If the default behaviour is deselected through bLEDModePLC01 = TRUE, the three auto-parameters are no longer relevant, only the inputs bLEDOutGreen01 and bLEDOutRed01.

bLEDColourAuto01

bDualColourAuto01

bLEDInvertAuto01

Signal level at input 1

LED colour channel 1

FALSE

FALSE

FALSE

Low

OFF

FALSE

FALSE

FALSE

High

green

FALSE

FALSE

TRUE

Low

green

FALSE

FALSE

TRUE

High

OFF

FALSE

TRUE

FALSE

Low

red

FALSE

TRUE

FALSE

High

green

FALSE

TRUE

TRUE

Low

green

FALSE

TRUE

TRUE

High

red

TRUE

FALSE

FALSE

Low

OFF

TRUE

FALSE

FALSE

High

red

TRUE

FALSE

TRUE

Low

red

TRUE

FALSE

TRUE

High

OFF

TRUE

TRUE

FALSE

Low

green

TRUE

TRUE

FALSE

High

red

TRUE

TRUE

TRUE

Low

red

TRUE

TRUE

TRUE

High

green

Development information

Entwicklungsumgebung

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