Integration into TwinCAT
TX1200
19
Version: 1.1
Next, generate the following global variables:
VAR_GLOBAL
bOpen AT %I* : BOOL;
bClose AT %I* : BOOL;
arrKL6771_IN AT %I* : ARRAY[0..11] OF BYTE;
arrKL6771_OUT AT %Q* : ARRAY[0..11] OF BYTE;
stDataKL6771 : DataKL6771;
END_VAR
bOpen:
input variable for the Open button.
bClose:
input variable for the Close button.
arrKL6771_IN:
input variable for the MP-Bus terminal.
arrKL6771_OUT:
output variable for the MP-Bus terminal.
stDataKL6771:
required for communication with MP-Bus (see
).
All function blocks with MP-Bus must be executed in one task.
Therefore, create a MAIN program (CFC) in which the
and
function blocks are called. Make sure to link the communication block with
arrKL6771_IN
,
arrKL6771_OUT
and
stDataKL6771
.
The input
SetPoint
is set depending on the selected function. Link the global variables
bOpen
and
bClose
with an auxiliary variable.
Содержание TwinCAT 2 TX1200
Страница 1: ...Manual EN TX1200 TwinCAT 2 PLC Library TcMPBus 2022 06 02 Version 1 1...
Страница 2: ......
Страница 79: ......