Configuration of serial interfaces

1. Standard PC COMx port

The serial interface can only be added in PC/CX systems. Right-click on "I/O->Devices" node. Select "Add new Item..." from context menue. Select "Serial Communication Port" under "Miscellaneous".

Configuration of serial interfaces 1:

Then set the following settings.

1.1. Serial Port tab settings

Select serial interface (integrated COM1..COM4 or one existing PCI/PCIe device).

Configuration of serial interfaces 2:

1.2. Communication Properties tab settings

Select the option KL6xxx1 Mode (Emulation) and set the communication parameter:

Baud rate, here 19200 Baud, 8 data bits, Parity = even, 1 stop bit

Configuration of serial interfaces 3:

2. Serial KL6xxx bus terminal

The interface is configured within the TwinCAT PLC project by the instance of the FB_IEC870_SerialLineCtrlfunction block. Communication parameters like baud rate, parity etc. have to be set via this function block.

Configuration of serial interfaces 4:

2.1 RS485 operating mode

In the RS485 operating mode (e.g. KL6041), the data is exchanged by means of half duplex transfer.The transmit and receive lines are connected to each other in RS485 operating mode. As a result, the terminal receives not only data from other devices, but also its own transmitted data. The own data may disturb the communication. For half-duplex mode, the handshake input of the FB_IEC870_SerialLineCtrl function block must be set to the value: RS485_HALFDUPLEX.

3. Serial EL6xxx bus terminal

The settings for the serial interface can be found in the 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 avoid this, the modified data can 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 settings

(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.

Configuration of serial interfaces 5:

3.1.1 RS485 operating mode

In the RS485 mode, the data is exchanged by means of half duplex transfer. 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 transmitted data. The own data may disturb the communication. This can be suppressed with the option "Enable half duplex" in the "COM Settings" object (index 8000:06).

3.2. Startup tab settings

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

Configuration of serial interfaces 6: