
Programming
5.5
RS232/RS485
5.5.1
Programming of the RS232/485 interface
In KL6xx1 mode, any serial protocols can be implemented. To this end, configure the interface as KL6xx1
mode in the System Manager.
This mode behaves like the serial interface terminals from Beckhoff. It only means that the programming and
the interface is similar to a serial interface. The Beckhoff supplement blocks (such as ModbusRTU,
COMLIB, ...) of the serial interface usually offer the 64-byte mode for the PC interface.
Alternatively, you can operate and program the interface yourself.
The data structure consists of a control and status word (2 bytes) and a data array. The control byte is
written by the PLC program and acknowledges the sending of data with the TR bit. Toggling the bit (edge
change) results in sending of the number of data (length of the data OL bits to be written) from the interface.
The RA bit acknowledges that the receive data were read. This enables the interface to detect that it can
copy new data into the data array. The status word indicates how many data are valid. The Reset bit (IR
Control.2, positive edge) clears the buffers and resets the interface. The interface also acknowledges the
command in the status word with a Reset bit (IA Status.2). Then set the Reset bit (IR Control.2) to False
again.
Table 1: Control word
Bit
15
14
13
12
11
10
09
08
07
06
05
04
03
02
01
00
Nam
e
Length of data to be written (OL bits)
Rese
rve
IR
RA
TR
Legend
CX8080
42
Version: 1.0.0
Содержание CX8080
Страница 1: ...Documentation CX8080 Embedded PC with RS232 RS485 Interface 1 0 0 20 05 2016 Version Date...
Страница 2: ......
Страница 15: ...Mounting and wiring CX8080 15 Version 1 0 0...