TREBING + HIMSTEDT SPI 3 User manual

Doc. Version 4.0 | July 2006
Dear customer
This online documentation is designed to help you with engineering, connecting up,
configuration 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.
Wilhelm-Hennemann-Str. 13
19061 Schwerin, Germany
Telephone: +49 385 39572-500
Telefax: +49 385 39572-22
E-mail: [email protected]
Homepage: http://www.t-h.de
The information in this online documentation is the property of Trebing & Himstedt
Prozessautomation 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 manual and to the SPI 3 device at any time without prior
notification.
All product names used in this online documentation are trademarks or otherwise
protected by law, even if this is not specifically mentioned.

Table of Contents
Introduction .............................................................................................................. 4
Scope of delivery ........................................................................................... 5
About this online documentation ................................................................... 5
Safety notes ............................................................................................................ 6
Overview of the SPI 3 ............................................................................................... 8
Implementation guideline .............................................................................. 9
Installing the SPI 3 ................................................................................................. 10
Connecting up to a fieldbus device with serial interface (MODBUS slave) . 11
Connecting up to the PROFIBUS ................................................................ 11
Starting up the SPI 3 .............................................................................................. 13
SPI 3 Configuration ..................................................................................... 14
SPI 3 Parameters ........................................................................................ 15
Checking the SPI 3 for correct operation ................................................................ 18
Using data channel with »MODBUS_Master + Kanal« module and FB 127 .......... 20
Parameters for data transfer for SIMATIC S7 ............................................. 21
Error diagnosis and remedies ................................................................................ 25
Technical specifications ......................................................................................... 27
Appendix ................................................................................................................ 28
Creating function blocks .............................................................................. 28
Telegram for data transfer without fragmentation ....................................... 29
Telegram for data transfer with fragmentation ............................................ 32
Creating a MODBUS telegram .................................................................... 37
Glossary ................................................................................................................. 42
General Regulations ............................................................................................... 48

Introduction
4Trebing & Himstedt | SPI 3 | MODBUS RTU
Introduction
The SPI 3 (SERIAL-PROFIBUS-INTERFACE 3) allows a PROFIBUS-DP master to
communicate with a fieldbus device with a serial interface (MODBUS slave). This
allows the serial fieldbus device to function as a real PROFIBUS station, whereby the
SPI 3 converts the data to be exchanged between the PROFIBUS-DP master and the
serial fieldbus device into a format which is compatible with the other device.
Data are exchanged between the DP master and the SPI 3 in the form of telegrams
through a data channel, the size of which can be configured. Data exchange between
MODBUS slave and SPI 3 (MODBUS master) is controlled by the SPI 3. Different
MODBUS functions are executed depending on the configuration.
The SPI 3 is easy to install and configure and a separate program for configuration or
parameter 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 19.2 kbit/s
· Versions available for RS232, RS422 or RS485 serial interface
· Does not require special configuration software
· Simple and fast integration in PROFIBUS-DP networks
· I/O range configurable
Example for SPI 3 interface module overview
PROFIBUS
serial data transmission
PLC
Software Tool
GSD
SPI 3 | DP Slave
MODBUS Slave
SPI 3 | MODBUS Master
DP Master
(PLC)

Introduction
5
MODBUS RTU | SPI 3 | Trebing & Himstedt
Scope of delivery
Documentation & Media Kit (optional, not included in delivery)
The documentation & media kit contains this online documentation, example projects
for STEP 7, and the GSD file. You can download the documentation & media kit from
the internet (www.t-h.de). You need the GSD file for the PLC project.
About this online documentation
Please read this online documentation before starting the installation work. It contains
important 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.
SPI 3 Quick start guide

Safety notes
6Trebing & Himstedt | SPI 3 | MODBUS RTU
Safety notes
Safety notes for the planning stage
Observe the general rules for PROFIBUS components when planning the SPI 3
installation.
Please observe the following to avoid risk to personnel and damage to equipment and
to ensure that the SPI 3 functions correctly:
– Safety regulations–Observe the guidelines in the
VDE 0100 regulations for handling electrical
components,
– Observe the applicable safety and accident prevention
regulations.
Assembly personnel The SPI 3 must only be installed or de-installed by qualified
technical personnel with appropriate electrotechnical
qualifications.
PROFIBUS standard Observe the guidelines in the PROFIBUS standard IEC
61158.
Bus cable Bus wiring should only take place using special screened,
twisted pair PROFIBUS cable. The high data transfer rates
can only be guaranteed with the correct cable type.
Cable lengths Refer to the PROFIBUS norm for information on maximum
cable lengths for PROFIBUS.
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 integrated terminating resistor. We recommend
use of connectors from ERNI and Siemens. If the bus is
incorrectly terminated, this can lead to errors in data transfer
or to damage to other stations on the bus.
Bus connectors You should only use commercially available PROFIBUS
connectors for connecting the bus. We recommend using
connectors from ERNI and Siemens.
Cable screen Screened cables are less sensitive to interference due to
electromagnetic fields. With screened cables, the
interference currents are led to ground through the
screening rail, which is electrically connected to the case. To
ensure that the interference currents which flow through the
screening do not themselves interfere with other devices, it
is important to provide a low impedance connection to the
protective ground. Observe the following rules for the
screens of the PROFIBUS cable and the serial interface
cable:

Safety notes
7
MODBUS RTU | SPI 3 | Trebing & Himstedt
– The braiding of the screening should have a degree of
coverage of more than 80 %.
– The screening should include a braided screen and
should not consist solely of foil screening, since the latter
can be easily damaged by cable tension and pressure.
– To ensure good immunity to interference at high
frequencies as well, the screening of the cable should be
attached to the screening rail at both ends of the cable.
Safety notes for installation and operation of the SPI 3
Please observe the following before connecting up the SPI 3 to avoid risk to
personnel and damage to equipment and to ensure that the SPI 3 functions correctly:
– The SPI 3 is designed as an interface between fieldbus devices with serial
interfaces and the PROFIBUS. Do not use the SPI 3 for any other purpose.
– The SPI 3 may only be installed or de-installed by qualified technical personnel with
appropriate electrotechnical qualifications. When connecting up the SPI 3, you
must observe 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 and do not make any modifications to the
device.
Warning!
Small objects or liquids must not be allowed to enter the case of the SPI 3
(e.g. through the ventilation slots) since this could damage the device.
Never cover up the ventilation slots in the case.
Large temperature differences between the storage location and installation
site can cause condensation to form within the case of the SPI 3, which can
damage the device. If large temperature differences are present, you should
wait at least 3-4 hours after installing the SPI 3 and before switching on the
power.

Overview of the SPI 3
8Trebing & Himstedt | SPI 3 | MODBUS RTU
Overview of the SPI 3
1 Power supply connections
2 PROFIBUS interface
3 Serial interface
4 Stop lever for top-hat rail
5 Turn-switch for PROFIBUS address
6 Display elements
Connections and interfaces
– Power feed
– 24 V Screw terminal for external 24 V power supply
– GND Signal ground terminal
– PE Protective ground terminal
– PROFIBUS interface
– Serial interface (RS232, RS422 or RS485 see label on SPI 3)
Mounting the device
– Stop lever for releasing/fixing the SPI 3 from/on a 35 mm DIN top-hat rail (top-
hat rail not included in delivery)
Operating elements
– Two rotary switches for setting the PROFIBUS address
– Switch for setting the tens value
– Switch for setting the unit value
232
24V
GND
PE
422 485
Station
RUN
SERIAL-PROFIBUS-INTERFACE SPI 3
PB
TX
x
10
x
1
RX
2
4
3
6
5
1
1
2
3
4
5

Overview of the SPI 3
9
MODBUS RTU | SPI 3 | Trebing & Himstedt
Indicating elements
LEDs to indicate operating states:
– RUN: lights continuously if supply voltage is present,
flashes in case of errors (see »Error diagnosis and remedies« on page 25)
– PB: lights up if the SPI 3 has been configured by the master and is operational,
flashes in case of errors (see »Error diagnosis and remedies« on page 25)
– 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.
Implementation guideline
Please procede through the following steps for start-up:
– Mount the SPI 3 (see »Installing the SPI 3« on page 10).
– Connect the SPI 3 to power supply (see »Connecting up the power feed« on
page 10).
– Connect the SPI 3 to the serial field device (see »Connecting up to a fieldbus device
with serial interface (MODBUS slave)« on page 11).
– Connect the SPI 3 to the PROFIBUS (see »Connecting up to the PROFIBUS« on
page 11).
– Configure and parameterize the SPI 3 via PROFIBUS configurator (see »Starting
up the SPI 3« on page 13).
6
!$
R e l e a s e 1 2 %

Installing the SPI 3
10 Trebing & Himstedt | SPI 3 | MODBUS RTU
Installing the SPI 3
Mounting the SPI 3
– Place the SPI 3 with the gap onto the top-hat rail and swivel the SPI 3 downward
until the stop lever locks on the top-hat rail.
Warning!
Head space of 5 cm minimum for heat flow is required above and below the
SPI 3.
Dismounting the SPI 3
– Remove the connected supply and signal wires (serial, PROFIBUS, voltage).
– Stick a screwdriver in the slot of the stop lever at the SPI 3.
– Press the screwdriver in the direction of the SPI 3 while at the same time swivelling
the SPI 3 away from the top-hat rail.
Connecting up the power feed
Danger!
Incorrect grounding of the SPI 3 can injure personnel and damage
equipment.
Make sure that the SPI 3 is correctly grounded.
Warning!
Although the SPI 3 is protected against polarity reversal, connecting up the
power feed 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
corresponding screw terminals 24 V, GND and PE.
SPI 3
Top-hat rail
Stop lever

Installing the SPI 3
11
MODBUS RTU | SPI 3 | Trebing & Himstedt
Connecting up to a fieldbus device with serial interface (MODBUS
slave)
Note!
To ensure that the SPI 3 functions without errors, you should use a
screened cable for connecting to the serial fieldbus device.
– Ensure that the Sub-D connector for the serial interface uses the pin assignments
shown in »Technical specifications« on page 27 (connect the cable screen to the
case of the sub-D connector).
– Attach the sub-D connector for the serial interface to the serial interface socket
on the SPI 3.
Connecting up to the PROFIBUS
Note!
You should only use commercially available PROFIBUS connectors for
connecting to the bus. We recommend theuseof connectors from ERNI and
Siemens.
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. We recommend using connectors from ERNI and
Siemens.
To ensure that the SPI 3 functions without errors, you must ground the
screen of the PROFIBUS cable.
– Ensure that the PROFIBUS connector uses the pin assignments shown in
»Technical specifications« on page 27.
– Attach the PROFIBUS connector to the PROFIBUSinterface 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
PROFIBUS address on the SPI 3 before switching on the power, or turn off
the power briefly after changing the PROFIBUS address.
You should only use addresses between 01 and 99.
– The PROFIBUS address is set with the two rotary switches.
3
2

Installing the SPI 3
12 Trebing & Himstedt | SPI 3 | MODBUS RTU
Example: In order to set the PROFIBUS address 68, turn the rotary switch for the 10’s
to 6, and the rotary switch for the units to 8.
Bus terminating resistor
Terminations of a PROFIBUS network must each be terminated with a bus
terminating resistor. Use standardized plugs with integrated terminating resistors.
Figure: Bus termination configuration for PROFIBUS (see PROFIBUS Norm)
Note!
Please observe the following when using the depicted passive terminating
resistor: Is the feeding voltage (+5 V) supplied by the device (SPI 3), the
PROFIBUS is shorted via the resistors when the device is disconnected
from voltage. PROFIBUS communication can be interrupted or completely
break down until the device is re-energized.
Use active resistors to avoid this problem, as in this case the terminating
resistors are fed with +5 V and GND independently from the device.
1 390 ΩPull-up resistance from Pin 3 to positive supply voltage at Pin 6
2 220 ΩCable terminating resistor between Pin 3 and Pin 8
3 390 ΩPull-Down resistor from Pin 8 to data reception potential at Pin 5
RUN
PB
TX
RX
X
10
X
1
Station
+5 V DC/DC
(Pin 6) Data+
(Pin 3) Data–
(Pin 8) GND DC/DC
(Pin 5)
[1] [2] [3]

Starting up the SPI 3
13
MODBUS RTU | SPI 3 | Trebing & Himstedt
Starting up the SPI 3
To start up the SPI 3, you need to configure the device and set parameters.
Configuration and parameterization are done via PROFIBUS configurator (PLC
programming tool).
– Start the PROFIBUS configurator of the DP master (PLC programming tool).
– Load the »THDP0091.GSD« GSD file for the SPI 3 into the configurator (GSD by
download: www.t-h.de).
– Configure the SPI 3 and set the parameters as described in the configurator online
help or user manual.
Select the respective modules for configuration. To set parameters, select specific
parameters for each module configured.
Figure: Display example of a MODBUS register in PROFIBUS DP I/O data blocks
with the SPI 3
Register – MODBUS Slave
Coil
0
200
10
90
1 Byte
1 Word
Input Register
0
100
20 8 Words
Input
20
600
40
400
4 Words
16 Words
Holding
1000
2000
1020
1900
1070
1 Word
1 Word
2 Words
MB_REG_WRITE_1W Coil 2 Byte 90
MB_REG_READ_1W Holding 2 Byte 1020
MB_REG_READ_16W Input 32 Byte 400
MB_REG_WRITE_1W Holding 2 Byte 1900
MB_REG_WRITE_1B Coil 1 Byte 10
MB_REG_READ_4W Input 8 Byte 40
MB_REG_READ_8W Input_Reg 16 Byte 90
MB_REG_READ_2W Holding 4 Byte 1070
I/O Field – Modules SPI 3
Module Name
Module Name LengthType Start Adress
MODBUS_Master_Kopf (specific parameters, no data channel)
MODBUS_Master + Kanal (specific parameters, 4-word data channel)
MB_REG_... ∑ Modules max. 33
max. 244 Byte Input
max. 244 Byte Output ∑ Byte max. 256

Starting up the SPI 3
14 Trebing & Himstedt | SPI 3 | MODBUS RTU
SPI 3 Configuration
The configuration telegram consists of the »MODBUS_Master_Kopf« or
»MODBUS_Master + Kanal« module and further modules for the respective I/O fields
listed in the table.
Always start with the »MODBUS_Master_Kopf« module (standard use) or
»MODBUS_Master + Kanal«.
After module selection, you need to set the parameters specific for this module (see
»SPI 3 Parameters« on page 15).
Now you can use the modules listed in the table (SPI 3 Release 15 and higher).
Note!
You can insert a maximum of 33 modules (1 »MODBUS_Master...« and 32
»MODBUS_REG_...«). A maximum of 244 input bytes and/or 244 output
bytes can be used. The total number of input and output bytes must not
exceed the value of 256 bytes (memory limit in the SPI 3).
Observe data consistency when using I/O fields bigger than 2 words
(depending on PLC used).
The SPI 3 always sends data for all configured modules in full length to the
MODBUS slave. Module MB_REG_Write_1B is an exception. You can use
Module Name I/O Field Description
MODBUS_Master + Kanal 4 words Specific SPI 3 parameters, 4-word data channel.
Data channel can only be used in connection
with function blocks.
MODBUS_Master_Kopf –Specific SPI 3 parameters, no data channel.
MB_REG_WRITE_1B 1 byte
Specific module parameters such as function
(read/write) and size of the part to be depicted
from the MODBUS register of the field device
(see figure on page 13).
You can set the different MODBUS functions for
the selected module through parameterization
(see next chapter).
MB_REG_WRITE_1W 1 word
MB_REG_WRITE_2W 2 words
MB_REG_WRITE_4W 4 words
MB_REG_WRITE_8W 8 words
MB_REG_WRITE_16W 16 words
MB_REG_READ_1B 1 byte
MB_REG_READ_1W 1 word
MB_REG_READ_2W 2 words
MB_REG_READ_4W 4 words
MB_REG_READ_8W 8 words
MB_REG_READ_16W 16 words

Starting up the SPI 3
15
MODBUS RTU | SPI 3 | Trebing & Himstedt
this module to send data bit by bit (see following figure).
Figure: Bits sent with Module MB_REG_WRITE_1B from SPI 3
SPI 3 Parameters
You must set specific parameters for each configured module. The modules:
»MODBUS_Master_Kopf« and »MODBUS_Master + Kanal« contain general
parameters which you select depending on the connected MODBUS slave. You can
look up required parameters in the MODBUS slave guide. For all other modules with
I/O field, select the MODBUS register type (COIL [COIL1...COIL8], INPUT,
INPUT REGISTER, HOLDING) as well as the corresponding start address.
SPI 3 specific parameters for the »MODBUS_Master_Kopf« and
»MODBUS_Master + Kanal« modules
The first 7 bytes (bytes 0…6) of the parameter telegram contain bus-related
parameters which are standardized in PROFIBUS norm. The following 10 bytes (byte
7 to byte 16) in the table of the parameterizing telegram contain SPI 3 specific
parameters. When using the »MODBUS_Master + Kanal« module, an additional
function block needs to be installed or generated (see »Installing the FB 127 function
block« on page 17).
COIL – MODBUS Slave Module MB_REG_WRITE_1B
LenghtType
COIL2 2 Bit
COIL6 6 Bit
COIL4 4 Bit
COIL8 1 Byte
COIL1 1 Bit
COIL3 3 Bit
COIL5 5 Bit
COIL7 7 Bit
Bit
Bit(s) sent
01234567

Starting up the SPI 3
16 Trebing & Himstedt | SPI 3 | MODBUS RTU
SPI 3 specific parameters for modules with I/O field
The following 3 bytes (byte 17 to byte 19) of the parameterizing telegram contain
Byte Parameter Value Hexacode Default
7 Fixed parameter No changes possible 0x0D 0x0D
8 MODBUS baud 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
0x00
0x01
0x02
0x03
0x04
0x05
0x06
0x07
9600 (0x06)
9 Parity No parity
Even parity
Odd parity
Mark parity
Space parity
0x00
0x01
0x02
0x03
0x04
Even (0x01)
10+11 Timeout slave response
Delay time of slave
response in 10 ms
(0-65535) × 10 ms)
0-65535 0x0000
to
0xFFFF
100 (0x00; 0x64)
12 Number of repeats
(number of telegram
repeats if slave fails to
answer within timeout)
1-255 0x01
to
0xFF
3 (0x03)
13 Writing mode
(Original data are sent to
the MODBUS slave either
always (repeated) or only
in case of changes (single))
Repeated writing
Single writing 0x00
0x01 Repeated writing (0x00)
14+15 Idle time in 10 ms
(0-1000) × 10 ms
(Delay time for telegram
transmission to the
MODBUS slave)
0-1000 0x0000
to
0x03E8
0 (0x00)
16 MODBUS slave address 1-247 0x01
0xF7 1 (0x01)

Starting up the SPI 3
17
MODBUS RTU | SPI 3 | Trebing & Himstedt
SPI 3 specific parameters.
Installing the FB 127 function block
Note!
You only need the function block when using the »MODBUS_Master +
Kanal« module. A detailed FB description is included in the chapter »Using
data channel with »MODBUS_Master + Kanal« module and FB 127« on
page 20.
The FB 127 function block is only applicable for SIMATIC S7 controls. If you
use other controls, you need to create the function block yourself (see
appendix)..
You can either check the function block with the example project or directly install it in
your existing project. You only need to open the example project with the PLC
programming software (STEP 7):
1. Test example project (connection of MODBUS client required):
– Start PLC programming software.
– Open the example project.
– Adapt the applied PLC hardware.
– Execute PLC Erase Program.
– Load the project into the PLC.
After successful loading and subsequent SPS RUN, the LEDs RUN and PB will light
on the SPI 3 (see also: »Checking PROFIBUS communication« on page 18).
Byte Parameter Value Hexacode Default
14 MODBUS register type
READ
MODBUS register type
WRITE
COIL
INPUT
INPUT_REG
HOLDING
COIL
COIL1
COIL2
COIL3
COIL4
COIL5
COIL6
COIL7
COIL8
HOLDING
0x01
0x02
0x04
0x03
0x0F
0x2F
0x4F
0x6F
0x8F
0xAF
0xCF
0xEF
0x0F
0x10
COIL (0x01)
HOLDING (0x10)
15+16 MODBUS register start
address 0-9999 0x0000
to
0x270F
0 (0x00; 0x00)

Checking the SPI 3 for correct operation
18 Trebing & Himstedt | SPI 3 | MODBUS RTU
2. Load function block in an existing project:
– Start PLC programming software.
– Open the example project.
– Copy the FB 127 into your PLC program. Enter FB command parameters (see
»Using data channel with »MODBUS_Master + Kanal« module and FB 127« on
page 20).
– Execute further steps for your PLC program (integrate SPI 3 in hardware catalog,
select modules, adjust SPI 3-specific parameters, create DB, command FB etc.).
– Proceed further as described in the handbook or online support of the PLC
programming software.
The SPI 3 is ready for use after installation of the function block.
Checking the SPI 3 for correct operation
Several checks should be run before using the SPI 3 for data transfer.
Checking SPI 3 power feed
– At this stage, do not attach either the PROFIBUS interface or the serial interface.
– Switch on the power feed for the SPI 3.
The RUN LED should light continuously. If this is not the case, there is a fault in the
24 V power feed. Refer to »Error diagnosis and remedies« on page 25 for details of
how to locate the fault.
Checking PROFIBUS communication
– Connect up the PROFIBUS interface cable.
– Switch on the power feed for the SPI 3 (RUN-LED lights up).
– Start the DP master which has previously been configured for the SPI 3.
The PB LED should light continuously. If this is not the case, there is an error in the
PROFIBUS communication. Refer to »Error diagnosis and remedies« on page 25 for
details of how to locate the fault.
Checking serial interface communication
– Connect up the PROFIBUS interface cable and the serial interface cable.
– Switch on the power feed for the SPI 3 (RUN-LED lights up).
– Start the DP master which has previously been configured for the SPI 3 (PB-LED
lights up).
The RUN LED should light continuously. If it does not light, or it only flashes, there is

Checking the SPI 3 for correct operation
19
MODBUS RTU | SPI 3 | Trebing & Himstedt
an error in the communication with the serial device. Refer to »Error diagnosis and
remedies« on page 25 for details of how to locate the fault.
If no errors were detected, the SPI 3 is ready for use. During data transfer, the TX or
RX LEDs will flash (see »Indicating elements« on page 9).
Evaluating PROFIBUS diagnosis telegrams
In case of communication failures (PROFIBUS and/or MODBUS), the SPI 3 sends a
diagnosis telegram on DP master request. The diagnosis telegram contains general
PROFIBUS diagnosis data (see PROFIBUS Norm) as well as manufacturer-specific
diagnosis data.
You can evaluate the diagnosis telegram through the DP master and/or a PROFIBUS
diagnosis tool (e.g. the PROFIBUS Scope).
Hexacode – Significance Remedy
17
– Invalid MODBUS start address Check the default start address for the paramete-
rized module with the help of the data sheet for
the MODBUS slave (MODBUS register).
21
– MODBUS no response Check the cable connection to the MODBUS
slave as well as the MODBUS slave address
which is set and parameterized.
22
– MODBUS frame error Check the cable connection to the MODBUS
slave. Check the default start address for the
parameterized module.

Using data channel with »MODBUS_Master + Kanal« module and FB 127
20 Trebing & Himstedt | SPI 3 | MODBUS RTU
Using data channel with »MODBUS_Master + Kanal«
module and FB 127
The additional data channel can be used with the »MODBUS_Master + Kanal«
module and a function block (FB; FB for SIMATIC STEP 7 in the Media Kit, available
per download: www.t-h.de). If you use another control/ configuration software, you
need to create the FB yourself (see appendix).
Function block for SIMATIC S7
– FB 127 allows processing of MODBUS telegrams which have been sent or received
via the SPI 3. This FB uses an I/O field with 4 words. SFC14 and 15 for data
consistency are already included in the FB 127.
Parameters must be set for calling the FB 127 (you can also use the example project).
The example project is intended as a guide only.
Note!
The FB is only applicable for SIMATIC S7 controllers.
The example project for SIMATIC S7 uses the following hardware: S7 315
2DP; order No. 6ES7 315-2AF01-0AB0.
The FB supports the following MODBUS functions:
Function 1 Read Coil Status
Function 2 Read Input Status
Function 3 Read Holding Registers
Function 4 Read Input Registers
Function 5 Force Single Coil
Function 6 Preset Single Register
Function 15 Force Multiple Coils
Function 16 Preset Multiple Register
Other manuals for SPI 3
4
Table of contents
Other TREBING + HIMSTEDT Recording Equipment manuals