P_KL27x1

IO template for parameterizing a KL2751 / KL2761: Single-channel dimmer terminal. 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_KL27x1Config.

Interface

P_KL27x1 1:

VAR_INPUT

iDataOut        : INT;

iDataOut: output data to the terminal, i.e. light value. Values less than or equal to zero result in the lamp switching off.

VAR_OUTPUT

usiState        : USINT;
udiErrorId      : UDINT;

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

bSetDimRampAbsolute     : BOOL := FALSE;
iSetRampTime            : INT  := 3;
bSetWatchdogDisable     : BOOL := FALSE;
uiSetWatchdogTimeout    : UINT := 3000;
uiSetTimeoutOnValue     : UINT := 16383;
uiSetTimeoutOffValue    : UINT := 0;
iSetDimmerMode          : INT  := 0;
bSetOnAfterShortCircuit : BOOL := TRUE;
bSetLineFrequency60Hz   : BOOL := FALSE;

bSetDimRampAbsolute: FALSE: The set ramp time iSetRampTime refers to the complete data area (0 - 32767). The smaller the discontinuity, the shorter the ramp time. TRUE: Each switching step, whatever the size, requires the same time, as entered under iSetRampTime.

iSetRampTime: Ramp time input. The setting is based on the table below.

bSetWatchdogDisable: The internal watchdog is disabled.

uiSetWatchdogTimeout: Watchdog time as multiple of 10 ms.

uiSetTimeoutOnValue: This input specifies the light value that is output when a fieldbus error occurs with current process data > 0. The input range is limited to 32767.

uiSetTimeoutOffValue: This input specifies the light value that is output when a fieldbus error occurs with current process data = 0. The input range is limited to 32767.

iSetDimmerMode: This input is used to set the dimmer mode. The setting is based on the table below.

bSetOnAfterShortCircuit: FALSE: After a short circuit the light remains switched off. TRUE: The light is switched on again after a short circuit.

bSetLineFrequency60Hz: FALSE: mains frequency = 50 Hz. TRUE: mains frequency = 60 Hz.

iSetRampTime

Element

0

50 ms

1

100 ms

2

200 ms

3

500 ms

4

1 s

5

2 s

6

5 s

7

10 s

iSetDimmerMode

Element

0

Automatic detection

1

Trailing edge phase control

2

Leading edge phase control

3

Rectifier mode, positive (positive half-wave with leading edge phase control)

4

Rectifier mode, negative (negative half-wave with leading edge phase control)

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