![Beckhoff KL85 Series Documentation Download Page 43](http://html1.mh-extra.com/html/beckhoff/kl85-series/kl85-series_documentation_2719270043.webp)
Programming in TwinCAT
KL85xx und KL9309
43
Version: 2.1.0
byStatOut:
Status of the digital output signals. Bit 0 = channel 1 output 1, bit 1 = channel 1 output 2, ... ,
bit 7 = channel 4 output 2. The
function block is available for preparing the
signals for the graphic programming languages.
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_KL8524InData;
stOutData : ST_KL8524OutData;
stInData:
Process image of the inputs (see
stOutData:
Process image of the outputs (see
4.2.2.2
FB_KL8524Ex
Fig. 26: Function block FB_KL8524Ex
Application
This function block is used to configure the KL8524, 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;
Summary of Contents for KL85 Series
Page 2: ......