Comsoft XPS User manual

XPS/XPS-E
User's Manual
COMSOFT

XPS/XPS-E User's Manual
Version: 1.2
Date: 04. May 1999
Order No.: 4003-7-G00-H-E
COMSOFT GmbH
Wachhausstraße 5a
D-76227 Karlsruhe
Phone: +49/ 721/ 9497- 0
Fax Hotline: +49/ 721/ 9497- 299
Email: [email protected]
Internet address: www.comsoft.de
This documentation has been drawn up carefully, but, in spite of all efforts, errors may occur. Information from the part of our customers tha
t
will help to improve comprehensibility of the document and remove errors will be appreciated.
The information contained therein can be amended without prior notice and does not represent any obligation on the part of COMSOFT. We do
not assume any kind of responsibility for possible inconsistencies and their consequences. This work including all its parts is copyrighted.
Every usage of it which lies beyond the tight limits of the copyright are prohibited and punishable. This applies especially to copies,
translations, microfilms as well as to feeding into and processing in electronic systems.
All other product or company names mentioned in this document may present trademarks of the respective owners.

XPS/XPS-E User's Manual Contents
COMSOFT i
Contents
1 Introduction.................................................................................................... 1
2 Setting into Operation ................................................................................... 2
2.1 Connection of the Gateway...................................................................... 3
2.1.1 XPS Desk Model .............................................................................. 3
2.1.2 XPS-E Top Hat Rail Model.............................................................. 4
2.1.3 Proceeding ........................................................................................ 5
2.2 Test of PROFIBUS Connection ............................................................... 5
2.3 Parameterisation....................................................................................... 6
2.4 set_prm Parameterisation......................................................................... 7
2.4.1 GSD File........................................................................................... 8
2.4.2 Slave_diag Device Diagnostics ........................................................ 9
2.4.3 Parameter Description .................................................................... 10
2.4.3.1 Baud Rate................................................................................ 10
2.4.3.2 Character Transmission Mode................................................ 10
2.4.3.3 Handshake Flow Control ........................................................ 11
2.4.3.4 XOFF_timeout – Timeout of Software Handshake................ 11
2.4.3.5 DP-Data Transmission Mode ................................................. 12
2.4.3.6 Extended Gateway configuration data.................................... 12
2.4.3.7 Trigger character for Serial triggert mode.............................. 13
3 Data Exchange.............................................................................................. 14
3.1 Send Data ............................................................................................... 15
3.2 Receive Data .......................................................................................... 15
3.2.1 Poll Mode ....................................................................................... 16
3.2.2 Serial triggered Mode..................................................................... 18
3.2.3 Request Mode................................................................................. 19
3.3 Send and Receive Data........................................................................... 22
4 Status and Error Messages ......................................................................... 23
4.1 External Device Diagnostics.................................................................. 23
4.2 Communication Status ........................................................................... 24
5 Connector Assignment and Cabling........................................................... 25
5.1 PROFIBUS............................................................................................. 25
5.1.1 Connector Assignment ................................................................... 25
5.1.2 PROFIBUS Terminating Resistor .................................................. 26
5.1.3 Cabling ........................................................................................... 27

Contents XPS/XPS-E User's Manual
ii COMSOFT
5.2 Serial Interface ....................................................................................... 28
5.2.1 Connector Assignment RS232 (XPS and XPS-E).......................... 28
5.2.2 Cabling RS232................................................................................ 29
5.2.2.1 Cabling without Hardware Handshake................................... 29
5.2.2.2 Cabling with Hardware Handshake ........................................ 29
5.2.3 Connector Assignment RS422/485 (XPS-E only) ......................... 30
5.2.4 Cabling RS422 without Hardware Handshake............................... 30
5.2.5 Cabling RS422 with Hardware Handshake.................................... 31
6 Frequently Asked Questions: FAQ ............................................................ 32
7 Technical Data.............................................................................................. 33
7.1 XPS ........................................................................................................ 33
7.1.1 PROFIBUS-DP Interface ............................................................... 33
7.1.2 RS232 Interface.............................................................................. 34
7.1.3 Connection...................................................................................... 34
7.1.4 Operating Indicators and Controls ................................................. 34
7.1.5 Technical Data................................................................................ 35
7.2 XPS-E..................................................................................................... 36
7.2.1 PROFIBUS-DP Interface ............................................................... 36
7.2.2 Serial Interface ............................................................................... 37
7.2.3 Connection...................................................................................... 37
7.2.4 Operating Indicators and Controls ................................................. 37
7.2.5 Technical Data................................................................................ 38
8 PROFIBUS-DP Certificate ......................................................................... 39
9 CE- Conformity Declaration....................................................................... 40

XPS/XPS-E User's Manual Contents
COMSOFT iii
List of Tables
Table 1: set_prm .............................................................................................7
Table 2: slave_diag ......................................................................................9
Table 3: Baud Rate of Serial Interface Octet 12 ............................................10
Table 4: Character Transmission Modes Octet 13 .........................................10
Table 5: Handshake Modes Octet 14 .............................................................11
Table 6: Data Transmission Modes Octet 16 .................................................12
Table 7: ext. configuration byte Octet 17.......................................................12
Table 8: Triggerzeichen Octett 18 ....................................................................13
Table 9: Data Transmission Format at data_exchange_req....................14
Table 10: Data Transmission Format at data_exchange_res..................14
Table 11: Pin Assignment PROFIBUS.............................................................25
Table 12: Connector Assignment RS232 Interface ..........................................28
Table 13: Connector Assignment RS422/485 Interface ...................................30

Contents XPS/XPS-E User's Manual
iv COMSOFT
List of Figures
Figure 1: Typical Connection of an XPS/XPS-E Gateway ................................1
Figure 2: Connectors and Interfaces of XPS ......................................................3
Figure 3: Connectors and Interfaces of XPS-E...................................................4
Figure 4: Data Reception in Poll Mode ............................................................16
Figure 5: Receive data in serial triggered mode (trigger character : 0x0A) ....18
Figure 6: Data Reception in Request Mode......................................................20
Figure 7: Combined Send- and Receive Request .............................................22
Figure 8: Byte Definition of external Device Diagnostics ...............................23
Figure 9: Byte Definition of Communication Status ........................................24
Figure 10: Assignment of PROFIBUS Terminator Type A .............................26
Figure 11: Connection of a PROFIBUS-DP Slave within a Segment..............27
Figure 12: RS232 Cabling without Hardware Handshake................................29
Figure 13: RS232 Cabling with Hardware Handshake.....................................29
Figure 14: RS422 Cabling with Hardware Handshake.....................................30
Figure 15: RS422 Cabling with Hardware Handshake.....................................31
Figure 16: PROFIBUS-DP Certificate No. Z00284 .........................................39

XPS/XPS-E User's Manual Contents
COMSOFT 1
1 Introduction
The intelligent PROFIBUS-DP gateways of COMSOFT's XPS series allow the
coupling of any serial devices with RS232 or RS422/485 interface to
PROFIBUS-DP according to the European Standard EN50170. The protocol
conversions required for the coupling are executed either by means of a
transparent universal driver or by loadable device-specific converters. The
following figure shows a typical connection:
PROFIBUS-DPRS232 – XPS
RS232/RS422 – XPS-E
Serial End Device
DP-MASTER
XPS
XPS-E
Figure 1: Typical Connection of an XPS/XPS-E Gateway

Contents XPS/XPS-E User's Manual
2 COMSOFT
2 Setting into Operation
When developing the XPS products, COMSOFT put great stress on an easy
installation. Following this aim, no external devices, e.g. configuration tools on
a PC are required to execute the configuration. All connections are realised by
D-SUB connectors, power plug (EN 60320) or spring clip terminals which can
all be accessed and loosened easily. The PROFIBUS station address is set via
coding switches. All further settings are done via UserParameter of the
SetParam telegram of PROFIBUS-DP. This parameterisation is executed,
simplified by the deliverable GSD file either via the configuration tool of the
connected PROFIBUS-DP Master or by the user program.

XPS/XPS-E User's Manual Contents
COMSOFT 3
2.1 Connection of the Gateway
2.1.1 XPS Desk Model
Status LED RS232-
Interface
Terminator ON/OFF
PROFIBUS-DP
Interface
Address
Switch
Front Side
Rear Side
Power Supply
Figure 2: Connectors and Interfaces of XPS

Contents XPS/XPS-E User's Manual
4 COMSOFT
2.1.2 XPS-E Top Hat Rail Model
Serial
Interface
PROFIBUS
Interface
Address Switch
RUN-LED
BUS-FAIL-LED
MODE-LED
TX-LED
RX-LED
Power Supply
Connector
Figure 3: Connectors and Interfaces of XPS-E

XPS/XPS-E User's Manual Contents
COMSOFT 5
2.1.3 Proceeding
By executing the following steps, the XPS/XPS-E Gateway can be set into
operation:
1. Connect XPS/XPS-E to PROFIBUS by using a standard PROFIBUS cable
with corresponding D-SUB PROFIBUS connector. For the connector
assignment please refer to chapter Connector Assignment and follow the
Installation Guidelines for PROFIBUS (No. 2.112, PNO).
2. Connect the serial end device with XPS/XPS-E (Connector Assignment
refer to 5.2).
3. Check your PROFIBUS network with regard to an unused Slave address
and adjust this free address at the coding switch of XPS/XPS-E.
4. Plug in the power supply. In case of XPS this is done by means of a power
plug (EN 60320) at the rear side of the device. The power supply of the
XPS-E is connected by spring clips at the front side.
As soon as the device is powered, the Status/Busfail LED is flashing red.
The Status/Busfail LED is flashing red until the device is parameterised and
configured. In this status, no data exchange can take place (neither send nor
receive). Only after successful parameterisation and configuration the
Status/Run LED is flashing green. Now, the device is ready for data exchange.
2.2 Test of PROFIBUS Connection
If you have a PROFIBUS-DP configuration tool, you can test the PROFIBUS
connection to the XPS/XPS-E Gateway. For this purpose, load the deliverable
GSD file into your configuration tool.
The DP Master shall now configure XPS/XPS-E. If this configuration is
successful, the Status/Run LED is flashing green.
If you do not have a PROFIBUS-DP configuration tool or if you wish to
change the pre-defined parameters (User_Prm_Data) in the GSD file, please
refer to the following chapters for the parameterisation.
Note

Contents XPS/XPS-E User's Manual
6 COMSOFT
2.3 Parameterisation
The parameterisation data of XPS/XPS-E consists of 7 DP-Slave standard
bytes and 16 device-specific parameters bytes (User_Prm_data, ->
user_prm_len = 16). As user diagnostic data, 8 additional diagnostics bytes
are available. (diag_len = 8).
1. For initialisation of XPS/XPS-E send a set_prm telegram. For this
purpose, use the parameters for PROFIBUS-DP and the serial interface
described in chapter 2.4.
2. Check the parameterisation with slave_diag.
3. Then use the command chk_cfg to configure the XPS/XPS-E. Prior to
that, the configuration can be read with the command get_cfg from
XPS/XPS-E. If chk_cfg is executed directly after the initialisation, the
maximum data_exchange telegram length is loaded from XPS/XPE-E.
For shorter data_exchange telegram length select one of the possible
configurations which are defined in the GSD file or select those arbitrarily
according to the PROFIBUS-DP standard.
After successful parameterisation XPS/XPS-E is prepared for data exchange.
The Status/Run LED is now flashing green.
You can verify the parameterisation and configuration telegram by means of
slave_diag.
In the following, only those parameters are described that are required for
operating the XPS/XPS-E. For the significance of the remaining PROFIBUS-
DP standard parameters please refer to the standard EN50170 and the GSD
file.
Note

XPS/XPS-E User's Manual Contents
COMSOFT 7
2.4 set_prm Parameterisation
The Bytes 1-7 are PROFIBUS-DP standard parameters, Byte 8-23 are device-
specific parameters (usr_prm).
Octet Parameter Name Value
1 Station_status 0x80*
2 WD_fact_1 0x00
3 WD_fact_2 0x00
4 Min TSDR 55
5 Ident_Number [0] 0x95
6 Ident_Number [1] 0x10
7 Group_Ident 0x00
8..11 Reserved ---
12 Baud Rate setting of serial interface See Table 3
13 Character Transmission Mode of serial interface See Table 4
14 Handshake setting of serial interface See Table 5
15 XOFF-Timeout of serial interface See 2.4.3.4
16 Receive Mode of PROFIBUS interface See Table 6
18 Trigger character for serial triggered mode
(usually LF (0x0A))
See Table 8
19..23 Reserved ---
Table 1: set_prm
(*)Freeze_Req and Sync-Req are not supported.

Contents XPS/XPS-E User's Manual
8 COMSOFT
2.4.1 GSD File
Next to standard parameters the parameters for the serial interface are included
in the GSD file. They are listed under the User_Prm_Data. The values
correspond to those described under chapter 2.3. A modification of these
parameters can be made by any kind of ASCII editor. Please note that the
number of parameters must not be changed and that the first four and last six
parameter bytes are to be set to 0.
In the following, the default settings of the GSD for serial interfaces of
XPS/XPS-E are listed.
9600 Baud / 8Bit / No Parity / 1 Stopbit / no Handshake / no Timeout / Poll-
Mode / RS232-Mode
This corresponds to the following entry in the GSD file:
User_Prm_Data = 0 0 0 0 96 56 78 0 80 0 0 0 0 0 0 0

XPS/XPS-E User's Manual Contents
COMSOFT 9
2.4.2 Slave_diag Device Diagnostics
Octet 1-7 are PROFIBUS-DP Standard, Octet 8-14 are the device-specific
diagnostics parameters (external diagnostics).
Octet Parameter Value
1 Station_status_1 Bit7 Diag.Master_Lock
Bit6 Diag.Prm_Fault
Bit5 Diag.Invalid_Slave_Response
Bit4 Diag.Not_Supported
Bit3 Diag.Ext_Diag
Bit2 Diag.Cfg_Fault
Bit1 Diag.Station_Not_Ready
Bit0 Diag.Station_Non_Existent
2 Station_status_2 Bit7 Diag.Deactivated
Bit6 reserved
Bit5 Diag.Sync_Mode
Bit4 Diag.Freeze_Mode
Bit3 Diag.WD_On
Bit2 must be set to 1
Bit1 Diag.Stat_Diag
Bit0 Diag.Prm_Req
3 Station_status_3 Bit7 Diag.Ext_Diag_Overflow
Bit6..0 reserved
4 Master_Address Master address or 0xFF, if Slave is not yet
parameterised.
5 Ident_Number[0] 0x95
6 Ident_Number[1] 0x10
7 Number of ext. diagnostic bytes 8
8 XPS/XPS-E state See 4.1
9 Baud Rate of the serial interface See 2.4.3.1
10 Character Transmission Mode of
serial interface
See 2.4.3.2
11 Handshake setting serial interface See 2.4.3.3
12 XOFF-Timeout of serial interface See 2.4.3.4
13 Receive Mode of DP- interface See 2.4.3.5
14 Setting of driver physics of serial
interface (RS232/485)
See 2.4.3.6
15 Trigger character for Serial
triggerd Mode
0x0A
Table 2: slave_diag

Contents XPS/XPS-E User's Manual
10 COMSOFT
2.4.3 Parameter Description
The parameters marked with (*) are the default values. These are used if
inadmissible parameters are entered during parameterisation.
2.4.3.1 Baud Rate
Baud Rate (bit/s) Value (dec) Value (hex)
150 1 0x01
300 3 0x03
600 6 0x06
1.200 12 0x0C
2.400 24 0x18
4.800 48 0x30
9.600 * 96 0x60
19.200 192 0xC0
Table 3: Baud Rate of Serial Interface Octet 12
2.4.3.2 Character Transmission Mode
Transmission Mode Value (dec) Value (hex)
8 Data bits, No Parity, 1 Stopbit (8N1) * 56 0x38
7 Data bits, No Parity, 2 Stopbits (7N2) 78 0x4E
7 Data bits, Even Parity, 1 Stopbit (7E1) 69 0x45
7 Data bits, Odd Parity, 1 Stopbit (7O1) 79 0x4F
Table 4: Character Transmission Modes Octet 13
The operating mode: 7 data bits, No Parity, 1 StopBit is not supported.
Note

XPS/XPS-E User's Manual Contents
COMSOFT 11
2.4.3.3 Handshake Flow Control
If data is exchanged via the serial interface, XPS/XPS-E supports the following
modes for the handshake:
• No Handshake
• Hardware Handshake. The receive data flow can be controlled at the
respective device by setting or re-setting the RTS-/CONTROL signal
(CTS/INDICATION=0 -> no sending). A corresponding example for
cabling can be found under chapter 5.2.2 and 5.2.3.
• Software Handshake. The receive data flow can be stopped by the
respective device by sending the control character XOFF (0x13). The
sending procedure will only be re-started if a XON character (0x11) is
received or a Timeout (XOFF-Timeout) for the receipt of the XON
character.
The interruption of the sending procedure or the XOFF timeout is shown in the
status byte of XPS/XPS-E (see chapter 4.2) by means of the bit
XOFF_CTS_FLAG.
Handshake Mode Value (dec) Value (hex)
Hardware Handshake (CTS, RTS for RS232
and CONTROL/INDICATION for RS422)
72 0x48
Software Handshake 83 0x53
No Handshake * 78 0x4E
Table 5: Handshake Modes Octet 14
2.4.3.4 XOFF_timeout – Timeout of Software Handshake
The XOFF timeout is calculated by means of VALUE * 100ms. This value is
entered into Octet15 of the parameterisation data. If no software handshake is
entered, this value is insignificant.
If the value 0 is given, the timeout is set to 10 seconds.
Note

Contents XPS/XPS-E User's Manual
12 COMSOFT
2.4.3.5 DP-Data Transmission Mode
To offer the user several possibilities to adapt his application optimally to the
gateway functionality of XPS/XPS-E, 3 data transmission modes can be used.
The corresponding description is found under chapter 3.
Data Transmission Modes Value (dec) Value (hex)
Poll Mode * 80 0x50
Request Mode 82 0x52
Serial triggered Mode 83 0x53
Table 6: Data Transmission Modes Octet 16
2.4.3.6 Extended Gateway configuration data
ext. Configuration byte Bit Function
Bit7 ..Bit2 Reserved
Bit1 Double baud rate
Bit0 RS232(0)<->RS422(1)
Table 7: ext. configuration byte Octet 17
BIT0: RS232<->RS422 – Serial interface physics
With this parameter the interface physics can be set to RS232(0) or RS485(1).
This parameter is only applicable for XPS-E. The desktop model (XPS) does
only have an RS232 physics.
BIT1: double Baudrate
Setting this bit doubles the baudrate for the serial interface
Exp: A selected baudrate of 19200 Baud can be increased to 38400 Baud by
setting this bit.
BIT7 – Bit2: reserved

XPS/XPS-E User's Manual Contents
COMSOFT 13
2.4.3.7 Trigger character for Serial triggert mode
Here the trigger character for the serial triggerd mode is set. If the seriell
receive data stream contains the same sign, all received data up to this
character are sent to the DP-Master inclusive the trigger character.
Triggerzeichen Wert (dez) Wert
(hex)
Wert
(ASCII)
LF * 10 0x0A LF
Table 8: Triggerzeichen Octett 18

Contents XPS/XPS-E User's Manual
14 COMSOFT
3 Data Exchange
Data exchange of XPS/XPS-E is exclusively realised by means of the
PROFIBUS-DP service data_exchange. The data to be sent by the master
correspond to the output data of data_exchange.req, the data received
correspond to the input data of data_exchange.res.
For each send or receive job, at max. 240 Bytes are available while 3 Bytes are
headers and the remaining 237 Bytes are user data. If more than 237 Bytes user
data shall be sent or received, the application on part of the PROFIBUS-DP
Master must split this job into several telegrams.
The data transmission format used from/to XPS/XPS-E has the following
structure:
Byte Telegram Element Value Range (dec)
1 Receive request number (only request
mode)
0 – 255 (see 3.2)
2 Send request number 0 – 255 (see 3.1)
3 Data length N of the following user data 0 – 237*
4..4+N Telegram data (user data) 0 – 255
Table 9: Data Transmission Format at data_exchange_req
Byte Telegram Element Value Range (dec)
1 Status of XPS/XPS-E 0 – 255 (see 4.2)
2 Receive Confirmation number of
XPS/XPS-E
0 – 255 (see 3.2)
3 Data length N of the following user data 0 – 237*
4..4+N Telegram data (user data) 0 – 255
Table 10: Data Transmission Format at data_exchange_res
(*) maximum number of user data depends on how the DP-Master has
configured XPS/XPS-E via the chk_cfg service.
Data can be arbitrary characters in the value range 0..255. This however is
only valid if XON/XOFF is not used as handshake.
This manual suits for next models
1
Table of contents