Programming in TwinCAT
KL85xx und KL9309
44
Version: 2.1.0
byTurnOnDelayCh4 : BYTE;
byOut : BYTE;
byLEDGn : BYTE;
byLEDYe : BYTE;
bDisManMode : BOOL;
dwOpt : DWORD := 0;
bEn:
The function block is enabled by setting bEn to TRUE in the PLC program. With bEn = FALSE the
execution of the function block will be stopped and all outputs reset.
bExecCfg:
The configurations byDisCh, byKBusOff, byOutMode, byTurnOnDelayCh1, byTurnOnDelayCh2,
byTurnOnDelayCh3 and byTurnOnDelayCh4 are written to the terminals.
bBusy
becomes TRUE. Note that
the inputs/outputs are not updated during this time.
byDisCh:
Configuration: Disablement of the standard function of the LEDs. The LEDs can be set by the
PLC. Bit 0 = LED 1, ... , bit 7 = LED 8. 255
dec
(FF
hex
) deactivates the standard function of all LEDs. These can
then be set from the PLC via
byLEDGn
or
byLEDYe
.
byKBusOff:
Configuration: Reaction of the outputs in the event of a K-bus error. The respective output is set
with bit 0 = output 1, ... , bit 7 =output 8 in the event of a K-bus error (or PLC stopped) provided that the
switch is set to "auto". Note: 2 outputs are assigned to a channel and only one output may be activated per
channel. If the value 255
dec
(FF
hex
) is transferred, for example, no output is set when the PLC stops.
byOutMode:
Configuration: The outputs assigned to a channel can be set in 2 variants. Bit 0 = FALSE =
channel 1 output mode 1, bit 0 = TRUE = channel 1 output mode 2, ... , bit 3 = FALSE = channel 4 output
mode 1, bit 3 = TRUE = channel 4 output mode 2.
Output mode 1: Output 1 is switched if the three-step switch is in position 1; output 2 is switched if the three-
step switch is in position 2.
Output mode 2: Output 1 is switched if the three-step switch is in position 1 or position 2; output 2 is switched
if the three-step switch is in position 2, following a delay which can be set with
byTurnOnDelayChx.
byTurnOnDelayCh1
: Configuration: Switching time for channel 1 output mode 2. 1 bit = 10 ms -> with
default 255
dec
, FFhex the second output is switched on after 2550 ms if the three-step switch is in position 2.
byTurnOnDelayCh2:
Configuration: Switching time for channel 2 output mode 2. 1 bit = 10 ms -> with
default 255
dec
, FF
hex
the second output is switched on after 2550 ms if the three-step switch is in position 2.
byTurnOnDelayCh3:
Configuration: Switching time for channel 3 output mode 2. 1 bit = 10 ms -> with
default 255
dec
, FF
hex
the second output is switched on after 2550 ms if the three-step switch is in position 2.
byTurnOnDelayCh4:
Configuration: Switching time for channel 4 output mode 2. 1 bit = 10 ms -> with
default 255
dec
, FF
hex
the second output is switched on after 2550 ms if the three-step switch is in position 2.
byOut:
Bit 0 = TRUE, ... , Bit 7 = TRUE sets the respective output, provided the switch is set to "auto". All
outputs are set with 255
dec
(FF
hex
). The FB_KL85xx8BitToByte function block is available for preparing the
signals for the graphic programming languages.
byLEDGn:
Bit 0 = TRUE,..., bit 7 = TRUE sets the green LEDs, provided that the standard function of the
LEDs has been disabled with byDisCh. All green LEDs are set with 255
dec
(FF
hex
). The FB_KL85xx8BitToByte
function block is available for preparing the signals for the graphic programming languages.
byLEDYe:
Bit 0 = TRUE,..., bit 7 = TRUE sets the yellow LEDs, provided that the standard function of the
LEDs has been disabled with byDisCh. All yellow LEDs are set with 255
dec
(FF
hex
). The
FB_KL85xx8BitToByte function block is available for preparing the signals for the graphic programming
languages.
bDisManMode:
Disabling manual operating mode.
dwOpt:
For future options.
VAR_OUPUT
bBusy : BOOL;
byStatSwiAuto : BYTE;
byStatSwi : BYTE;
byStatOut : BYTE;
bManModelsDis : BOOL;
wFirmVer : WORD;
bErr : BOOL;
udiErrID : UDINT;
Summary of Contents for KL85 Series
Page 2: ......