Configuration of serial interface
- Configuration of the standard PC COMx interfaces
- Configuration of the serial KL6xxx Bus Terminals
- Configuration of the serial EL6xxx Bus Terminals
1. Configuration of the standard PC COMx interfaces
The serial interface can only be added in PC/CX systems.
Right-click on "I/O devices".Select "Append Device". Select "Serial Interface" under "Miscellaneous". Then set the following settings.
1.1 Serial Port tab
Serial interface COM1
1.2 Properties Tab
Select the option KL6xxx1 Mode (Emulation) and then set the communication parameters:
Baud rate, here 19200 baud, 8 data bits, parity=even, 1 stop bit
2. Configuration of the serial KL6xxx Bus Terminals
The interface is configured in the TwinCAT PLC by the instance of the FB_IEC870_SerialLineCtrl function block. The communication parameters such as baud rate, parity etc. must be set on this function block.
2.1 RS485 operating mode
In the RS485 operating mode (e.g. KL6041), the data is exchanged in half-duplex mode. The transmit and receive lines are connected to one another in RS485 operating mode. As a result, the terminal receives not only the data from other devices, but also its own send data. This data can interfere with communication. For half duplex mode, the handshake input of the FB_IEC870_SerialLineCtrl function block must be set to the value: RS485_HALFDUPLEX.
3. Configuration of the serial EL6xxx Bus Terminals
The serial interface is set in the TwinCAT System Manager CoE-Online tab (CoE=CanOpen over EtherCAT). The tab is only available for online access to the terminal, i.e. the settings cannot be modified if the System Manager is not linked to the hardware. The settings are stored in the terminal in a non-volatile manner, i.e. the settings are retained even if the voltage supply fails. These data do not have to be re-entered after a terminal scan. If the terminal is replaced, the data from the new terminal become active and have to be adjusted. To prevent this, the changed data must be entered in the Startup tab. During system startup, the data from the Startup tab are transferred to the terminal. Terminals can then be replaced without problem. After a terminal scan, the data have to be re-entered in the Startup tab.
3.1 CoE Tab
(1) Baud rate, here 19200 baud
(2) Date frame, 8E1 corresponds to 8 data bits, parity=even, 1 stop bit
(3) Feature bits -> Enable RTS/CTS = FALSE for EL6001
Double-clicking on the corresponding row brings up a menu in which the settings can be modified.
3.1.1 RS485 operating mode
In RS485 mode, data are exchanged in half duplex mode. The transmit and receive lines are connected to one another in RS485 operating mode. As a result, the terminal receives not only the data from other devices, but also its own send data. This data can interfere with communication. With the option "Enable half duplex" in the "COM Settings" object this can be suppressed (Index 8000:06).
3.2 Startup tab
All non-standard settings should be entered in the Startup list. During system startup, the data from the Startup tab are transferred to the terminal. Terminals can then be replaced without problem. After a terminal scan, the data have to be re-entered in the Startup tab.
Baud rate, here 19200 baud
Date frame, 8E1 corresponds to 8 data bits, parity=even, 1 stop bit
Feature bits -> Enable RTS/CTS = FALSE for EL6001