![Beckhoff KL85 Series Скачать руководство пользователя страница 41](http://html1.mh-extra.com/html/beckhoff/kl85-series/kl85-series_documentation_2719270041.webp)
Programming in TwinCAT
KL85xx und KL9309
41
Version: 2.1.0
4.2.2
KL8524
Function blocks
Description
Function block for the configuration of the KL8524, for reading out the digital signals
and for setting the outputs/LEDs.
4.2.2.1
FB_KL8524
Fig. 25: Function block FB_KL8524
Application
This function block is used to configure the
, to read out the digital signals and to set the
outputs/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
byDisCh
switches the standard function of the LEDs off. The LEDs can now be switched
independently of the digital input signal via the PLC with the variables
byLEDGn
or
byLEDYe
. Each LED can
be changed individually here.
The respective output can be set to "TRUE" with
byKBusOff
in the event of a K-bus error (or PLC stopped)
and switch position "auto". Bit 0..7 for the outputs 1..8. If the flag in
byKBusOff
is not set the output goes
"FALSE" in the event of a K-bus error (or PLC stopped).
VAR_INPUT
bEn : BOOL;
bExecCfg : BOOL;
byDisCh : BYTE := 0;
byKBusOff : BYTE := 0;
byOutMode : BYTE;
byTurnOnDelayCh1 : BYTE;
byTurnOnDelayCh2 : BYTE;
byTurnOnDelayCh3 : BYTE;
byTurnOnDelayCh4 : BYTE;
byOut : BYTE;
byLEDGn : BYTE;
byLEDYe : BYTE;
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
goes TRUE. Note that the
inputs/outputs are not updated during this time.
Содержание KL85 Series
Страница 2: ......