TREBING + HIMSTEDT GPA-NS-011236 Manual Download Page 1

Doc. version 3.1

SERIAL-PROFIBUS-INTERFACE SPI 3

for Fieldbus devices with a serial interface

ASCII | 3964R | RK512

Contents SPI 3 – SIMATIC S5/S7 (up to SPI Release 11)

Contents Online Documentation

Summary of Contents for GPA-NS-011236

Page 1: ...Doc version 3 1 SERIAL PROFIBUS INTERFACE SPI 3 for Fieldbus devices with a serial interface ASCII 3964R RK512 Contents SPI 3 SIMATIC S5 S7 up to SPI Release 11 Contents Online Documentation ...

Page 2: ...l support t h de homepage http www t h de The information in this online documentation is the property of Trebing Himstedt Pro zessautomation GmbH Co KG This online documentation or extracts thereof may only be duplicated or passed on to third parties following explicit written approval from Trebing Himstedt Prozessautomation GmbH Co KG The right is reserved to make changes to this online document...

Page 3: ...3 10 Configuring the SPI 3 11 Setting parameters for the SPI 3 12 Installing the function blocks 13 Checking the SPI 3 for correct operation 14 Checking the SPI 3 power feed 14 Checking the PROFIBUS communication 14 Checking the serial interface communication 14 Exchanging data using the SIMATIC FB s 15 Parameters for data transfer for SIMATIC S5 16 Parameters for data transfer for SIMATIC S7 18 D...

Page 4: ...e telegram length and the size of the PLC I O area The data channel consists of a send channel and a receive channel The SPI 3 is easy to install and configure and a separate program for configuration or pa rameter setting is not necessary Configuration is done using the respective PROFIBUS DP master Features of the SPI 3 DP slave at up to 12 Mbit s Serial baud rates up to 57 6 kbit s Versions ava...

Page 5: ...lease read this online documentation before starting the installation work It contains im portant information on planning your system connecting up and configuring the SPI 3 and on parameter setting The online documentation uses the following keywords and symbols Danger Risk of injury to personnel due to electric shock Warning Risk of damage to equipment Note Indicates useful tips 24V GND PE RUN P...

Page 6: ... Terminating resistors Terminating resistors must be used if the SPI 3 is installed at the beginning or end of the PROFIBUS cable segment In this case you should use PROFIBUS connectors which contain an integrat ed terminating resistor We recommend you to use connectors from ERNI and Siemens If the bus is incorrectly terminated this can lead to errors in data transfer or to damage to other station...

Page 7: ...installed by qualified technical personnel with ap propriate electrotechnical qualifications When connecting up the SPI 3 you must ob serve the guidelines in the VDE 0100 regulations for handling electrical equipment Always mount the SPI 3 on a suitable top hat rail The cables used to connect up the SPI 3 should not apply any mechanical forces to the device Danger Never open the case of the SPI 3 ...

Page 8: ...nd terminal PROFIBUS interface Serial interface RS232 RS422 or RS485 see label on SPI 3 Mounting the device Spring loaded orange clip for releasing the SPI 3 from the top hat rail Operating elements Two rotary switches for setting the PROFIBUS address Switch for setting the tens value Switch for setting the units value 2 4 V G N D P E R U N P B T X R X X 1 0 X 1 S t a t i o n 2 4 3 6 5 1 1 2 3 4 5...

Page 9: ...is present flashes in case of errors PB lights up if the SPI 3 has been configured by the master and is operational flashes in case of errors TX flashes if data is being sent to the serial interface RX flashes if data is being received from the serial interface Release The following information is indicated on the SPI 3 back panel Article No Release No Serial No 6 R e l e a s e 1 2 ...

Page 10: ...ed with incorrect polarity for extended periods can damage the device Make sure that the power feed is connected with correct polarity Connect the cables for 24 V power feed ground and protective ground to the corre sponding screw terminals 24 V GND and PE Connecting up to a fieldbus device with serial interface Note To ensure that the SPI 3 functions without errors you should use a screened ca bl...

Page 11: ...the PROFIBUS connector uses the pin assignments shown in Technical specifications on page 26 Attach the PROFIBUS connector to the PROFIBUS interface socket on the SPI 3 and secure the connector with the retaining screws Setting the PROFIBUS address Note The SPI 3 only updates its PROFIBUS address during a restart Set the PROFI BUS address on the SPI 3 before switching on the power or turn off the ...

Page 12: ...s on the market it is only possible to give a general overview of the process of configuration and parameter setting Start the PROFIBUS configurator on the DP master Insert the diskette with the device database files GSD into the diskette drive of the programming device usually a PC Load the SPI 3 GSD file THDP0091 GSD in the configurator Configure the SPI 3 and set the parameters as described in ...

Page 13: ...nstructured ASCII driver 3964R RK512 MODUL_C1DFDF01 32 words unstructured ASCII driver 3964R RK512 MODUL_C1FFFF01 64 words unstructured ASCII driver 3964R RK512 ASCII 3964R RK512 modules with extended parameters for application of release 12 an higher in connection with FBs 100 101 103 200 201 203 control data stamp mirror in byte 0 and byte 1 ASCII_Prm ____2W_i o 2 words unstructured ASCII driver...

Page 14: ...tructured ASCII driver 3964R RK512 see SPI 3 specific parameters on page 28 Data transfer rate Flags only available in modules with extended parameters Handshake mode ASCII code for the Xon character only required for Xon Xoff handshake ASCII code for the Xoff character only required for Xon Xoff handshake Parity Character frame Character timeout response timeout see Glossary on page 30 Data trans...

Page 15: ...t the applied SPS hardware the exact name of the applied hardware in the ex ample project is to be found in the readme_e txt file Execute SPS Erase Program Load the project into the SPS After successful loading and subsequent SPS RUN the LEDs RUN and PB will light on the SPI 3 see also Checking the PROFIBUS communication on page 14 The TX LED flashes 2 Load function blocks in an existing project S...

Page 16: ...ntinuously If this is not the case there is an error in the PROFIBUS communication Refer to Error diagnosis and remedies on page 24 for de tails of how to locate the fault Checking the serial interface communication Connect up the PROFIBUS interface cable and the serial interface cable switch on the power feed for the SPI 3 start the DP master which has been configured previously start the communi...

Page 17: ...ample project The example project is intended as a guide Don t forget to set the length of the I O area in your program to match the module you have chosen in example OB1 EA L is set for an I O area of 4 data words in length Note The function blocks FB s are only suitable for SIMATIC S5 and S7 controllers see online documentation In the case of SIMATIC S5 controllers you may need to adapt the FB t...

Page 18: ...dress space Parameters for user data specify the location of the send receive data blocks used for exchanging telegrams Parameters for processing RK512 telegrams specify the send and receive data blocks used for RK512 telegrams DW0 Internal use only DW5 Internal use only Start of user data DW6 User data DW L DWX End of user data Name Type Description Function present in FB200 FB201 FB203 A A KF St...

Page 19: ...t 0 1 For FB200 and FB201 Operation is executing For FB203 Telegram is being received Bit 1 1 For FB200 Operation completed For FB201 Telegram has been received For FB203 Telegram is being sent Bit 4 1 Reset the operation Set bit 4 to 1 to cancel the operation Bit 4 is set to 0 again by the FB when the operation has been reset Bit 2 3 5 15 internal use by the FB do not change Note FB203 for SIMATI...

Page 20: ... array in the PLC address space Parameters for user data specify the location of the send receive data blocks used for exchanging telegrams Start of user data DW0 User data Length DWX End of user data Name Type Description function present in FB100 FB101 FB103 A_Anfang POINTER Starting address of send data area z B M2 0 A5 0 DB10 DBX8 0 X X X E_Anfang POINTER Starting address of receive data area ...

Page 21: ...cked Don t forget to take account of the different addressing of data words used by the S5 and the S7 In OB121 write 0xFF to DBB0 with DB_Senden This creates an error telegram for a job with a non existing DB Name Type Description function present in FB100 FB101 FB103 DB_Empfangen Block_DB Data block for received RK512 telegrams e g DB37 X DB_Senden Block_DB Data block for RK512 telegrams to be se...

Page 22: ...103 Telegram is being sent Bit 4 1 Reset the operation Set bit 4 to 1 to cancel the operation Bit 4 is set to 0 again by the FB when the operation has been reset Bit 2 3 5 15 internal use by the FB do not change Data consistency only for S7 You must use the system functions SFC14 and SFC15 if you are using a firmware module with an I O area of more than 2 words This copies the n words of inputs to...

Page 23: ... and receive RK512 telegrams exist and are long enough otherwise the FB will output an error telegram FB203 for S5 FB103 for S7 Sending data S5 and S7 Proceed as follows to send data Copy the data to be sent to the user data area DW6 to DWX for S5 DW0 to DWX for S7 of the source data block DB Call the Send data FB FB200 for S5 FB100 for S7 re peatedly while bit 0 Operation is executing is 1 The da...

Page 24: ... Operation is executing is 1 the FB receives the data and stores it in the des tination data block When the FB has received all the data it sets bit 1 Telegram has been received to 1 The received data is now available in the destina tion data block Reset the FB by setting bit 1 Telegram has been received to 0 The FB is then ready to receive again comparison End ANZW Bit 1 1 no yes TH FD008e Start ...

Page 25: ... See Configuring the size of the data blocks S5 and S7 on page 21 for more information Note Data blocks DB Q DB Z DB_Empfangen and DB_Senden are only used for in ternal processing by the FB Following a boot or restart carry out a reset by setting bit 4 of ANZW to 1 Call the appropriate FB cyclically The FB will now process the received RK512 telegrams automatically Note The FB works only as a pass...

Page 26: ...ong LED on LED always off LED is off on LED is off on LED is off on LED always on PB LED code Status Significance Remedy PB LED off Correct data transfer rate could not be determined No PROFIBUS master in the network Connect up the DP master Check the wiring PB LED short No DP master available A master is available but it is not a DP master A master is available but communication is not tak ing pl...

Page 27: ... off SPI 3 not ready 24 V supply not present Check external power sup ply Check the wiring RUN LED short Interface error Interface parameters invalid Check the parity e g you have chosen 7 data bits without parity although 7 data bits requires parity RUN LED medium Send error Error when sending Check the wiring Check whether the partner station is ready this error should only occur with 3964 and d...

Page 28: ... Sub D connector Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Pin 6 Pin 7 Pin 8 Pin 9 Screen Unused B line Request to Send RTS Ground for 5 V M5 5 V galvanically isolated P5 Unused A line Unused Serial interface Interface type RS 232 RS 422 RS 485 Data transfer rate Bit s 110 300 600 1 200 2 400 4 800 9 600 19 200 28 800 38 400 57 600 Data frame Bit 7 8 Parity Even odd none mark space Pin assignment Sub D connec...

Page 29: ...01 16 words I O area ASCII_Prm ____16W_i o C1CFCF01 32 words I O area ASCII_Prm ____32W_i o C1DFDF01 64 words I O area ASCII_Prm ____64W_i o C1FFFF01 Creating a parameter telegram If you cannot or do not want to use a configurator for setting the SPI3 parameters you will need to create a parameter telegram The parameter telegram contains both stan dardized bus related parameters and device specifi...

Page 30: ...t Cannot be changed 0x00 0x00 10 Constant Cannot be changed Module dependent 0x01 simple param 0x08 extended param Module dependent 0x01 0x08 11 Data transfer rate 110 Bit s 300 Bit s 600 Bit s 1200 Bit s 2400 Bit s 4800 Bit s 9600 Bit s 19200 Bit s 28800 Bit s 38400 Bit s 57600 Bit s 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 9600 0x06 12 Flags Lock diagnosis alarms Release diagnosis ...

Page 31: ...m identifica tion is to be executed exclusively by a sign or telegram length character timeout needs to be set at 0 Maximum telegram length cannot exceed 255 bytes Telegrams are automati cally fragmented in case of telegram lengths surpassing this value In case of manufacturer specific application of sartorius scales you need to sel ect an even parity and a smaller character timeout 18 19 Characte...

Page 32: ...ed to detect the end of a telegram in the case of an unstruc tured flow of ASCII data The telegram currently being received is considered to be completed when the time between two re ceived characters is larger than the specified character timeout Command byte Stamp Configuration During configuration the modules and the addresses of the DP slave are assigned The actual configuration describes the ...

Page 33: ...faults and messages DP PROFIBUS DP address ID number used to uniquely identify each bus device station in PROFIBUS DP DP standard Bus protocol for PROFIBUS DB which is standardized in EN 50 170 Floating Indicates that a component or circuit is not electrically connect ed to ground Fragment Part of a telegram which is transferred through a data channel FREEZE Control command that a DP slave receive...

Page 34: ...d between a master and slave after the master and the slave have agreed that the exchange should take place ID byte Configures the number and size of the bytes to be transferred in a module Input byte PLC address area which contains the data that the DP slave sends to the DP master IP 20 Protection class specification to DIN 40 050 Components of the device which carry voltages are protected agains...

Page 35: ...the parameter master passes pa rameter information to the DP slave The parameter master can write to and read from the slave and change the configuration of the slave Parameter setting To set the behavior of a DP slave and its modules Parameter telegram Contains all parameters which can be set for a DP slave Parity Even parity The sum of all 1 s in a byte must be an even num ber Odd parity the sum...

Page 36: ...grated in the PLC CPU but is accessed remotely via the bus Response monitoring If a slave is not accessed within the response monitoring time out it switches automatically to a safe status by setting all out puts to 0 The response monitoring timeout is specified during parameter setting Response timeout The duration of time within which the partner device must re spond The response timeout must be...

Page 37: ...from the DP master It causes the slave to store freeze the current states of its out puts When following telegrams are received it stores the out put data but the states of the outputs remain unchanged The outputs are only cyclically updated again after the slave re ceives the UNSYNC command Telegram A data flow which is sent or received through the serial interface SIO e g when you send a text to...

Page 38: ...modified The version code can be seen on the first and second page of this online documentation at the bottom left Word Data word Xon With software flow control the Xon control character indicates readiness to receive complement of Xoff Xoff With software flow control the Xoff control character indicates unreadiness to receive complement of Xon ...

Page 39: ...can lead to the following types of fault at a later stage premature failure of components and modules fluctuation of typical performance characteristics intermittent faults temperature dependent faults An electrostatic discharge can only be perceived by humans if the voltage is high enough However lower electrostatic voltages which are below the limits of perception can still damage or destroy ele...

Page 40: ...Documentation No 10001240 Trebing Himstedt Prozeßautomation GmbH Co KG ...

Reviews: