![Beckhoff KL85 Series Documentation Download Page 47](http://html1.mh-extra.com/html/beckhoff/kl85-series/kl85-series_documentation_2719270047.webp)
Programming in TwinCAT
KL85xx und KL9309
47
Version: 2.1.0
bErr:
The
bErr
or output goes TRUE as soon as an error occurs. This error is described via the
udiErrID
variable.
udiErrID:
In the event of an error the output issues an error code (see
).
bError
goes
TRUE at the same time.
VAR_IN_OUT
stInData : ST_KL8528InData;
stOutData : ST_KL8528OutData;
stInData:
Process image of the inputs (see
stOutData:
Process image of the outputs (see
4.2.3.2
FB_KL8528Ex
Fig. 28: Function block FB_KL8528Ex
Application
This function block is used to configure the KL8528, 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;
byKBusOff : BYTE;
byOut : BYTE;
byLEDGn : BYTE;
byLEDYe : BYTE;
bDisManMode : BOOL;
dwOpt : DWORD;
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
and
byKBusOff
are written to the terminals on a positive edge.
bBusy
goes TRUE. Note that the inputs/outputs are not updated during this time.
Summary of Contents for KL85 Series
Page 2: ......