user manual - kunbus · the art may only be assembled, ... the intelligent profibus-dp gateways of...

36
User Manual XPS-E 100205 • 02/03/2017

Upload: phungnguyet

Post on 30-Jul-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

User ManualXPS-E

100205 • 02/03/2017

Page 2: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

KUNBUS GmbH

ii XPS-E

1 Working with XPS ........................................................................................................................... 31.1 Validity ....................................................................................................................................... 31.2 User ........................................................................................................................................... 31.3 Symbols..................................................................................................................................... 31.4 Safe Work.................................................................................................................................. 41.5 Limitation of Liability .................................................................................................................. 51.6 Customer Service ...................................................................................................................... 5

2 Introduction ..................................................................................................................................... 6

3 Put into operation ........................................................................................................................... 73.1 Connect the Gateway ................................................................................................................ 73.2 Test the PROFIBUS connection................................................................................................ 83.3 Parametrization ......................................................................................................................... 93.4 set_prm Parametrization ......................................................................................................... 10

4 Data exchange............................................................................................................................... 154.1 Send Data................................................................................................................................ 154.2 Receive Data ........................................................................................................................... 154.3 Send and Receive Data........................................................................................................... 24

5 Status and Error Messages.......................................................................................................... 255.1 External Device Diagnostics.................................................................................................... 255.2 Communication Status ............................................................................................................ 26

6 Connector Assignment and Cabling........................................................................................... 276.1 PROFIBUS .............................................................................................................................. 276.2 Serial Interface ........................................................................................................................ 29

7 FAQ................................................................................................................................................. 32

8 Technical Data............................................................................................................................... 33

Page 3: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 3 / 36

1 Working with XPS

1.1 ValidityThis Document is valid for the following products:– 100205

1.2 UserThe Art may only be assembled, installed and put into operation bytrained, qualified personnel. Before assembly, it is absolutelyessential that this documentation has been read carefully andunderstood. Expertise in the following fields is assumed:– Electronic circuits,– Basic knowledge of PROFIBUS,– work in electrostatic protected areas,– Locally applicable rules and regulations for occupational safety.

1.3 SymbolsThe symbols used have the following meaning:

DANGER HazardObserve this information without fail!There is a safety hazard that can lead to serious injuries and death.

WARNING CautionThere is a safety hazard that can result in minor injuries and materialdamage.

NOTICE NoteThere is a safety hazard that can result in material damage.

Wor

king

with

XP

S-E

Page 4: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 4 / 36

1.4 Safe Work WARNING Damage and serious personal injury due wrong power supply

XPS-E is designed exclusively for PELV operation according to EN 60950 /EN 60204 / VDE 0805-1èOnly protective extra-low voltages according to the defined standards

may be used to supply and connect the alarm contact.

NOTICE Electrostatic dischargeThe device contains components that can be damaged or destroyed byelectrostatic dischargeèWhen handling the device, observe the necessary safety precautions

against electrostatic discharge (ESD), in accordance with EN 61340-5-1and EN 61340-5-2, as well as IEC 61340-5-1 and IEC 61340-5-2.

NOTICE ShieldingThe shielding ground of the connected twisted pair cables is electricallyconnected to the female connector.èWhen connecting network segments, avoid ground loops, potential

transfers, and voltage equalization currents via the braided shield.

NOTICE Damage due to subsequent processingAvoid subsequent processing of the FNL.Ø Soldering can cause components to become detached and thus

damage or destroy the module.Ø Please note that the warranty shall become invalid if the products are

changed technically.èSpeak to your contact person at the KUNBUS GmbH about customised

solutions.

Wor

king

with

XP

S-E

Page 5: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 5 / 36

1.5 Limitation of LiabilityWarranty and liability claims will lapse if:– the product has been used incorrectly,– damage is due to non-observance of the operating manual,– damage is caused by inadequately qualified personnel,– damage is caused by technical modification to the product (e.g.

soldering).

1.6 Customer ServiceIf you have any questions or suggestions concerning this product,please do not hesitate to contact us:

KUNBUS GmbHHeerweg 15 C

73770 Denkendorf

Germany

+49 (0)711 3409 7077

[email protected]

Wor

king

with

XP

S-E

Page 6: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 6 / 36

2 IntroductionThe intelligent PROFIBUS-DP gateways of the KUNBUS XPS-Eseries allow the coupling of any serial devices with RS232 orRS422/485 interface to PROFIBUS-DP according to the EuropeanStandard EN50170. The protocol conversions required for thecoupling are executed either by means of a transparent universaldriver or by loadable device-specific converters. The following figureshows a typical connection:

Illustration 1: Typical Connection

Intro

duct

ion

Page 7: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 7 / 36

3 Put into operation

3.1 Connect the Gateway

1 2 3 4

5

678

9

10

Illustration 2: Connectors and Interfaces of the XPS-E

1 Bus Fail LED 2 Run LED3 Address Switch x10 4 Address Switch x15 Connector for power supply 6 Mode-LED7 TxD LED 8 RxD LED9 Serial Interface 10 PROFIBUS Interface

Put

into

ope

ratio

n

Page 8: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 8 / 36

By executing the following steps, the XPS-E Gateway can be set intooperation:

◦ Connect XPS-E to PROFIBUS by using a standard PROFIBUS cablewith corresponding D-SUB PROFIBUS connector. For the connectorassignment please refer to chapter „Connector Assignment and Cabling[} 27]“ and follow the Installation Guidelines for PROFIBUS (No. 2.112,PNO).

◦ Connect the serial end device with XPS-E◦ Check your PROFIBUS network with regard to an unused Slave

address and adjust this free address at the coding switch of XPS-E.◦ Plug in the power supply. 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.

NOTICE The Status/Busfail LED is flashing red until the device isparameterized and configuredIn this status, no data exchange can take place (neither send nor receive).Only after successful parameterization and configuration the Status/RunLED is flashing green. Now, the device is ready for data exchange.

3.2 Test the PROFIBUS connectionIf you have a PROFIBUS-DP configuration tool, you can test thePROFIBUS connection to the XPS-E Gateway. For this purpose,load the deliverable GSD file into your configuration tool.

The DP Master shall now configure XPS-E. If this configuration issuccessful, the Status/Run LED is flashing green.

If you do not have a PROFIBUS-DP configuration tool or if you wishto change the pre-defined parameters (User_Prm_Data) in the GSDfile, please refer to the following chapters for the parameterization.

Put

into

ope

ratio

n

Page 9: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 9 / 36

3.3 ParametrizationThe parameterization data of XPS-E consists of 7 DP-Slave standardbytes and 16 device-specific parameters bytes (User_Prm_data, ->user_prm_len = 16). As user diagnostic data, 8 additional diagnosticsbytes are available. (diag_len = 8).

◦ For initialisation of XPS-E send a set_prm telegram. For this purpose,use the parameters for PROFIBUS-DP and the serial interfacedescribed in chapter 2.5.

◦ Check the parameterization with slave_diag.◦ Then use the command chk_cfg to configure the XPS-E. Prior to that,

the configuration can be read with the command get_cfg from XPS-E. Ifchk_cfg is executed directly after the initialization, the maximumdata_exchange telegram length is loaded from XPE-E. For shorterdata_exchange telegram length select one of the possibleconfigurations which are defined in the GSD file or select thosearbitrarily according to the PROFIBUS-DP standard.

ð After successful parameterization XPS-E is prepared for data exchange.The Status/Run LED is now flashing green.

NOTICE You can verify the parametrization and configuration telegram bymeans of slave_diag.In the following, only those parameters are described that are required foroperating the XPS-E. For the significance of the remaining PROFIBUS- DPstandard parameters please refer to the standard EN50170 and the GSDfile.

Also see about this

2 set_prm Parametrization [} 10]

Put

into

ope

ratio

n

Page 10: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 10 / 36

3.4 set_prm ParametrizationThe Bytes 1-7 are PROFIBUS-DP standard parameters, Byte 8-23are device- specific parameters (usr_prm).

Oktet Parameter Name Value1 Station_status 0x80*2 WD_fact_1 0x003 WD_fact_2 0x004 Min TSDR 555 Ident_Number [0] 0x956 Ident_Number [1] 0x107 Group_Ident 0x008..11 Reserved -12 Baud Rate setting of serial interface See Table „Baud Rate of

Serial Interface“ [} 10]13 Character Transmission Mode of serial

interfaceSee Table „CharacterTransmission Mode“ [} 10]

14 Handshake setting of serial interface See Table „Handshake-Mode“ [} 10]

15 XOFF-Timeout of serial interface See Section „Timeout Soft-ware Handshake/Mod-bus“ [} 10]

16 Receive Mode of PROFIBUS interface See Table „Data Transmis-sion Mode“ [} 10]

17 Receive Mode of PROFIBUS interface See Table „ExtendedGateway configurationdata“ [} 10]

18 Trigger character for serial triggeredmode(usually LF (0x0A)

-

19..23 Reserved -

Table 1: set_prm*Sync_Req and Freeze_Req are not supported.

Put

into

ope

ratio

n

Page 11: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 11 / 36

Next to standard parameters the parameters for the serial interfaceare included in the GSD file. They are listed under theUser_Prm_Data. The values correspond to those described underchapter „set_prm Parameterization”. A modification of theseparameters can be made by any kind of ASCII editor. Please notethat the number of parameters must not be changed and that the firstfour and last six parameter bytes are to be set to 0.

In the following, the default settings of the GSD for serial interfaces ofXPS-E are listed.

9600 Baud / 8Bit / No Parity / 1 Stopbit / no Handshake / noTimeout / 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

Octet 1-7 are PROFIBUS-DP Standard, Octet 8-14 are the device-specific diagnostics parameters (external diagnostics).

Oktet Parameter Value1 Station_status_1 Bit7 Diag.Master_Lock

Bit6 Diag.Prm_FaultBit5 Diag.Invalid_Slave_ResponseBit4 Diag.Not_SupportedBit3 Diag.Ext_DiagBit2 Diag.Cfg_FaultBit1 Diag.Station_Not_ReadyBit0 Diag.Station_Non_Existent

2 Station_status_2 Bit7 Diag.DeactivatedBit6 reservedBit5 Diag.Sync_ModeBit4 Diag.Freeze_ModeBit3 Diag.WD_OnBit2 must be set to 1Bit1 Diag.Stat_DiagBit0 Diag.Prm_Req

3 Station_status_3 Bit7 Diag.Ext_Diag_OverflowBit6..0 reserved

4 Master_Address Master address or 0xFF, if Slave is not yetparameterised.

5 Ident_Number[0] 0x956 Ident_Number[1] 0x107 Number of ext.

diagnostic bytes8

Put

into

ope

ratio

n

Page 12: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 12 / 36

8 XPS-E Status See Chapter „External Device Diagnostics” [} 25]

9 Baud Rate of the serialinterface

See Chapter „Parameterization“, Section„Baud Rate“ [} 10]

10 Character Transmis-sion Mode of serial interface

See Chapter „Parameterization“, Section„Character Transmission Mode“ [} 10]

11 Handshake settingserial interface

See Chapter „Parameterization“, Section „Handshake“ [} 10]

12 XOFF-Timeout ofserial interface

See Chapter „Parameterization“, Section „XOFF“ [} 10]

13 Receive Mode of DP-interface

See Chapter „Parameterization“, Section„Data Transmission Mode“ [} 10]

14 Setting of driver phys-ics of serial interface(RS232/485)

See Chapter„Parameterization“, Section „Data Transmission Mode“ [} 10]

15 Trigger character forSerial triggerd Mode

0x0A

Table 2: slave_diag

Parameter DescriptionThe parameters marked with (*) are the default values. These areused if inadmissible parameters are entered during parameterization.

Baud Rate Baud Rate (bit/s) Value (dec) Value (hex)150 1 0x01300 3 0x03600 6 0x061.200 12 0x0C2.400 24 0x184.800 48 0x309.600 * 96 0x6019.200 192 0xC0

Table 3: Baud Rate of Serial Interface Oktet 12

Put

into

ope

ratio

n

Page 13: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 13 / 36

Character TransmissionMode

Transmission-Mode Value(dec)

Value(hex)

Value(ASCII)

8 Datenbits, No Parity, 1 Stopbit (8N1) * 56 0x38 ‘8’7 Datenbits, No Parity, 2 Stopbits (7N2) 78 0x4E ‘N’7 Datenbits, Even Parity, 1 Stopbit (7E1) 69 0x45 ‘E’7 Datenbits, Odd Parity, 1 Stopbit (7O1) 79 0x4F ‘O’

Table 4: Character Transmisson Mode Oktet 13

NOTICE The operating mode: 7 data bits, No Parity, 1 StopBit is not supported.

Handshake Flow Control If data is exchanged via the serial interface, XPS-E supports thefollowing 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 forcabling can be found under chapter „S [} 29]erial Interface“.

– Software Handshake. The receive data flow can be stopped by therespective device by sending the control character XOFF (0x13). Thesending procedure will only be re-started if a XON character (0x11) isreceived or a Timeout (XOFF-Timeout) for the receipt of the XONcharacter.

The interruption of the sending procedure or the XOFF timeout isshown in the status byte of XPS-E (See Chapter„CommunicationStatus [} 26]“ ) by means of the bit XOFF_CTS_FLAG.

Handshake-Mode Value(dec)

Value(hex)

Value(ASCII)

Hardware Handshake (CTS, RTS for RS232and CONTROL/INDICATION for RS422)

72 0x48 ‘H’

Software Handshake 83 0x53 ‘S’NoHandshake * 78 0x4E ‘N’

Table 5: Handshake-Modi Oktet 14

XOFF/ Modbus_timeout –Timeout SoftwareHandshake/Modbus

The XOFF/Modbus timeout is calculated by means of VALUE *100ms. This value is entered into Octet15 of the parametrizationdata. If no software handshake or no Modbus Mode is selected, thisvalue is insignificant.

NOTICE If the value 0 is given, the timeout is set to 10 seconds.

Put

into

ope

ratio

n

Page 14: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 14 / 36

DP-Data Transmission Mode To offer the user several possibilities to adapt his applicationoptimally to the gateway functionality of XPS-E, 3 data transmissionmodes can be used. The corresponding description is found underchapter „Data Exchange“ ff. [} 15]

Data Transmission Mode Value(dec)

Value(hex)

Value(ASCII)

Poll-Mode * 80 0x50 ‘P’Request-Mode 82 0x52 ‘R’Serial triggered-Mode 83 0x53 ‘S’Modbus RTU 83 0x4D ‘M’Modbus ASCII 83 0x41 ‘A’

Table 6: Data Transmission Mode Oktet 16

Extended Gatewayconfiguration data

Extended configura-tion byte

Bit FunctionBit7 ..Bit2 reservedBit1 Double baud rateBit0 RS232<->RS422

Table 7: Extended configuration byte Oktet 17

– BIT0: RS232<->RS422 – Serial interface physicsWith this parameter the interface physics can be set to RS232(0) orRS485(1).

– BIT1: double BaudrateSetting this bit doubles the baudrate for the serial interfaceExp: A selected baudrate of 19200 Baud can be increased to 38400Baud by setting this bit.

– BIT7 – Bit2: reserved.Trigger character for Serialtriggert mode

Here the trigger character for the serial triggerd mode is set. If theseriell receive data stream contains the same sign, all received dataup to this character are sent to the DP-Master inclusive the triggercharacter.Triggerzeichen eingetragen werden.

Trigger character Value(dec)

Value(hex)

Value(ASCII)

LF * 10 0x0A LF

Table 8: Trigger character Oktet 18

Also see about this2 set_prm Parametrization [} 10]

Put

into

ope

ratio

n

Page 15: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 15 / 36

4 Data exchange

4.1 Send DataTo send data via XPS-E onto a serial end device, the send flag ofXPS-E must be reset (ref. Communication Status, Bit 0 = 0), asotherwise the send data to XPS-E will be discarded. For a send job,the following data must be included into the telegram.– Send job number. This job number must be different for each send

procedure. Reasonably, the value should be incremented by 1 at everysend procedure.

– Send data length. If the data length is set to 0, no data is sent via theserial interface. Otherwise this byte includes the number of the followinguser data.

– Send data (user data)

4.2 Receive DataXPS-E has a 2Kbyte receive data buffer to temporarily store datareceived from the connected serial end device. For data transfer tothe PROFIBUS-DP Master the operating modes Poll mode andRequest-Mode are available. The mode will be selected duringparameterization of XPS-E by the Master (See Chapter„s[} 10]et_prm Parameterization“, Section „DP-Data TransmissionMode“). In the Poll mode available receive data will be sent at everydata_exchange.req with the corresponding data_exchange.res fromXPS-E to the PROFIBUS-DP Master. In the Request mode the XPS-E sends this data only if in data_exchange.req a defined byte hasbeen changed (the receive request number). Thus, the polling ofexisting receive data can be controlled by the Master.

The request mode is recommended for Masters that are polling theslaves cyclically to generate a process image. (application may betoo slow to process the current data of the process image).

Dat

a ex

chan

ge

Page 16: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 16 / 36

Poll ModeIn this mode XPS-E returns with every data_exchange the datareceived up to the present time. Apart from the receive data and theirlengths a receive data number is entered into the telegram. Thisconfirmation number is automatically incremented if new receive datais available in the telegram. If the receive telegram does not containnew data (data length = 0), the confirmation number remainsunchanged.

NOTICE If this mode is used when the Master is generating a Process Imageaccording to a Poll List it must be paid attention that this Poll List canbe read quickly enough as with every data_exchange the processimage will be overwritten. This may cause loss of data on part of theapplication. Loss of data can be noticed when the confirmationnumber is not subsequent.

Illustration 3: Data Reception in Poll Mode

x= Receive Request Number S= Status

The telegrams mentioned above can either be started automaticallyby the Master (cyclically during automatic polling) or by theapplication.

NOTICE The receive request number (X) in Poll Mode may not be set.

Dat

a ex

chan

ge

Page 17: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 17 / 36

1. The data_exchange.req telegram is sent to XPS-E. XPS-E has alreadyreceived the first characters at the interface. It returns them in theresponse telegram data_exchange.res to the Master. The confirmationis incremented by 1 and the length of the reception data is entered.Moreover, the status (S) of XPS-E is returned.

¬

2. New data_exchange.req telegram.XPS-E returns the new data byincrementing the confirmation number by 1.

¬

3. As response telegram to the data_exchange.req telegram, XPS/XPS-Eenters the old confirmation number as no new data has been receivedat the serial interface. The receive data length is set to 0.

¬

4. XPS-E has again received new data. The confirmation number isincremented by one and the data returned correspondingly by thedata_exchange.res telegram to the Master.

¬

If no time guarantee can be given and if data loss has to be excludedunder all circumstances, XPS-E must be run in the request mode.

Serial triggered ModeIn serial triggered mode XPS/XPS-E waits for the termination of thereceive data by the trigger character defined within the external userparameters of XPS-E (usually LF in ASCII-strings). The receiveconfirmation number is not increased as long as no trigger characteris received. After the trigger character is received the Data ExchangeResp.-buffer is updated with the received data inclusive the triggercharacter. The data Exchange Resp.-buffer does not change as longas the next trigger character is received.

Illustration 4: Empfang im Seriell getriggerten–Modus(Endezeichen:0x0A)

x= Receive request number S= Status

Dat

a ex

chan

ge

Page 18: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 18 / 36

NOTICE Please note, that it is not necessary to set the receive request number (X)in polling/serial Mode

1. The data_exchange.req is transmitted to the XPS-E. XPS-E has alreadyreceived data via the serial interface. This data are transmitted withdata_exchange.res back to the DP-Master. The receive confirmationnumber is incremented and data length and status are updated.

¬

2. Next data_exchange.req service. XPS-E responds with the old data.New data are in fact received, but they do not contain the triggercharacter.

¬

3. Next data_exchange.req service. XPS-E responds with the old data,because no further serial data were received.

¬

4. Next data_exchange.req service. XPS-E has received in the meantimethe serial trigger character. The receive confirmation number isincremented, data length, status and data_exchange.res buffer areupdated with the actual data.

¬

Request-ModeIn the request mode the XPS-E only sends receive data if a modifiedreceive-request number is contained in the request telegram. Thedata are not returned in the first response telegram but in theresponse telegram of the subsequent data_exchange service. Thismeans that the data are returned always only in the subsequentcycle of the request. If the response telegram contains received data,the XPS-E confirmation number is incremented by one and returnedin the response telegram (as in the poll mode).

NOTICE If this mode is used while the master is automatically polling the slavesaccording to the poll list, the data that have been received last remain in theprocess image

Dat

a ex

chan

ge

Page 19: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 19 / 36

Illustration 5: Data Reception in Request Mode

S= Status

Dat

a ex

chan

ge

Page 20: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 20 / 36

1. The data_exchange.req telegram is sent to the XPS-E which alreadyhas received the first characters. It returns them, however, only in thesubsequent response telegram data_exchange.res.

¬

2. New data_exchange.req telegram with increased receive-requestnumber (further reception command). XPS-E returns the data receivedat point in time. The confirmation number is increased by one.

¬

3. Another reception command to XPS-E (receive-request number hasbeen increased). The data that are returned are the data received atpoint in time.

¬

4. No further reception command to XPS-E. XPS-E returns again the lastsent data. XPS-E has already received new data.

¬

5. No further reception command to XPS-E. XPS-E returns again the lastsent data.

¬

6. This data_exchange.req contains another reception command. Thedata are returned, however, only at the next cycle.

¬

7. No further reception command because the request number has notbeen increased. The data that are returned are the data received untilthe point in time of the last read command.

¬

Dat

a ex

chan

ge

Page 21: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 21 / 36

Modbus RTU MasterXPS-E works in Modbus RTU Mode as Modbus Master. ModbusSlave is not supported. In Modbus RTU Mode the parameters BaudRate, Data Mode, XOFF/Modbus timeout, Async. hardware modeand Baud Rate Multiplier apply. The parameter XOFF/Modbustimeout is adjusted in multiples of 100 ms and determines the timeoutperiod for a non-responding Modbus Slave.

The configured PROFIBUS DP IO data sizes (see XPS-E GSD file)limit the max. size of the Modbus request and response telegramsexchanged with the PROFIBUS DP Master. The max. possible sizeof a Modbus RTU telegram is 237 Bytes (240 Bytes – 3 Byte headerinformation).

Transmit of a Modbus RTUrequest telegram

Byte Telegram Element Value Range (dec)1 Reserved2 Send request number 0 – 255 (See Chapter

„Send Data" [} 15] )3 Data length N of the following user

data0 – 237 (SeeChapter„Send Data“, Section „Modbus RTU-Master“)

4 Adress Modbus RTU Slave 0 – 2555 Modbus RTU Command 0 – 2556+n Modbus RTU Data 0 – 255

Table 9: Structure of a Modbus RTU Request-Telegram

The telegram buffer consists of 3 byte header and successiveModbus specific application data (from byte 4).

By the header bytes the transmitting of the request telegram iscontrolled. The header bytes are not transmitted to the ModbusSlave.– Byte 1

Reserved– Byte 2

The transmitting of the Modbus request telegram is triggered bychanging the Send request number in Byte 2. The Modbus RTU requesttelegram is automatically generated incl. CRC and transmitted to theModbus slave.

– Byte 3Byte 3 must be set to the size of the Modbus specific application datafrom byte 4

For the detailed structure of the specific Modbus request telegramsplease refer to the Modbus slave user documentation.

Dat

a ex

chan

ge

Page 22: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 22 / 36

Reception of a Modbus RTUresponse telegram

After transmitting a Modbus RTU request telegram, XPS-E waits fora response of the addressed Modbus slave. After the correctreception of the response telegram it is forwarded without CRC to thePROFIBUS DP Master. If no response is received within theconfigured timeout (See Chapter„Send Data“ [} 15], Section „ModbusRTU-Master) XPS-E reports via the receive status byte a timeouterror to the PROFIBUS DP Master.

Byte Telegram Element Value Range (dec)1 Receive status 0 – 2552 Receive confirmation number of

XPS-E0 – 255 (See Chapter„Receive Data“ [} 15])

3 Data size N of the following user data 0 – 237 (See ChapterReceive Data“,[} 15] Section „Modbus RTU Master“).

4..4+N Modbus Data 0 – 255

Table 10: Structure of a Modbus RTU Response-Telegramm

The telegram buffer consists of 3 byte header and successiveModbus specific application data (from byte 4).– Byte 1:Receive status of the Modbus RTU response telegram (Bit set =

status active):

Bit Meaning0 Reserved1 Reserved2 Paritiy error3 Receive data available4 Reserved5 Modbus request too large (max. PROFIBUS Output size-3)6 Modbus response too large (max. PROFIBUS Input size - 3)7 Modbus Timeout

Table 11: Receive status of a Response-Telegram

Dat

a ex

chan

ge

Page 23: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 23 / 36

Status Meaning0x02: Timeout expired. The Modbus slave did not respond within the

configured timeout period0x08: Modbus response telegram correctly received0x20: Modbus request too large (> configured PROFIBUS Output

size-3)0x40: Modbus response too large (> configured PROFIBUS Input

size-3)

Table 12: Status Codes

– Byte 2:If a correct Modbus response telegram is received, the receiveconfirmation number is incremented (+1).

– Byte 3:Stores the data size of the Modbus response telegram

Modbus ASCII MasterThe transmit and reception of Modbus ASCII telegrams complies withthe mechanism for the Modbus RTU Master described in detail inchapter „R [} 15]eceive Data“, Section „Modbus RTU Master.

Every request telegram received from the PROFIBUS DP Master isautomatically extended by a colon (:) as well as the calculated LRCand a CR LF string.

Received response telegrams are checked and forwarded withoutcolon (:), LRC and CR LF string to the PROFIBUS DP Master.

Dat

a ex

chan

ge

Page 24: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 24 / 36

4.3 Send and Receive DataIt is generally possible in both modes to send and receive datasimultaneously. The request telegrams described in the previouschapters then have to be completed only by the entries of thetransmission command (transmission command number, length oftransmission data, data).

Please note that the data are only accepted and transmitted by theXPS-E if the transmission command number in thedata_exchange.req telegram to the XPS-E has changed.

Illustration 6: Combined Send- and Receive Request

Dat

a ex

chan

ge

Page 25: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 25 / 36

5 Status and Error Messages

5.1 External Device DiagnosticsExternal device diagnostics can be realised by means of the service slave_diag Octet 8 of the response telegram contains the device status and is encoded as follows:

Illustration 7: Byte Definition of external Device Diagnostics

1 RS_PORT_CFG_ERROR Invalid parameter at parametrization of serial interface.

2 Not significant

Sta

tus

and

Err

or M

essa

ges

Page 26: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 26 / 36

5.2 Communication StatusIn the status of the confirmation telegram of the servicedata_exchange the status of the serial interface is encoded asfollows:

Illustration 8: Byte Definition of Communication Status

0 RS_PORT_TX_DATA Data are being transmitted.

1 Modbus_TIMEOUT2 RS_PORT_PARITY_ERROR

Parity error of receive data of serial interface.3 RS_PORT_RX_DATA_AVAIL

XPS-E has data in receive buffer.4 XOFF_CTS_

XOFF was received or CTS is inactive.5 OUTPUT_DATA_LEN_FAILURE

user data length exceeds maximal data_exchange length minus 3 (onpart of PROFIBUS)

6 RS_PORT_RX_OVERFLOW Receive buffer overflow

7 XOFF_TOMEOUT No XON received after XOFF- Timeout. Sending process was restar-ted.

Sta

tus

and

Err

or M

essa

ges

Page 27: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 27 / 36

6 Connector Assignment and Cabling

6.1 PROFIBUS

Connector AssignmentThe PROFIBUS connection is executed according to EN50170 as 9-pin female D-SUB with the following assignment:

Pin RS422Ref.

Signal Function Direction

1 - - Shielding -2 - - NC -3 B/B´ RxD/TxD-P Data (+) I/O4 - CNTR-P Control character (+) O5 C/C´ DGND Data Ground -6 - VP Supply for Terminator (+5V) -7 - - NC -8 A/A´ RxD/TxD-N Data (-) I/O9 - CNTR-N Control character l (-) O

Table 13: Connector Assignment PROFIBUSO = Output I= Input

PROFIBUS Terminating ResistorFor correct operation of XPS-E both bus terminations of the linesegment must be provided with a terminator. This terminator mustmatch with the impedance level of the line. Typically, in case of newPROFIBUS installations, Type A will be used. The assignment of theindividual terminating resistors of the terminator is depicted in thefollowing figure.

Illustration 9: Assignment of PROFIBUS Terminator Type A

Con

nect

or A

ssig

nmen

t and

Cab

ling

Page 28: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 28 / 36

Cabling

Illustration 10: Connection of a PROFIBUS-DP Slave within a Segment

T= TerminatorM= MasterS= Slave n<31

If no terminator with independent power supply shall be used (activeterminator), the termination must be realised directly at the laststations of the bus. This station must then supply the terminator withpower. For details regarding the PROFIBUS installation please referto the PROFIBUS Installation Guidelines of the PROFIBUS UserOrganisation (PNO, Order No.: 2.112).

Con

nect

or A

ssig

nmen

t and

Cab

ling

Page 29: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 29 / 36

6.2 Serial Interface

Connector Assignment RS232The connection is realised via a 9-pin D-SUB plug.

Pin Signal FNI CCITT Function Direction1 DCD M5 109 Data Carrier Detect I2 RxD D2 104 Receive Data I3 TxD D1 103 Transmit Data O4 DTR S1 108.2 Data Terminal Ready O5 GND E2 102 Ground -6 DSR M1 107 Data Set Ready I7 RTS S2 105 Request to Send O8 CTS M2 106 Clear To Send I9 - - - Not connected -

Table 14: Pin Assignment RS232 Interface

O= Output I= Input

Cabling RS232RS232-Cabling withoutHardware Handshake

Illustration 11: RS232 Cabling without Hardware Handshake

Con

nect

or A

ssig

nmen

t and

Cab

ling

Page 30: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 30 / 36

RS232-Cabling withHardware Handshake

Illustration 12: RS232 Cabling with Hardware Handshake

RS422 InterfaceThe connection is realised via a 9-pin D-SUB plug.

Pin Signal Function Direction1 I(B) Indicate (-) I2 R(A) Receive Data (+) I3 T(A) Transmit Data (+) O4 T(B) Transmit Data (-) O5 G Ground -6 R(B) Receive data (-) I7 C(A) Control (+) O8 I(A) Indicate (+) I9 C(B) Control (-) O

Table 15: Pin Assignment RS422 Interface

O = Output I= Input

Con

nect

or A

ssig

nmen

t and

Cab

ling

Page 31: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 31 / 36

RS422 Cabling withoutHardware Handshake

Illustration 13: RS422 Cabling without Hardware Handshake

RS422 Cabling withHardware Handshake

Illustration 14: RS422 Cabling with Hardware Handshake

Con

nect

or A

ssig

nmen

t and

Cab

ling

Page 32: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 32 / 36

7 FAQThis section is treating the most frequent application problems andtheir solutions.The most current questions and answers can be foundunder

http://www.kunbus.de

DP-Master Status Message: Status 0xC2 (SAP/Service notactivated)Make sure that the parametrization sequence of the parametrizationdescribed in chapter „Parametrization“ [} 9] has correctly beenexecuted. If necessary, repeat parametrization.

DP-Master Status Message: Status 0xC3 (no acknowledge)Check the following points:– Does the station address of the XPS-E correspond to the setting of the

PROFIBUS Master device?– Are the bus parameters set correctly?– Is the bus terminated correctly (switch position of the terminator

integrated in XPS-E)?– Has XPS-E been connected correctly?

DP-Master Status Message: Status 0xC4 (bad telegram)Check the terminating resistors at the bus. Pay attention to the switchposition of the terminating resistor at the XPS-E.

FAQ

Page 33: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 33 / 36

8 Technical DataPROFIBUS-DP-InterfaceTransmission protocol PROFIBUS-DP acc. to EN50170-3

Slave couplerTransmission rates 9.6Kbit/s, 19.2Kbit/s, 93.75Kbit/s, 187.5Kbit/s,

500Kbit/s, 1.5Mbit/s, 3Mbit/s, 6Mbit/s, 12Mbit/s,automatic adjustment

Potential segregation: Opto-coupler interface and DC/DC transducerIsolation voltage U>500V

Terminator TYP AOperating modes Sync_Req and Freeze_Req are not supported.Addressing 1 - 99 Sync_Req and Freeze_Req are not sup-

ported.Ident-Number 0x9510Parametrization data: 23 Byte ( 16 Byte User Parameter)Diagnostic information 6 Byte system diagnostics acc. to standard

8 Byte device-specific diagnosticsData_Exchange Buffer 4 - 240 Byte I/O selectable (3 Bytes with

header functionality).

RS232-InterfaceInterface RS232 interface with Handshake signals (RTS,

CTS).RS422/485 interface with Handshake signals(CONTROL, INDICATION).Interface physics can be adjusted viaPROFIBUS by means of User_Parameter.

Transmission rates 150bit/s, 300bit/s, 600bit/s, 1.200bit/s, 2.400bit/s,4.800bit/s, 9.600bit/s, 19.200bit/s

Character Transmission 8N1, 7N2, 7E1, 7O1Handshake HW (RTS/CTS, CONTROL/INDICATION),

SW(XON/XOFF), noXOFF Timeout adjustable to max. 25,5 secondsData transmission modes Poll mode, Request mode, serial triggered

modeReceive buffer 2 KBytePotential segregation optional

ConnectionPower Supply 2-pin spring clip 2,5mm

2 without ferrule 1,5mm2 with ferrule

PROFIBUS-DP 9-pin female D-SUB (DIN 41652)RS-Port 9-pin male D-SUB (DIN 41652)

Tech

nica

l Dat

a

Page 34: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 34 / 36

Operating Indicators and ControlsPROFIBUS Status LED “green” means RUN

“red” means BUSFAILRS-PORT Status LED RxD “red” corresponds to: data will be re-

ceivedTxD “red“ corresponds to: data will be sentHardware physics “red” corresponds to:RS232 mode

PROFIBUS address window at coding switch

Technical DataCase synthetic profile with aluminium front panel,

lacqueredDimensions 126mm x 90mm x 38mm (LxWxH)Weight 190gVoltage range 18 – 30VDCPower assumption 100mA (24VDC)Storage temperature -25C .. +70COperation temperature 0C .. +55C non condensingProtection class 1Protection kind IP52Standards CE, EN60950, EN50081-2, EN50082-2

Tech

nica

l Dat

a

Page 35: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 35 / 36

List of FiguresIllustration 1 Typical Connection................................................................................................... 6Illustration 2 Connectors and Interfaces of the XPS-E ................................................................. 7Illustration 3 Data Reception in Poll Mode.................................................................................... 16Illustration 4 Empfang im Seriell getriggerten–Modus(Endezeichen:0x0A).................................. 17Illustration 5 Data Reception in Request Mode ............................................................................ 19Illustration 6 Combined Send- and Receive Request................................................................... 24Illustration 7 Byte Definition of external Device Diagnostics......................................................... 25Illustration 8 Byte Definition of Communication Status................................................................. 26Illustration 9 Assignment of PROFIBUS Terminator Type A ........................................................ 27Illustration 10 Connection of a PROFIBUS-DP Slave within a Segment........................................ 28Illustration 11 RS232 Cabling without Hardware Handshake......................................................... 29Illustration 12 RS232 Cabling with Hardware Handshake.............................................................. 30Illustration 13 RS422 Cabling without Hardware Handshake......................................................... 31Illustration 14 RS422 Cabling with Hardware Handshake.............................................................. 31

List

of F

igur

es

Page 36: User Manual - KUNBUS · The Art may only be assembled, ... The intelligent PROFIBUS-DP gateways of the KUNBUS XPS-E ... The Bytes 1-7 are PROFIBUS-DP standard parameters,

XPS-E 36 / 36

List of TablesTable 1 set_prm.......................................................................................................................... 10Table 2 slave_diag...................................................................................................................... 11Table 3 Baud Rate of Serial Interface Oktet 12 .......................................................................... 12Table 4 Character Transmisson Mode Oktet 13......................................................................... 13Table 5 Handshake-Modi Oktet 14 ............................................................................................. 13Table 6 Data Transmission Mode Oktet 16 ................................................................................ 14Table 7 Extended configuration byte Oktet 17............................................................................ 14Table 8 Trigger character Oktet 18............................................................................................. 14Table 9 Structure of a Modbus RTU Request-Telegram ............................................................ 21Table 10 Structure of a Modbus RTU Response-Telegramm....................................................... 22Table 11 Receive status of a Response-Telegram....................................................................... 22Table 12 Status Codes ................................................................................................................. 23Table 13 Connector Assignment PROFIBUS ............................................................................... 27Table 14 Pin Assignment RS232 Interface................................................................................... 29Table 15 Pin Assignment RS422 Interface................................................................................... 30

List

of T

able

s