Page 2
All rights reserved, also for the translation. None of this document may be reproduced or processed, duplicated or distrib- uted by electronic systems in any form (print, photocopy, microfilm or any other process) without the written permission of Eaton Automation AG, St. Gallen. Subject to modifications.
Page 3
(for example, by means of separate tional operation. limit switches, mechanical interlocks • Suitable safety hardware and software etc.). measures should be implemented for the I/O interface so that a line or wire breakage on the signal side does not XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 4
(e.g. with regard to cable cross sections, fuses, PE). • All work relating to transport, installa- tion, commissioning and maintenance must only be carried out by qualified personnel. (IEC/HD 60364 (DIN VDE 0100) and national work safety regulations). XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Warning! Warns of the possibility of a hazardous situation that could result in major damage and serious or fatal injury or even death. → Indicates interesting tips and additional informa- tion. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 8
About This Manual Writing conventions XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Power supply The XN-1RS232 interface is fed with an isolated power supply from the module bus. The module bus electronics unit is likewise fed by the module bus.
The data transmission from the communication partner (e.g. PLC) to the transmit buffer of the XN-1RS232 module or from the receive buffer of the XN-1RS232 module to the communication partner is organised via an 8-byte data channel into process output or input data.
Transmit data present Check whether ongoing TX_CNT jobs are completed. = TX_CNT_ACK Data byte [ ]: = TX data Set new process data. TX_Byte_CNT: = n Transfer data to the module. TX_CNT: = (TX_CNT + 1)MOD4 XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
1 Product Description Technical features Technical data of the XN-1RS232 module Table 1: Technical data of the XN-1RS232 Designation XN-1RS232 Number of RS232 interfaces Transmission channels RxD, TxD, RTS, CTS Data buffer Receive buffer 128 bytes Transmit buffer 64 bytes...
Page 15
IEC/EN 61000-6-4: IEC/CISPR 11 / EN 55011, Class A Degree of protection IP 20 Ambient conditions Operating temperature 0 to +55 °C Storage temperature -25 to +85 °C Relative humidity 15 to 95 % non-condensing XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
No error message or – diagnostics message Green Data is currently being – transmitted. Data is not currently – being transmitted. Green Data is currently being – received. Data is not currently – being received. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
1 Product Description Base modules Base modules The following base modules can be used as termi- nals for connecting the XN-1RS232: Figure 3: XN-S4x-SBBS base module Designation With tension clamp XN-S4T-SBBS connectors With screw terminal XN-S4S-SBBS XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
“f” flexible core H 07V-K 0.5 to 1.5 mm 0.0008 to 0.0023 inch “f” with ferrules according to DIN 46228-1 0.5 to 1.5 mm (ferrules crimped gas-tight) 0.0008 to 0.0023 inch Test finger according to IEC/EN 60947-1 XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Data Terminal Ready Ground Data Set Ready Request To Send Clear To Send Ring Indicator → The table rows highlighted in grey indicate signals that are also available at the terminals of the base module. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
XN-1RS232 module to the PLC. The data received from the device by the XN-1RS232 module is entered in a 128 byte receive memory and then transferred in segments to the PLC via the module bus and the gateway.
Page 22
(decimal: 0->1->2->3->0...) A faulty sequence indicates that data segments are missing. RX_BYTE_CNT Number of valid bytes in this data segment. In the Profibus-DP fieldbus, a data segment consists of up to 6 user data bytes. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
The process output data is the data that is output from the PLC to a field device via the gateway and an XN-1RS232 module. The data received from the PLC in the XN-1RS232 module is entered in a 64 byte transmit buffer. The PROFIBUS-DP fieldbus transmission is carried out in the following 8-byte format: •...
Page 24
The value RX_CNT_ACK is a copy of the value RX_CNT. The value RX_CNT was transferred together with the last data segment of the process input data. The value RX_CNT_ACK is an acknowledge- ment of successful acceptance of the data segment using RX_CNT. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 25
A faulty sequence indicates that data segments are missing. TX_BYTE_CNT 0 - 7 Number of valid user data bytes in this data segment. In the Profibus-DP fieldbus, a data segment consists of up to 6 user data bytes. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
(e.g. Parameter error). When “Device-related Diagnostics” is selected, an abbreviated diagnostics message is generated that simply shows the gateway diagnostics (device-related diagnostics). The diagnostics bytes of all station modules are attached that support diagnostics. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 27
Bit 5 o.k. error The data terminal device connected to the XN-1RS232 module is not responding to the XOFF or RTS handshake. The internal receive buffer can overflow (buffer overflow = 1). hardware failure Bit 4 o.k.
2 Integrating the Module in PROFIBUS-DP PROFIBUS-DP data image Parameters The parameter setting of the XN-1RS232 module enables communication with different data terminal devices. The handshake procedure (soft- ware/hardware) can be selected. The number of data bits embedded in the telegram, the type of...
Page 29
None The data flow control is deacti- vated. XON/XOFF Software handshake (XON/XOFF) activated. RTS/CTS Hardware handshake (RTS/CTS) activated. reserved data bits The number of data bits is 7. The number of data bits is 8. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 30
XOFF character 0 – XOFF character This character is used to stop (19*) the data transfer of the data terminal device with the soft- ware handshake activated. * Factory setting XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
SIMATIC S7 (Siemens) PLC system and PROFIBUS-DP. The function blocks control the data exchange between the PLC and the XN-1RS232 module. The transfer format is 8 bytes in length, consisting of 2 bytes of control data and 6 bytes of user data.
2 Integrating the Module in PROFIBUS-DP Function blocks for SIMATIC S7 Transmit data FBSENDRSXXX The FBSENDRSXXX software function block is a data handling function block exclusively for trans- mitting data to the XN-1RS232 module. FBSENDRS232 FBSENDRSXXX Enable Enable Busy Busy...
Page 33
W#16#102. SendData Start address for storing transmit data. This is permissible for inputs, outputs, markers and data function blocks. Max_Bytes Maximum number of bytes to be transmitted. A maximum of 65536 bytes is possible. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 34
Variable error: Incorrect “SendData” parameter 8301h Variable error: Incorrect “SendData” parameter data type 8302h Variable error: Incorrect “SendData” parameter length RETVALSFC14 See manual “System software for S7-300/400, SFC14” RETVALSFC15 See manual “System software for S7-300/400, SFC14” XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
2 Integrating the Module in PROFIBUS-DP Function blocks for SIMATIC S7 FBRECVRSXXX receive data The FBRECVRSXXX function block is a data handling function block exclusively for receiving data from the XN-1RS232 module. FBSENDRSXXX FBRECVRSXXX Enable Enable Busy Busy BOOL BOOL...
Page 36
W#16#102. RecvData Start address for storing receive data. This is permissible for inputs, outputs, markers and data function blocks. Max_Bytes Maximum number of bytes to be transmitted. A maximum of 65536 bytes is possible. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 37
Variable error: Incorrect “RecvData” parameter 8301 Variable error: Incorrect “RecvData” parameter data type 8302 Variable error: Incorrect “RecvData” parameter length RETVALSFC14 See manual “System software for S7-300/400, SFC14” RETVALSFC15 See manual “System software for S7-300/400, SFC14” XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
2 Integrating the Module in PROFIBUS-DP Function blocks for SIMATIC S7 FBSRRSXXX send and receive data The FBSRRXXX function block is a data handling function block for simultaneously transmitting data to and receiving data from the XN-1RS232 module. FBSRRSXXX BusyRecv BOOL...
Page 39
WORD format is used for the addresses and therefore consists of 2 bytes. Example: The decimal value 258 must be transferred in hexadecimal code as W#16#102. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 40
65536 bytes is possible. SendData Start address for storing transmit data. This is permissible for inputs, outputs, markers and data function blocks. MaxSendBytes Maximum number of bytes to be transmitted. A maximum of 65536 bytes is possible. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 41
Variable error: Incorrect “SendData” parameter 8201 Variable error: Incorrect “SendData” parameter data type 8202 Variable error: Incorrect “SendData” parameter length RETVALSFC14 See manual “System software for S7-300/400, SFC14” RETVALSFC15 See manual “System software for S7-300/400, SFC14” XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 42
2 Integrating the Module in PROFIBUS-DP Function blocks for SIMATIC S7 XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Table 17: Structure of the data bytes in the DeviceNet ACTIVE MODE = "1byte ctrl/status header" PDInp Byte 0 STATUS TX COUNT RX COUNT RX BYTE COUNT (Status) ACKNOWLEDGE Byte 1 Data byte 0 … Byte 7 Data byte 6 XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 44
ACTIVE MODE = "2byte ctrl/status header" PDInp Byte0 STATUS TX COUNT RX COUNT RX BYTE COUNT (Status) ACKNOWLEDGE Byte 1 PROCESS DIAGNOSTICS DATA (Diagnos- tics) Byte 2 Data byte 0 … Byte 7 Data byte 5 XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Table 19: Structure of the data bytes in the DeviceNet with ACTIVE MODE = "1byte ctrl/status header" PDOut Byte 0 STATUS RX COUNT TX COUNT TX BYTE COUNT (Control) RESET ACKNOWL- CON- EDGE TROL Byte1 Data byte 0 … Byte 7 Data byte 6 XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 46
The TXBUF FLUSH bit is used for clearing the transmit buffer. If STATUS RESET CONTROL = 1: A request with TXBUF FLUSH = 1 will be ignored. If STATUS RESET CONTROL = 0: With TXBUF FLUSH = 1 The receive buffer is cleared. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
3 Integrating the Module in DeviceNet RS232 Module Class (VSC114) RS232 Module Class This class contains all the parameters and informa- (VSC114) tion relating to the XN-1RS232 module. Table 21: Class Instance Attr. Attribute Access Type Description name dec. (hex.)
Page 48
Contains the module ID. MODULE UDINT Contains the order number of the ORDER module. NUMBER MODULE SHORT_ Contains the module name, e.g. ORDER STRING XN-1RS485/422. NAME MODULE USINT Contains the revision number of REVISION the module firmware. NUMBER XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 49
BYTE: Command byte sequence MODULE ARRAY Signal interface of the XI/ON RESPONSE OF BYTE module. INTERFACE ARRAY OF: BYTE: Signal byte sequence MODULE ENUM Contains the index number regis- REGIS- USINT tered in all module lists. TERED INDEX XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 50
TX COUNT. The value TX COUNT was transferred together with the last data segment of the process output data. The value TX COUNT ACKNOWL- EDGE is an acknowledgement of successful acceptance of the data segment using TX COUNT. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 51
Bit 5: 0 = "OK" 1 = "handshake error": The data terminal device connected to the XN-1RS232 module is not responding to the XOFF or RTS handshake. The internal receive buffer can overflow. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 52
The value TX COUNT is linked and transferred together with every data segment of the process output data. The sequence of the TX COUNT values is: 00->01->10->11->00... (decimal: 0->1->2->3->0...) A faulty sequence indicates that data segments are missing. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 53
1 = flush TX buffer" DATA Clear transmit buffer Bit 1: 0 = ok 1 = "flush RX buffer" Clear receive buffer Bit 2 to 7: "<reserved>" TX DATA ARRAY Send data OF BYTE Number: 0 to 7 bytes. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 54
RS232 Module Class (VSC114) Attr. Attribute Access Type Description name dec. (hex.) TX DATA ARRAY Send data. The transfer is initiated OF BYTE immediately. The transmit buffer is RELEASE immediately released again. Number: 0 to 7 bytes. reserved XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 55
A frame error is output if the parameter setting (number of data bits, stop bits, type of parity) is not suitable. Bit 7: 0 = ok 1 = "buffer overflow": The receive buffer (RX buffer) has overflowed. High Byte : "<reserved>" XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 56
DISABLE BOOL 0 = "released": Diagnostics acti- DIAGNOS- vated. TICS 1 = "blocked": Diagnostics deacti- vated: This controls the separate fieldbus- specific diagnostics signal - not the diagnostics signal embedded in the process input data.. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 57
XOFF USINT XOFF character CHAR- This character is used to stop the ACTER data transfer of the data terminal device with the software hand- shake activated. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 58
3 Integrating the Module in DeviceNet RS232 Module Class (VSC114) XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
V3.00 of XN- GW-CANOPEN. General description XN-1RS232 modules are detected as such by the gateway and treated in CANopen as a separate module group together with the XN-1RS485/422 modules. As there is not a corresponding device...
Object description Object description Object 5600 – RS232/RS4xx parameters The parameter setting of the XN-1RS232 module enables communication with different data terminal devices. The handshake procedure (soft- ware/hardware) can be selected. The number of data bits embedded in the telegram, the type of...
Page 61
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Byte Disable Disable Select BitRate Diag- Reduced RS485 nostics Control Byte Flow Control Data Parity Stop Byte XONChar Byte XOFFChar XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 62
At the location of the first data byte, byte 1 of the object 5602 contains a byte with two control bits. These can initiate a clearing of the receive and transmit buffer. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 63
The parity bit is set so that the number of bits set to 1 (data and parity bit together) is even. Stop The number of Stop bits is 1. (Stop bits) The number of Stop bits is 2. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 64
XOFFChar 0 – XOFF character (XOFF character) This character is used to start the data transfer of the (19*) data terminal device with software handshake acti- vated. * Factory setting XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Object 5601 – RS232/RS4xx RxD Process input data is data that is transmitted from the connected field device via the XN-1RS232 module to the communication partner (e.g. PLC). The data received from the device by the XN- 1RS232 module is entered in a 128 byte receive...
Page 66
Data byte 5 Table 29: Structure of the data bytes with DisableReducedControl = 0 (in object 5600 PDInp Byte 0 STAT TX_CNT_ACK RX_CNT RX_BYTE_CNT (Status) Byte 1 Data byte 0 … Byte 7 Data byte 6 XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 67
FrameErr Bit 6 0 = ok 1 = Frame error The XN-1RS232 module parameters must be defined in order to be adapted to the data struc- ture of the DTE. A frame error is output if the parameter setting (number of data bits, stop bits, type of parity) is not suitable.
Page 68
The module must be exchanged as the EEPROM or UART may, for example, be faulty. PrmErr Bit 5 0 = ok 1 = Parameter error The set parameter values are not supported. Possible values are shown with the description of object 5600 XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
(e.g. PLC) via the gateway and the XN-1RS232 module to the field device. The data received from the communication partner in the XN-1RS232 module is entered in a 64 byte transmit buffer. This is transferred in an 8-byte format as follows: •...
Page 70
Data byte 5 Table 33: Structure of the data bytes with DisableReducedControl = 0 (in object 5600 PZDA Byte 0 STATRES RX_CNT_ACK TX_CNT TX_BYTE_CNT (Control) Byte 1 Data byte 0 … Byte 7 Data byte 5 XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 71
The RXBUF FLUSH bit is used for clearing the receive buffer. If STATRES = 1: A request with RXBUF FLUSH = 1 will be ignored. If STATRES = 0: RXBUF FLUSH = 1 will clear the receive buffer. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
RPDO19 a mapping entry object 5602 /Si 2. The PDOs must however only be enabled by a valid COB-Id. Other XN-1RS232 modules can be mapped by the user to free PDOs or addressed with SDO commu- nication. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
4 Integrating the Module in CANopen Additional emergencies Additional emergencies The following CANopen emergencies can be trig- gered by an XN-1RS232 module: Error Name Byte 3 Byte 4 Byte 5 Meaning code 7000 Additional Module Channel Parameter error modules (always 1)
BOOL xDisableDiag BOOL xDisableReducedCrtl xSelectRS485 BOOL usiDataRate USINT usiFlowControl USINT usiDataBits BOOL usiParity USINT BOOL xStoppbit SINT siXON_Char SINT siXOFF_Char Figure 8: Initialisation function block of the CoDeSys software MXpro for the CANopen fieldbus system XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 75
This parameter must always be 0 for the XN-1RS232 module. For the XN-1RS485/422 module the following applies: 0: The module operates in RS422 mode. 1: The module operates in RS485 mode. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 76
Value for the parity (Parity) not defined → Chapter “Object 5600hex – RS232/RS4xx parameters” 8015 Value for the flow control (FlowControl) not defined → Chapter “Object 5600hex – RS232/RS4xx parameters” dwAbortCode This error code is described in CIA DS301. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
POINTER TO ARRAY [0...7] OF BYTE RxData TxData POINTER TO ARRAY [0...7] OF BYTE DWORD RxBuffer UINT MaxRecvData TxBuffer DWORD MaxSendData UINT BOOL SelectBussystem BOOL MSBFirst Figure 9: Transmit/receive function block for the CoDeSys software MXpro XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 78
EnableSend = 0 Quit = 1 0: No influence on the module function. RxData Pointer to the receive address range of the XN-1RS232 module. The address to this address range is generated and displayed when an XN-1RS232 module is added to the “PLC configuration”...
Page 79
5 Commissioning the Module in xSystem XION_HTB_RSXXX data handling function block Variable Meaning TxData Pointer to the transmit address range of the XN-1RS232 module. The address to this address range is generated and displayed when an XN-1RS232 module is added to the “PLC configuration” area.
Page 80
Size of the transmit data telegram is greater than MaxSendData. ==> Abort the data handling function block 8203 Size of the transmit data package does not equal 8. ==> Abort of the data handling function block XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 81
XION_HTB_RSXXX data handling function block Note! It should be ensured without fail that the memory provided with RxBuffer and TxBuffer is enough (or more than enough) for the possible data volume defined by MaxSendData and MaxRecvData. XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Page 82
5 Commissioning the Module in xSystem XION_HTB_RSXXX data handling function block XI/ON: XN-1RS232 09/2011 MN05002013Z-EN www.eaton.com...
Need help?
Do you have a question about the XN-1RS232 and is the answer not in the manual?
Questions and answers