![Beckhoff KL85 Series Documentation Download Page 39](http://html1.mh-extra.com/html/beckhoff/kl85-series/kl85-series_documentation_2719270039.webp)
Programming in TwinCAT
KL85xx und KL9309
39
Version: 2.1.0
4.2.1
KL8519
Function blocks
Description
Function block for the configuration of the KL8519, for reading out the digital signals
and for setting the LEDs.
4.2.1.1
FB_KL8519
Fig. 24: Function block FB_KL8519
Application
This function block is used to configure the
, to read out the digital signals and to set the LEDs.
The function block must be called once per cycle.
The parameters are transferred to the terminal with a positive edge on
bExecCfg
.
The variable
wDisCh
of the LED off. The LEDs can now be switched
independently of the digital input signal via the PLC with the variables
wLEDGn
or
wLEDRd
. Each LED can
be changed individually here.
The variable
wSetCol
defines how the LED should light up when the input is occupied. If it is "0" the LED will
be green, if "1" the LED will be red. If the input is not occupied the LED remains off.
The variable
wInv
inverts the behavior of the LED. If the input is "FALSE" the LED turns on, if "TRUE" the
LED turns off.
The variable
wBiCol
can be used to switch between green and red. If the variable is "1" the LED is red if the
input is "FALSE" and green if it is TRUE. This behavior can be inverted with the variable
wInv
.
The variable
eKBusOff
defines how the LEDs should behave in the event of a K-bus error (or PLC stopped),
if these are controlled by the PLC. If the variable is "0" (eKL8519_WatchdogOff) the LEDs remain off, if it is
"1" (eKL8519_Watchdog500ms) the last state of the LED is toggled every 500 ms and with
"2" (Watchdog1000ms) it is toggled every second.
VAR_INPUT
bEn : BOOL;
bExecCfg : BOOL;
wDisCh : WORD;
wSetCol : WORD;
wInv : WORD;
wBiCol : WORD;
eKBusOff :
dwOpt : DWORD;
wLEDGn : WORD;
wLEDRd : WORD;
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.
Summary of Contents for KL85 Series
Page 2: ......