TREBING + HIMSTEDT SPI 3 Manual

Serial-profibus-interface
Hide thumbs Also See for SPI 3:

Advertisement

Quick Links

SERIAL-PROFIBUS-INTERFACE | SPI 3
for Fieldbus devices with a serial interface
MODBUS RTU
Contents SPI 3 – SIMATIC S5/S7 (up to SPI 3 Release 12)
Contents Online Documentation
Doc. Version 3.2

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SPI 3 and is the answer not in the manual?

Questions and answers

Summary of Contents for TREBING + HIMSTEDT SPI 3

  • Page 1 SERIAL-PROFIBUS-INTERFACE | SPI 3 for Fieldbus devices with a serial interface MODBUS RTU Contents SPI 3 – SIMATIC S5/S7 (up to SPI 3 Release 12) Contents Online Documentation Doc. Version 3.2...
  • Page 2 Dear customer This online documentation is designed to help you with engineering, connecting up, con- figuration and parameter setting of the SPI 3. Please feel free to contact our Technical Support department if you need further help: Trebing & Himstedt Prozessautomation GmbH & Co. KG Technical Support Dept.
  • Page 3: Table Of Contents

    About this Online Documentation ................3 Safety notes .......................... 4 Safety notes for the planning stage ............... 4 Safety notes for installation and operation of the SPI 3 ......... 5 Overview of the SPI 3 ......................6 Connections and interfaces ................6 Mounting the device ..................
  • Page 4: Introduction

    Data is exchanged between the DP master and the SPI 3 in the form of telegrams or tele- gram fragments through a data channel, the size of which can be configured to adapt it to the telegram length and the size of the PLC I/O area.
  • Page 5: Scope Of Delivery

    About this Online Documentation Please 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.
  • Page 6: Safety Notes

    MODBUS RTU Safety notes Safety notes for the planning stage Observe the general rules for PROFIBUS components when planning the SPI 3 installa- tion. Please observe the following to avoid risk to personnel and damage to equipment and to ensure that the SPI 3 functions correctly: Safety regulations –...
  • Page 7: Safety Notes For Installation And Operation Of The Spi 3

    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.
  • Page 8: Overview Of The Spi 3

    · GND Signal ground terminal · PE Protective ground 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 –...
  • Page 9: Indicating Elements

    (see »Error diagnosis and remedies« on page 24): – RUN: lights continuously if supply voltage 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 –...
  • Page 10: Mounting And Connecting Up The Spi 3

    Attaching the SPI 3 to the top-hat rail – Hook the SPI 3 onto the top-hat rail and snap it into place. In order to remove the SPI 3 from the top-hat rail, pull out the orange locking clip with a suitable tool.
  • Page 11: Connecting Up To The Profibus

    We recommend you to use connectors from ERNI and Sie- mens. If the SPI 3 is installed at the beginning or end of the PROFIBUS cable segment, you should use PROFIBUS connectors which contain an integrated terminating resistor.
  • Page 12: Setting Up The Spi 3

    MODBUS RTU Setting up the SPI 3 In order to set up the SPI 3, you need to configure it, set the parameters and install the function blocks in your PLC programming software or, if you do not use SIMATIC control, establish the function blocks (see following chapter).
  • Page 13: Setting Parameters For The Spi 3

    Setting up the SPI 3 MODBUS RTU Setting parameters for the SPI 3 When you configure the SPI 3 with the PROFIBUS configurator, you will be prompted to choose the required parameters from a menu. You can set the following parameters: MODBUS RTU see »SPI 3-specific parameters«...
  • Page 14 – Copy the FB into your SPS program. Enter FB command parameters (see »Parameters for data transfer for SIMATIC S5 or … SIMATIC S7«). – Execute further steps for your SPS program (integrate SPI 3 in hardware catalogue, select module, adjust SPI 3-specific parameters, create DB, command FB etc.).
  • Page 15: Checking The Spi 3 For Correct Operation

    Refer to »Error diagnosis and reme- dies« on page 24 for details of how to locate the fault. If no errors were detected, the SPI 3 is ready for use and you can use it for transferring data.
  • Page 16: Exchanging Data Using The Simatic Fb's

    Exchanging data using the SIMATIC FB’s MODBUS RTU Exchanging data using the SIMATIC FB’s Data exchange between MODBUS and PROFIBUS via the SPI 3 is controlled by function blocks (FB’s) [you can download: www.t-h.de]: Function blocks for SIMATIC S5 – FB205 (for a 4 word I/O area), –...
  • Page 17: Parameters For Data Transfer For Simatic S5

    The data to be exchanged is copied to a data block (DB), from where it is sent by the PLC to the SPI 3 through the DP master; the data block is also used to store the user data re- ceived from the SPI 3.
  • Page 18 DB-W DB for internal use, length = ANZA + 7 words Note! DB-W is used for internal buffering and must be provided once for each SPI 3 device. You must not exceed 16 words of user data per data exchange.
  • Page 19: Writing Data

    Exchanging data using the SIMATIC FB’s MODBUS RTU 0x04 Slave device faulty 0x05 Acknowledge, slave cannot process data immediately 0x06 Slave Busy, repeat the service later 0x07 Negative acknowledge 0x08 Memory parity error 0xFF Timeout – the slave did not respond within the specified timeout Bit 3, 5…7 internal use by the FB, do not change Writing data...
  • Page 20: Reading Data

    Exchanging data using the SIMATIC FB’s MODBUS RTU Reading data Proceed as follows to read data with the FB Start from a MODBUS slave: – Initialize the parameters for the FB. Set FB – Call the FB repeatedly while bit 0 (Operation parameters is executing) is 1.
  • Page 21: Parameters For Data Transfer For Simatic S7

    The data to be exchanged is copied to a data area (data block or marker area), from where it is sent by the PLC to the SPI 3 through the DP master; the data block is also used to store the user data received from the SPI 3.
  • Page 22 Exchanging data using the SIMATIC FB’s MODBUS RTU The following parameters must be specified when calling FB105 and FB125: Parameters for address information: specify the location of the send and receive array in the PLC address space. Name Type Description / function A-Anfang Pointer Starting address of send data area, e.g.
  • Page 23 Exchanging data using the SIMATIC FB’s MODBUS RTU Parameters for return codes: contain information on the status or processing results of the FB; also used to transfer commands (e.g. reset) to the FB. Name Type Description / function TimeOUT Word Timeout in units of 10 ms (must be larger than the gateway timeout) ANZW Word...
  • Page 24: Writing Data

    Exchanging data using the SIMATIC FB’s MODBUS RTU Writing data Proceed as follows to write data with the FB: Start – Copy the data to be written to the user data area »Data«. Senddata – Initialize the parameters for the FB. in Data –...
  • Page 25: Reading Data

    Exchanging data using the SIMATIC FB’s MODBUS RTU Reading data Proceed as follows to read data with the FB from a Start MODBUS slave: – Initialize the parameters for the FB. Set FB – Call the FB repeatedly while bit 0 (Operation is parameters executing) is 1.
  • Page 26: Error Diagnosis And Remedies

    MODBUS RTU Error diagnosis and remedies If errors are detected, the pattern of flashing of the PB and RUN LED’s on the SPI 3 can be used for error diagnosis. The LED’s can flash with the following patterns (this is called the “LED code”):...
  • Page 27 Communication OK – Serial partner communicat- – SPI 3 working correctly ing correctly with the SPI 3 If errors occur during communication, you can also carry out PROFIBUS diagnostics with the DP master. The device-specific diagnostics data contains the following information:...
  • Page 28: Technical Specifications

    I/O area (PROFIBUS-DP)** words 2, 4 Certification Max. number of fieldbus devices** 32 (RS 485); 1 (RS 232, RS 422) * See label on the SPI 3 for information on the serial interface which is fitted ** Depends on the protocol...
  • Page 29: Appendix

    The module codes are used to select the operating mode of the SPI 3 (see »Configuring the SPI 3« on page 10). The module codes in the configuration telegram should be specified as follows: –...
  • Page 30: Spi 3-Specific Parameters

    Appendix MODBUS RTU SPI 3-specific parameters The following 9 bytes of the parameter telegram (bytes 7 to 15) contain SPI 3-specific pa- rameters (see table). Note! The hex value for slave response timeout must be specified in Motorola format (high byte first).
  • Page 31: Creating A Modbus Telegram

    Note! The SPI 3 is MODBUS-Master. The checksum (CRC) is calculated automatically by the SPI 3. You find the description of the MODBUS functions e.g. in »MODBUS Protocol Reference Guide« (see http://www.modicon.com). Function 01: Read Coil Status...
  • Page 32 Appendix MODBUS RTU Function 02: Read Input Status Request to the slave Slave response Byte Contents Hex code (e.g.) Contents Hex code (e.g.) Byte 1 Slave Address Slave Address Byte 2 Function Function Byte 3 Starting Address High Byte Count Byte 4 Starting Address Low Data (Inputs 10204-10197)
  • Page 33 Appendix MODBUS RTU Function 05: Force Single Coil Request to the slave Slave response Byte Contents Hex code (e.g.) Contents Hex code (e.g.) Byte 1 Slave Address Slave Address Byte 2 Function Function Byte 3 Coil Address High Coil Address High Byte 4 Coil Address Low Coil Address Low...
  • Page 34 Appendix MODBUS RTU Function 16: Preset Multiple Regs Request to the slave Slave response Byte Contents Hex code (e.g.) Contents Hex code (e.g.) Byte 1 Slave Address Slave Address Byte 2 Function Function Byte 3 Starting Address High Starting Address High Byte 4 Starting Address Low Starting Address Low...
  • Page 35: Glossary

    Glossary Glossary → Station address Address ANZW 16 bit in-out variable for sending commands to an FB and re- ceiving return values. Abbreviation for binary digit, the smallest unit in the binary sys- tem; it can have the value 0 or 1. Cable with two defined ends which is used for exchanging data between the connected bus stations.
  • Page 36 Data channel A logical channel for exchanging data with the SPI 3. The size of the data channel (i.e. I/O area) is dependent on the SPI 3 configuration. If a telegram is larger than the data channel, it needs to be fragmented.
  • Page 37 Mirror The input byte 0 of a data channel is called the mirror. The SPI 3 mirrors (returns a copy of) the stamp (q.v.) to confirm the oper- ation or when user data is being processed. Mirror = 0 indicates that the DP slave is ready for data exchange.
  • Page 38 Glossary MODBUS MODBUS RTU is implemented according to the Reference Guide “Modicon PI-MBUS-300, Rev. D”. Module Selecting a module during device configuration determines the configuration telegram and thus the size of the PLC I/O area. Most Significant Bit Non-floating With non-floating I/O devices, the reference potentials of control circuits and power circuits are electrically interconnected and are not galvanically isolated.
  • Page 39 The DP master sends a telegram to a Fieldbus device through the SPI 3. Send channel Data channel for data which is sent to the SPI 3. Slave Bus station which is only allowed to exchange data with a mas-...
  • Page 40 Glossary Stamp The output byte 0 of a data channel is called the stamp. Stamp = 0 indicates that the master is ready for data exchange. If stamp = 0, output byte 2 contains information on the length of the following user data. Stamp ≠...
  • Page 41 Glossary Version code Indicates the version of a product and is always incremented when the hardware or software in the product is updated or modified. The version code can be seen on the first and second page of this online documentation at the bottom left. →...
  • Page 42: General Conditions

    General conditions General conditions Änderungsrecht / Right to make changes Trebing & Himstedt Prozessautomation GmbH & Co. KG behält sich das Recht vor, das vorliegende Handbuch sowie die Eigenschaften der Hard- und Software jederzeit weiterzuentwickeln, auch ohne dieses vorher anzukündigen oder über Änderungen zu berichten. Trebing &...
  • Page 43 Documentation No. 10001240 © Trebing & Himstedt Prozessautomation GmbH & Co. KG...

Table of Contents