Professional Documents
Culture Documents
Mounting
Commissioning
Transmission Protocol
Diagnostics
Application Sample
SIMATIC S7
OPEN MODBUS / TCP
Communication via
CP343-1 and 443-1
Manual
Appendices
Literature
Glossary
Edition 3.0
This manual contains warnings, which you should note for your own safety as well as for
the prevention of damage to property. These warnings are indicated by means of a triangle
and displayed as follows in accordance with the level of danger:
__________________________________________________________________
Danger
indicates that loss of life, severe personal injury or substantial damage
will result if proper precautions are not taken.
__________________________________________________________________
__________________________________________________________________
Warning
indicates that loss of life, severe personal injury or substantial damage can result if proper
precautions are not taken.
__________________________________________________________________
__________________________________________________________________
Caution
indicates that minor personal injury or property damage can result if proper precautions are
not taken.
__________________________________________________________________
__________________________________________________________________
Notes
call attention to information that is especially significant to the product, handling of the
product or a specific part of this documentation.
__________________________________________________________________
Qualified
Personnel
The equipment may be commissioned and put into operation by qualified personnel only.
For the purpose of safety relevant warnings of this manual a qualified person is one who is
authorized to commission, ground and tag devices, systems and circuits.
Use as prescribed
The other brand names in this manual may be trademarks use of which by third parties for
their purposes may infringe the proprietors rights.
Siemens AG
Industrial Solution and Services
IT4Industry
P.O. Box 3240, D- 91050 Erlangen
IT4Industry@siemens.com
Siemens AG 2004
We reserve the right to make technical changes.
Preface
Preface
Purpose of the
Manual
The information in this manual allows you to set up and put in operation the
connection between the CP 343-1/CP 443-1 and a device that supports the
Open MODBUS/TCP protocol.
Contents of the
Manual
This manual describes the function of the function block MODBUS and the
integration into the hardware and software of the communications processor
CP 343-1/CP 443-1.
The manual contains the following topics:
Production description / Mounting
Commissioning / Installation / Parameterization
Function block
Transmission protocol
Diagnostics
Application sample
Scope of this
Manual
Identification number
From version
2XV9 450-1MB00
3.0
2.2
1.0
Note
This manual contains the FB description, as it is valid at the time of
publication
Preface
Additional
Sources of
Information
Additional
Questions
If you have further questions regarding the use of the FBs described in this
manual, which are not answered in this document, please contact your
Siemens partner who supplied you with this function block.
Terminology
This document uses the term CP or CP 343/CP 443. The descriptions only
apply to communications processor CP 343-1/CP 443-1.
Scope of
Application
Table of contents
Table of Contents
1 ...... Product Description....................................................................................................... 1-1
1.1 ........ Field of Applications.......................................................................................... 1-1
1.2 ........ Hardware and Software Prerequisites.............................................................. 1-2
2 ...... Mounting ......................................................................................................................... 2-1
2.1 ........ Interface Connection ........................................................................................ 2-1
3 ...... Commissioning .............................................................................................................. 3-1
3.1 ........ Installing the Library on the STEP7 PG/-PC .................................................... 3-1
3.2 ........ Configuration of the Communication Link ........................................................ 3-2
3.3 ........ Parameterisation of the CP .............................................................................. 3-3
3.4 ........ Network Configuration ...................................................................................... 3-4
3.5 ........ Insertion of the Function Blocks into the Program............................................ 3-6
3.6 ........ Start_up Characteristics of CP343 / CP443 ..................................................... 3-7
4 ...... Function Block MODBUS .............................................................................................. 4-1
4.1 ........ Functionality of the FB ...................................................................................... 4-1
4.2 ........ Parameters of the Function Block MODBUS ................................................... 4-3
4.3 ........ Parameters of the Function Block MODB4 .................................................... 4-10
4.4 ........ Data and Standard Functions used by the FB ............................................... 4-12
5 ...... Transmission Protocol .................................................................................................. 5-1
5.1 ........ Overview ........................................................................................................... 5-1
5.2 ........ Function Code 03 Read Holding Registers ................................................... 5-3
5.3 ........ Function Code 16 Write Holding Register ..................................................... 5-4
5.4 ........ Exception Code Telegram ................................................................................ 5-5
5.5 ........ Function Code 04 Read Input Registers ....................................................... 5-6
5.6 ........ Further Sources of Information......................................................................... 5-6
6 ...... Diagnostics..................................................................................................................... 6-1
6.1 ........ Diagnostics via the Display Elements of the CP .............................................. 6-1
OPEN MODBUS / TCP communication via CP343-1 and 443-1
2XV9450-1MB00; Manual edition 3.0
Table of contents
ii
Product description
Product Description
1.1
Field of Applications
Placement in the
System Environment
Function of the FB
TCP/IP with
CP343-1 / CP443-1
TCP/IP with CP 343-1 and CP434-1 uses static connections. The TCP
connection is not disconnected during operation.
Network configuration of STEP7 enables only a unique use of a specific
port number, when using TCP native stack of the CP. Therefore the CP/FB
is not capable to be addressed from different devices by the same port
number.
1-1
Product description
1.2
Usable Modules
Software Versions
The usage of the FB MODBUS is possible with STEP7 Version 5.1 or higher
with the option NCM S7 for Industrial Ethernet.
Memory
requirements
The FB MODBUS requires 8800 byte work memory and 9886 byte load
memory.
The FB MODB4 requires 9818 byte work memory and 11082 byte load
memory.
1-2
Mounting
2.1
Mounting
Interface Connection
General
Information
Bus Coupler
(Transceiver) via
AUI-Connection
The CP produces and supplies the required voltage for the Bus Coupler.
Transceiver cable
Plugable cable 727-1
Bus coupler
Industrial Twisted
Pair Connection
e. g via OSM
E. g. Optical Switch
Module (OSM)
2-1
Mounting
Twisted Pair
Connection via
RJ45connector
In an environment with low EMC pollution like offices and switchboards, the
CP can be connected to the Ethernet using a Twisted Pair cable with a RJ-45
connector.
E. g. Optical Switch
Module (OSM)
Additional
Information
Note
An AUI/ITP connector or a TP connector may be connected for a flawless
connection.
When hardware is changed (a cable is disconnected and plugged to another
interface) during the run mode it is possible that the new connection (change)
is not recognized. Therefore, the device must be turned off before you change
the interface.
2-2
Commissioning
Commissioning
General
Information
Requirements
3.1
What We Provide
You
The library with the Function blocks for your S7 project can be found on the
enclosed CD.
The CD additionally contains this documentation in electronic format and a
sample STEP7 project.
Requirements
To install, STEP7 must be installed together with the option NCM S7 for
Industrial Ethernet.
Installation
3-1
Commissioning
3.2
Introduction
S7 Project
Before you can do the configuration, you must have created a new S7
Project on STEP7.
Project
Components
Configure
Hardware
3-2
Commissioning
SIMATIC 400-Station
By selecting the SIMATIC 400-Station and double clicking Hardware (or
Edit Open object) HW Config will be started. With Insert Hardware
components insert from SIMATIC 400 a RACK-400, a PS-400, a CPU-400,
and from CP-400 the CP Industrial Ethernet CP 443-1 with the appropriate
order numbers.
The procedures for the configuration of S7 400-devices are described in detail
in the users manual for STEP7.
3.3
Parameterization of the CP
Parameterization
of the CP
After the devices are arranged on your rack with HW Config they have to be
parameterized.
The parameterization window of the CP 343-1 or CP 443-1 can be started in
HW Config by double clicking the CP or selecting the CP and clicking the
menu item Edit Object properties.
Properties CP343-1 General or
Properties CP443-1 General
Click on tab General, then select Properties (single click). This will open
the Ethernet interface window.
Here you can enter the IP Address and the Subnet Mask of the CP. If you
have your stations connected with each other without a router, then they have
to be within the same subnet.
In the field Subnet connect the CP with the Industrial Ethernet. In order to do
that, select the entry with the name of your network. For newly created
networks this is normally Ethernet(1)
After the successful parameterization you will be back in the dialog box,
Properties CP343-1 or Properties CP443-1. Here click on OK to
finish the parameterization of the CP and you will be back in the dialog box
HW Config.
Save and Compile the parameterization and close HW Config. You will be
back in the main menu of the STEP7 project.
Parameterization
of the
Communication
Partner
After you have inserted the communication partners station into your STEP7
project (as described in Project components: Insert Other station) you
have to specify the object properties of the external station.
Starting from the STEP7 project, you can select the communication partner
(Other station) by clicking it.
3-3
Commissioning
3.4
Network Configuration
Communications
Connection
The CP is the link for the Industrial Ethernet connection between the S7-CPU
and the communication partner / bus. A connection configuration must be
made for the connection of the interfaces to the communication partner / bus.
Configure Network
In the STEP7 project, select the CPU in your S7 300/S7 400-Station and open
Network configuration by double clicking Connections. This opens the
program NetPro with which your connections can be configured.
After selecting Insert New Connection... the dialog box Insert new
connection will come up. Select the connection partner (Other Station) for the
new connection and use TCP Connection for the connection. Put a check
mark on Show properties dialog
Click OK. This will take you back to the dialog box Properties TCP
connection.
3-4
Commissioning
Object Properties
of the Connection
Unspecified
Connection
If you have got a communication with CP as MODBUS server, and you did
not know the port number of the client, the communication can be set up as
unspecified connection. But the client has to meet the requirement of active
connection establishment.
You do not need an other station in your S7-project in that case. After
selecting Insert New Connection... the dialog box Insert new connection
will come up. Select here unspecified instead of the communication partner
and use TCP Connection for the connection. Put a check mark on Show
properties dialog
Click OK. This will take you back to the dialog box Properties TCP
connection.
Active connection establishment must not be activated, in the register
addresses all information regarding the partner, IP and PORT are left
blank.
Click on OK and the inputs are accepted.
3-5
Commissioning
3.5
Content of
MODBUS library
Insertion of the
MODBUS FBs
In order to exchange data with MODBUS devices, you need the function block
MODBUS. To be able to insert this into your project you have to copy the
function block from the library. For that, open the library Modbus_TCP by
selecting the menu item File Open. In the dialog box Open Project select
the tab Libraries. Select the library Modbus_TCP using the BrowseButton and click OK.
This opens the library. Select the function block FB MODBUS and copy it via
Edit Copy.
Then change back to your project by selecting Window Your project.
In the Step7 project, in your opened S7 300/S7 400-Station, select the CPU.
Double click S7-program, and then Blocks.
This will open the Blocks folder.
Select Edit Paste. This will insert the block into your program.
Insertion of the
Communication
Blocks
The function block MODBUS uses the function blocks AG_SEND and
AG_RECV or AG_LSEND and AG_LRECV in S7-400. These should be
inserted into your program. You can find these communication function blocks
in the library SIMATIC_NET_CP which are included in the software
package NCM S7 for Industrial Ethernet. Open the library by selecting File
Open. In the dialog box Open Project select the tab Libraries.
Select the library SIMATIC_NET_CP and click OK.
This will open the library.
CP 300
For CP 300 family open the folder CP 300 by double clicking it. Select the
function FC5 (AG_SEND) and FC6 (AG_RECV) and copy it with Edit
Copy. Then change back to your project by selecting Window Your
Project.
Select in the STEP7 project in your opened S7 300-Station the CPU. Open
the Blocks folder by double clicking S7-Programm and then Blocks.
With Edit Paste, insert the function block into your program.
3-6
Commissioning
CP 400
For CP 400 family, open the folder CP 400 by double click. Select the
function FC50 (AG_LSEND) and FC60 (AG_LRECV) and copy it with Edit
Copy. Then change back to your project by selecting Window Your
Project.
Select in the STEP7 project in your opened S7 400-Station the CPU. Open
the Blocks folder by double clicking S7-Programm and then Blocks.
With Edit Paste, insert the function block into your program.
Please note, that the following versions of the FCs are a prerequisite for the
faultless function of the FB MODBUS:
S7/400:
AG_LSEND
AG_LRECV
V3.0 or higher
V3.0 or higher
S7/300:
AG_SEND
AG_RECV
V4.2 or higher
V4.7 or higher
Important!
The communication blocks must not be renamed to another block number.
They have to be used with their original number FC5/6 or FC50/60.
3.6
Introduction
Initialization
As soon as the CP is connected to power, the hardware self test runs. The
firmware of the CP is set up for operation.
Parameterization
3-7
4.1
Functionality of the FB
General
Information
Call of the FB
Calls the standard functions for the data transfer between the CPU
and the CP
The function block has to be called both in the start up OB100 as well as in
the cyclic OB1.
For each connection of NETPRO either FB MODBUS or FB MODB4 can be
called.
It is not allowed to call FB MODBUS in cyclic interrupt organization blocks
(e. g. OB35).
Start Up of the FB
Cyclical Operation
of the FB
4-1
Initiate Request
CP is Client
Activation of the
Function Block
CP is Server
With TRUE signal at the trigger input ENQ_ENR the FB is ready for receiving
a request telegram from the client. The server remains passive.
The received telegram is verified. If the telegram is verified positive, the
response telegram is sent. The completed transmission is reported to the
user by setting the DONE_NDR bit.
At this point the completed function is indicated at the outputs
START_ADDRESS, READ_WRITE, LENGTH, UNIT and TI.
A faulty request telegram causes an error message and the ERROR bit is
set. The error number is returned in STATUS. The request of the client is not
answered.
Data Transfer
CPU CP
The data transfer between CP and CPU are done with the standard function
blocks AG_SEND and AG_RECV.
At the activation of a MODBUS request by the user (CP is client) or at the
receipt of a telegram from the client (CP is server) the standard blocks
necessary for the CP are called by the FB in the right order and number.
At the receipt of a telegram, the first 6 Bytes are read with the function
AG_RECV. This header contains the length of the rest of the telegram. A
second call of the AG_RECV function follows with the rest of the telegram
length. The verification of the received data takes place after the complete
receipt of the data.
TCP/IP with
CP343-1 / CP443-1
TCP/IP with CP 343-1 and CP434-1 uses static connections. The TCP
connection cannot be disconnected while in run mode.
Given this system characteristic, telegrams might be lost under unfavorable
conditions when the synchronization had been lost after an error. The function
of the FB in these situations is described in chapter 6.
4-2
4.2
Parameter
Decl.
Type
Description
ID
IN
WORD
Value range
Init
1 to 64
yes
W#16#1 to
W#16#40
LADDR
IN
WORD
CPU
dependent
yes
TIMER_NR
IN
TIMER
CPU
dependent
yes
MONITOR
IN
WORD
1 to 999
no
DB_1
IN
WORD
W#16#1 to
W#16#3E7
1 to 65535
yes
W#16#1 to
W#16#FFFF
START_1
IN
WORD
0 to 65535
yes
W#16#0000 to
W#16#FFFF
END_1
IN
WORD
0 to 65535
yes
W#16#0000 to
W#16#FFFF
DB_2
IN
WORD
1 to 65535
yes
W#16#1 to
W#16#FFFF
IN
WORD
0
0 to 65535
yes
W#16#0000 to
W#16#FFFF
END_2
IN
WORD
0 to 65535
yes
W#16#0000 to
W#16#FFFF
DB_3
IN
WORD
1 to 65535
yes
W#16#1 to
W#16#FFFF
IN
WORD
0
0 to 65535
yes
W#16#0000 to
W#16#FFFF
END_3
IN
WORD
0 to 65535
yes
W#16#0000 to
W#16#FFFF
4-3
Parameter
Decl.
Type
Description
DB_4
IN
WORD
Value range
Init
1 to 65535
yes
W#16#1 to
W#16#FFFF
IN
WORD
0
0 to 65535
yes
W#16#0000 to
W#16#FFFF
END_4
IN
WORD
0 to 65535
yes
W#16#0000 to
W#16#FFFF
DB_5
IN
WORD
1 to 65535
yes
W#16#1 to
W#16#FFFF
IN
WORD
0
0 to 65535
yes
W#16#0000 to
W#16#FFFF
END_5
IN
WORD
0 to 65535
yes
W#16#0000 to
W#16#FFFF
WRITE_
PROTECT1
IN
BOOL
TRUE
FALSE
yes
WRITE_
PROTECT2
IN
BOOL
TRUE
FALSE
Yes
WRITE_
PROTECT3
IN
BOOL
TRUE
FALSE
yes
WRITE_
PROTECT4
IN
BOOL
TRUE
FALSE
yes
WRITE_
PROTECT5
IN
BOOL
TRUE
FALSE
yes
ENQ_ENR
IN
BOOL
CP is Client:
Initiate request at TRUE signal
TRUE
FALSE
no
CP is Server:
Ready to receive at TRUE signal
SERVER_
CLIENT
IN
DONE_NDR OUT
BOOL
TRUE
FALSE
yes
BOOL
CP is Client:
Active request finished without errors
TRUE
FALSE
no
TRUE
FALSE
no
0 to FFFF
no
CP is Server:
Request from the client was executed and
answered
ERROR
OUT
BOOL
STATUS
OUT
WORD
Error number
4-4
Parameter
Decl.
Type
Description
START_
ADDRESS
IN/
OUT
WORD
LENGTH
IN/
OUT
BYTE
Value range
Init
0 to 65535
no
W#16#0000 to
W#16#FFFF
no
1 to 125
B#16#1 to
B#16#7D
Write function
1 to 100
B#16#1 to
B#16#64
WRITE_
READ
IN/
OUT
BOOL
TRUE
FALSE
no
TI
IN/
OUT
WORD
Transaction Identifier
(INPUT if in CLIENT mode, OUTPUT if in
SERVER mode)
0 to 65535
no
IN
BYTE
UNIT
General
Information
Unit identification
(INPUT if in CLIENT mode, OUTPUT if in
SERVER mode)
W#16#0 to
W#16#FFFF
0 to 255
no
B#16#0 to
B#16#FF
Initialization parameters
Runtime parameters
Initialization parameters are evaluated only during the initial execution of the
function block MODBUS and taken over into the instance DB. They are
marked in the above table in the column INIT with yes.
A modification of the initialization parameters during run mode has no impact.
After a modification of these parameters (e. g. during the test phase), the
instance DB must be initialized again via a STOP RUN transition of the
CPU.
Runtime parameters can by modified during the cyclical operation. It is not
advised to modify the input parameters while a request is active. Wait with the
preparations for the next request and the change of the parameters until the
previous request ends with DONE_NDR or ERROR.
The output parameters should only be evaluated when DONE_NDR is TRUE.
Range of Values
For the range of values of the different parameters, CPU specific restrictions
must be taken into consideration.
4-5
ID
LADDR
The parameter LADDR is the base address of the CP from HW Config (input
address). The configured value has to be entered here.
The range of values for this parameter depends on the CPU.
The parameters ID and LADDR can also be taken from the dialog box
Properties of TCP Connection.
TIMER_NR
This specifies the particular timer, which realizes the monitoring time
MONITOR.
The range of values for this parameter depends on the CPU. Any other
program must not use this timer.
MONITOR
The monitoring time MONITOR observes the data input from the
communication partner. The monitoring time can be set in 100 ms intervals. A
monitoring time of approximately 1,5 second is recommended.
In the operating mode CP is client MONITOR specifies the timeout for the
receipt of the complete response telegram from the server. When the
monitoring time elapses, the active request is cancelled with an error. The
timer is started after the completed send of the request telegram and is
stopped after the receipt of the complete data.
In the operating mode CP is server the receipt of the second part of the
telegram is monitored with the MONITOR time. When the time elapses an
error is reported. The timer is started after the receipt of the MODBUS specific
telegram header and is stopped after the receipt of the complete request
telegram.
DB_x
START_x
END_x
The FB offers 5 memory areas for mapping the MODBUS register addresses
in the S7 storage. One data area must be defined at minimum. The other 4
data areas are optional. Depending on the type of request, those memory
areas are read or written.
With one request only one DB can be accessed. Even if consecutive register
numbers are located in two different DBs, you need two requests to access
them. This has to be taken into account during parameterization.
In the operating mode CP is Client 3 parameters are required: DB_x,
START_x und END_x. In the operating mode CP is Server the parameter
WRITE_PROTECTx is required additionally.
The parameter DB_x specifies the DB, into which the below defined
MODBUS registers are mapped. START_x specifies the first memory
address, which is stored in word 0 of the DB. END_x defines the address of
the last MODBUS register.
4-6
The number of the data word of the S7 DB in which the last register is
mapped, can be calculated with the following formula:
DBW number = (END_x START_x) 2
If 0 is entered for DB_x, the respective memory area is not used.
The defined memory areas must not overlap. The parameter END_x must not
be smaller than START_x. In case of an error the initialization of the FB is
stopped with an error.
At the end of this chapter you can find an example of the mapping of the
MODBUS addresses to S7 memory areas.
WRITE_
PROTECTx
ENQ_ENR
SERVER_CLIENT
This parameter differentiates the client from the server mode. If the input is
TRUE, then the operating mode is CP is Server.
If the input is FALSE, then the operating mode is CP is Client.
DONE_NDR
ERROR
4-7
The STATUS output displays the error number when ERROR is TRUE. The
error numbers are described in chapter 6.
START_ADDRESS
LENGTH
The parameter LENGTH specifies the number of MODBUS registers that are
read or written. In the operating mode CP is Client it is an input parameter.
In the operating mode CP is Server it is an output parameter.
For read functions, a maximum of 125 registers is possible per telegram. For
write functions a maximum of 100 registers is possible. All registers have to
be in the same DB per telegram.
WRITE_READ
This parameter defines if a read or write function should be carried out. If the
value of the input/output is FALSE, it specifies the read mode. The value
TRUE specifies the write mode. In the operating mode CP is Client it is an
input parameter. In the operating mode CP is Server it is an output
parameter.
TI
The parameter TI, Transaction Identifier is copied by the server from the
request telegram to the respond telegram according to the MODBUS
specification.
In the operating mode CP is Client it is an input parameter. The FB copies
this value to the request telegram and verifies when the respond telegram is
received.
In the operating mode CP is Server it is an output parameter. The FB copies
this value from the request telegram to the respond telegram.
The Transaction Identifier is used for identification of telegrams, respectively
the correlation of request and respond. The FB MODBUS can only do this
correlation if the TI is changed with each transaction. A changed TI can only
solve some special situations caused by TCP. A reliable operation of the FB
can be obtained with a changed TI. Therefore we recommend to increment
the TI by 1 with any request.
UNIT
4-8
Example:
Parameterization
of the Memory
Areas
SERVER_CLIENT
DB_1
START_1
END_1
WRITE_ PROTECT1
DB_2
START_2
END_2
WRITE_ PROTECT2
DB_3
START_3
END_3
WRITE_ PROTECT3
DB_4
DB_5
Server
W#16#A (10)
W#16#1 (1)
W#16#8 (8)
FALSE
W#16#B (11)
W#16#B (11)
W#16#11 (17)
TRUE
W#16#C (12)
W#16#64 (100)
W#16#67 (103)
FALSE
0
0
DB 10
Address
+0.0
+2.0
+4.0
+6.0
+8.0
+10.0
+12.0
+14.0
Name
Type
Comment
Register 1
Register 2
Register 3
Register 4
Register 5
Register 6
Register 7
Register 8
WORD
WORD
WORD
WORD
WORD
WORD
WORD
WORD
read write
read write
read write
read write
read write
read write
read write
read write
Name
Type
Comment
Register 11
Register 12
Register 13
Register 14
Register 15
Register 16
Register 17
WORD
WORD
WORD
WORD
WORD
WORD
WORD
read only
read only
read only
read only
read only
read only
read only
Name
Type
Comment
Register 100
Register 101
Register 102
Register 103
WORD
WORD
WORD
WORD
read write
read write
read write
read write
DB 11
Address
+0.0
+2.0
+4.0
+6.0
+8.0
+10.0
+12.0
DB 12
Address
+0.0
+2.0
+4.0
+6.0
4-9
4.3
Description of the
Parameters
Parameter
Decl.
Type
Description
DB_6
IN
WORD
START_6
IN
WORD
Value range
Init
1 to 65535
yes
0 to 65535
W#16#1 to
W#16#FFFF
yes
W#16#0000 to
W#16#FFFF
END_6
IN
WORD
0 to 65535
yes
W#16#0000 to
W#16#FFFF
DB_7
IN
WORD
START_7
IN
WORD
1 to 65535
yes
W#16#1 to
W#16#FFFF
0
0 to 65535
yes
W#16#0000 to
W#16#FFFF
END_7
IN
WORD
0 to 65535
yes
W#16#0000 to
W#16#FFFF
DB_8
IN
WORD
START_8
IN
WORD
1 to 65535
yes
W#16#1 to
W#16#FFFF
0
0 to 65535
yes
W#16#0000 to
W#16#FFFF
END_8
IN
WORD
0 to 65535
yes
W#16#0000 to
W#16#FFFF
INPUT_
HOLDING
DB_x
START_x
END_x
IN/
OUT
BOOL
TRUE
FALSE
no
The FB MODB4 offers 3 additional memory areas for mapping the MODBUS
register addresses of input registers in the S7 storage. One data area must
be defined at minimum. The other 2 data areas are optional. These three
memory areas can only be read.
With one request only one DB can be accessed. Even if consecutive register
numbers are located in two different DBs, you need two requests to access
them. This has to be taken into account during parameterization.
4-10
The parameter DB_x specifies the DB, into which the below defined
MODBUS registers are mapped. START_x specifies the first memory
address, which is stored in word 0 of the DB. END_x defines the address of
the last MODBUS register.
The number of the data word of the S7 DB in which the last register is
mapped, can be calculated with the following formula:
DBW number = (END_x START_x) 2
If 0 is entered for DB_x, the respective memory area is not used.
The defined memory areas 6 to 8 must not overlap. The parameter END_x
must not be smaller than START_x. In case of an error the initialization of the
FB is stopped with an error.
Input registers and holding registers are addressed from 0 to FFFFH each.
The two register types are physical different memory areas. Within DB_1 to
DB_5 as well as DB_6 to DB_8 register numbers must not overlap. But
register numbers may exist in both areas, DB_1 to DB_5 and DB_6 to DB_8
INPUT_HOLDING
4-11
4.4
Instance DB
The function block MODBUS stores its data in an instance DB. This instance
DB is created by STEP7 at the first call of the FB.
The instance data block contains parameters of type Input, Output,
Input/Output as well as static variables that it needs for its execution. These
variables are non-volatile and keep its validity between FB calls. The
variables control the internal process flow of the FB.
Required memory of the instance-DBs:
Instanz-DB
work memory
load memory
MODBUS
704 Byte
1070 Byte
MODB4
742 Byte
1148 Byte
Local Variables
Timers
The function block uses one timer to realize the monitoring time. The number
of the used timer that you want to use can be parameterized.
Flags
SFCs for
Miscellaneous
Functions
S7-300:
S7-400
The FB MODBUS uses the following SFCs from the standard library:
SFC6 READ_SINFO
SFC24 TEST_DB
With the SFC6 the FB checks if it was called from OB100 or OB1 and decides
this way if the initialization part or the cyclic part should be executed.
A call of SFC24 determines, whether the DB specified in DB_x is available at
runtime and has the required length.
4-12
bertragungsprotokoll
Transmission Protocol
5.1
General MODBUS
frame
Function
code
Data
Error
Check
PDU
MODBUS on
TCP/IP Application
Data Unit
Function
code
Data
PDU
With MODBUS on TCP the error check of TCP is used, so the error check of
the general MODBUS frame is not used.
5-1
Transmission Protocol
5.2
Overview
General
Information
Client/Server
The PLC S7 with its CP and FB can act as both client and server.
Functionality multitasking of server according to the MODBUS reference is
not supported.
The client sends a request telegram to the server. The server responds
within the monitoring time. The server itself cannot initiate any data
transmission. A communication from server to server is not possible.
Function Codes
FC3:
The function block MODB4 comprises the following function code in addition
to Conformance Class 0:
Protocol Structure
FC4:
5-1
Transmission Protocol
Transaction
Identifier
The server copies the Transaction Identifier TI from the request telegram to
the response telegram according to the MODBUS specification.
With a TI changed cyclically it is possible to have a firm correlation of
request and respond telegrams. We recommend using a TI, which is
incremented with every telegram sequence.
In the operating mode CP is Client the received transaction identifier is
compared to the one sent. If differences appear, the actual job is ended with
an error.
In the operating mode CP is Server the received transaction identifier is
copied to the response telegram.
Protocol Identifier
The protocol identifier must always be 0. The FB sets the protocol identifier
in the request telegram to 0. When a telegram is received, the protocol
identifier is checked for the value 0. A value other than 0 creates an error
message.
Length Field
The length specifier in the length field defines the data length of the telegram
without the Header (starting with byte 6). Thus the end of the telegram is
determined. The following telegram lengths are allowed for request and
response telegrams for read and write functions:
Request
Response
Read
3 or 5 to 253
Write
9 to 207
3 or 6
Unit Identifier
Function Code
The function code describes the function of the telegram. The structure of the
telegram data depends on the function code.
Interpretation of
MODBUS Register
Addresses
5-2
Transmission Protocol
5.3
General
Information
With the function code multiple holding registers can be read. The request
telegram contains UNIT, the function code, the start address of the registers
and the number of registers to be read.
The response telegram contains UNIT, the function code, the byte count for
the following data as well as the contents of the registers that were read. In
case of an error, the response can be an exception code telegram.
An open MODBUS/TCP specific header precedes the telegram structure that
is shown below.
Request Telegram
Response
Telegram
5-3
Transmission Protocol
5.4
General
With function code 16 multiple holding registers can be written. The request
telegram contains UNIT, the function code, the start address of the registers,
the byte count and the values to be written.
The response telegram contains UNIT, the function code, the start address of
the registers and the number of registers written. In case of an error, the
response can be an exception code telegram.
The open MODBUS/TCP specific header precedes the telegram structure
shown below.
Request Telegram
Response
Telegram
5-4
Transmission Protocol
5.5
General
Information
For certain errors the server responds with an exception code telegram.
Telegram
Structure
The exception code telegram contains UNIT, the function code in which Bit 27
is set and the exception code.
The open MODBUS/TCP specific header precedes the telegram structure
shown below.
Byte 0: Unit Identification
Byte 1: Function Code + 80H
Byte 2: Exception Code
Exception
Code
According to
MODBUS
specification
01
Illegal Function
02
Reason
5-5
Transmission Protocol
5.6
General
Information
With the function code multiple input registers can be read. The request
telegram contains UNIT, the function code, the start address of the registers
and the number of registers to be read.
The response telegram contains UNIT, the function code, the byte count for
the following data as well as the contents of the registers that were read. In
case of an error, the response can be an exception code telegram.
An open MODBUS/TCP specific header precedes the telegram structure that
is shown below.
Request Telegram
Response
Telegram
5.7
5-6
Diagnostics
Diagnostics
Diagnostic
Function
The diagnostic functions of the CP 343/ CP 443 allow you fast failure
localization. The following diagnostic features are available:
Diagnostics via the display elements of the CP
Diagnostics via the STATUS output of the MODBUS function block.
Display Elements
(LED)
The display elements inform you about the operating mode or about the
failure conditions of the CP. The display elements give you an overview of
internal failures, external failures and interface specific failures.
STATUS Output of
the MODBUS FB
For error diagnostics, the MODBUS function block has a STATUS output. By
reading the STATUS output you get a general indication of failures that have
occurred during the communication. The STATUS parameter can be
evaluated in the users program.
6.1
Display Functions
The display elements of the CP give you information on the module status.
There are two types of display functions:
Special Displays
CP 343-1:
- RX/TX
A telegram is being transmitted via the interface.
CP 443-1:
- TXD
A telegram is being sent via the interface.
- RXD
A telegram is being received via the interface.
6-1
Diagnostics
6.2
During start up
CP is Server:
UNIT is within the allowed range of values.
Errors during start up provoke the ERROR bit to remain set. In the cyclical
operation no requests are executed. A correction of the parameterization and
a STOP RUN transition of the CPU are necessary.
Cyclical Operation
CP is Client
Protocol identifier = 0
6-2
Diagnostics
Cyclical Operation
CP is Server
The monitoring time also can elapse if less data than specified in the
MODBUS telegram header is received. Subsequent failures can
occur with loss of telegrams.
Protocol Identifier = 0
For write requests, the length in the header, the number of registers
and the byte count in the telegram must match.
6-3
Diagnostics
Lost
Synchronization
The lost synchronization described below can only occur when the
communication partner has extreme malfunctions or there are serious
interferences on the transmission line.
In order to read a MODBUS specific telegram header, the function block
MODBUS starts an AG_RECV with 6 bytes length. With the length in the
telegram header another AG_RECV is started. If the length in the telegram
header is not equal to the actual number of bytes sent to the CP (which is a
serious failure), the CP resolves this situation as follows:
1. More data as specified in the header is received:
The next AG_RECV gets data that are not compliant with the
MODBUS specific header. This leads to after effects like wrong TI or
PI, data is interpreted as a length specification, the length used by
FB/AG_RECV is wrong.
2. Less data as specified in the header is received:
The activated AG_RECV returns no ready signal and the monitoring
time MONITOR elapses. The activated AG_RECV has only received
a part of the data, therefore it is still in the receiving state. This
AG_RECV cannot be cancelled. More data has to be received in
order to be synchronized again.
In operating mode CP is client the request of the FB MODBUS is
cancelled with ERROR. Another FB request can be activated. The
response data is received with the old AG_RECV. Receiving must
continue until the expected amount of data has been received.
Multiple requests, which all end with the status monitoring time
elapsed, might be necessary to regain synchronization.
In the operating mode CP is server the expected amount of data
must be reached with request telegrams of the client. Multiple error
messages No response from server might occur at the client.
When the old AG_RECV ends, the FB reads a single byte in order to
receive a possible telegram fragment from the CP. The reading is
observed with the monitoring time MONITOR as well. When the
monitoring time elapses it is assumed that the synchronization has
been regained. The normal operation of the FB MODBUS is
continued.
3. The announced amount of data does not match the request telegram
(CP is client):
The FB MODBUS receives the announced amount of data and
ignores it. ERROR and STATUS return an error code.
The above mentioned function of the FB is necessary because neither the
TCP/IP connection nor the activated AG_RECV can be cancelled.
6-4
Diagnostics
6.3
Messages at the
STATUS Output of
the FB
The error messages are displayed at the status output of the FB MODBUS.
STATUS is valid when ERROR is TRUE. Below you will find a list of FB
specific error messages.
Error Messages of
the called SFCs
and FCs
The FB MODBUS uses the standard functions SFC6, SFC24, FC5 and FC6,
or FC50 and FC60. The error messages of these blocks are passed on
without any changes.
In the diagnostics buffer or in the online help of SIMATIC Manager you will
find further details on these error messages, as well as in the SIMATIC
STEP7 NCM S7 Industrial Ethernet Manual.
Remedy
(Hex)
A002
A003
A004
CP is Server:
Wrong address area in the request telegram of Modify the request of the client.
the client (CP is server)
CP is client:
An invalid value for the parameter LENGTH is given.
CP is Client:
Correct the parameter LENGTH.
CP is Server:
The number of registers in the request telegram is
invalid.
Range of values: 1 to 125 for read, 1 to 100 for write.
CP is Server:
Modify the number of registers in
the request telegram.
A006
CP is Client:
Correct the parameters
combination START_ADDRESS,
LENGTH.
CP is Server:
Modify the request of the client or
correct the parameterization of
DB_x.
A007
6-5
Diagnostics
Remedy
(Hex)
A008
A00A
CP is client:
The received UNIT is not equal to the sent one.
A00B
CP is client:
Received function code is not equal to the sent one.
CP is server:
An invalid Function Code was received.
CP is client:
Verify the data of the
communication partner with the
help of a telegram trace.
CP is Server :
The FB supports only the function
codes 03 and 16
A00C
The received byte count does not match the number of Verify the data of the
registers.
communication partner with the
help of a telegram trace.
A00D
A00E
The length indicated in the MODBUS specific telegram Verify the data of the
header does not match the number of registers or the communication partner with the
byte count in the telegram. The FB receives all data
help of a telegram trace.
and ignores them. As an after effect a loss of
synchronization might occur.
A00F
CP is server
Attempt to write on a write protected area.
A010
6-6
Diagnostics
Remedy
(Hex)
A01A
A01B
A01C
Correct LENGTH or
START_ADDRESS at the call of
the FB.
A01E
A012
A013
A014
A015
A023
A024
A025
A034
A035
A045
A067
A068
A078
6-7
Diagnostics
6.4
Remedy
(Hex)
7xxx
8xxx
6.5
Remedy
(Hex)
80A1
80B1
80B2
DB UNLINKED
6-8
Application Sample
Application Sample
General
Information
Example Project
on the CD
On the CD you can find an extensive example project, which offers all
varieties of parameterization possibilities for the Simatic stations.
7-1
Application Sample
Simatic Stations in
the Example
Project
S7300
S7400
Client
S7-400(Client-MODB4)
S7-400(Server-MODB4)
Simatic 400(Client)
Simatic 400(Server)
S7-300(Client-MODB4)
S7-300(Server-MODB4)
Simatic 300(Client)
Simatic 300(Server)
Server
FB
MODBUS
FB
MODB4
x
x
x
x
x
x
x
x
x
Two connections are defined per station to show you the different kinds of
parameterization. During run-time only one TCP-connection is necessary.
If a S7 as client runs with a third party device, please use the connection to
other station.
If a S7 as server runs with a third party device, please use the unspecified
connection.
If two S7 communicate, please use the connection S7 S7.
7-2
Application Sample
Programming
Example
Used Blocks
The following blocks are used in the printed programming example. This
block numbers are also used in the example project for S7 stations with FB
MODBUS.
Used Data
Symbol
Comment
OB 1
OB 100
FB 200/ FB201
FB 100/ FB202
FB MODBUS/ FB MODB4
DB 100/ DB101
DB 200/ DB201
DB 222/ DB223
DB 11
DB 12
DB 13
DB 14
DB 15
DB 16
DB 17
DB 18
The following operands (memory bits, data bits or data words) have been
used in the programming example.
You can find the structure of DB223 in the example project.
Operand
Type
Name
T5
TIMER
unattached TIMER
DB222.DBW 0
INT
"CONTROL DAT".ID
DB222.DBW 2
WORD
"CONTROL DAT".LADDR
DB222.DBB 4
INT
"CONTROL DAT".RESERVED1
DB222.DBW 6
INT
"CONTROL DAT".MONITOR
7-3
Application Sample
Operand
Type
Name
DB222.DBW 8
WORD
DB222.DBW 10
WORD
DB222.DBW 12
WORD
DB222.DBW 14
WORD
DB222.DBW 16
WORD
DB222.DBW 18
WORD
DB222.DBW 20
WORD
DB222.DBW 22
WORD
DB222.DBW 24
WORD
DB222.DBW 26
WORD
DB222.DBW 28
WORD
DB222.DBW 30
WORD
DB222.DBW 32
WORD
DB222.DBW 34
WORD
DB222.DBW 36
WORD
DB222.DBX 38.0
BOOL
"CONTROL DAT".WRITE_PROTECT1
DB222.DBX 38.1
BOOL
"CONTROL DAT".WRITE_PROTECT2
DB222.DBX 38.2
BOOL
"CONTROL DAT".WRITE_PROTECT3
DB222.DBX 38.3
BOOL
"CONTROL DAT".WRITE_PROTECT4
DB222.DBX 38.4
BOOL
"CONTROL DAT".WRITE_PROTECT5
DB222.DBX 38.5
BOOL
DB222.DBX 38.6
BOOL
"CONTROL DAT".SERVER_CLIENT
DB222.DBW 39
BYTE
"CONTROL DAT".RESERVED2
DB222.DBX 40.0
BOOL
"CONTROL DAT".DONE_NDR
DB222.DBX 40.1
BOOL
"CONTROL DAT".ERROR
DB222.DBW 42
WORD
"CONTROL DAT".STATUS
DB222.DBW 44
WORD
"CONTROL DAT".START_ADRESS
DB222.DBW 46
WORD
"CONTROL DAT".LENGTH
DB222.DBX 47.0
BOOL
"CONTROL DAT".WRITE_READ
DB222.DBW 48
WORD
"CONTROL DAT".TI
DB222.DBW 50
WORD
"CONTROL DAT".TI
Operand
Type
Name
DB11.DBW 0
DB11.DBW 248
ARRAY[1..125]
WORD
"REG_BEREICH_1".DB-REG1[1]
"REG_BEREICH_1".DB-REG1[125]
DB12.DBW 0
DB12.DBW 248
ARRAY[1..125]
WORD
"REG_BEREICH_2".DB-REG2[1]
"REG_BEREICH_2".DB-REG2[125]
DB13.DBW 0
DB13.DBW 248
ARRAY[1..125]
WORD
"REG_BEREICH_3".DB-REG3[1]
"REG_BEREICH_3".DB-REG3[125]
DB14.DBW 0
DB14.DBW 248
ARRAY[1..125]
WORD
"REG_BEREICH_4".DB-REG4[1]
"REG_BEREICH_4".DB-REG4[125]
DB15.DBW 0
DB15.DBW 248
ARRAY[1..125]
WORD
"REG_BEREICH_5".DB-REG5[1]
"REG_BEREICH_5".DB-REG5[125]
7-4
Application Sample
7.1
Programming
Example
Start-Up
Comment
OB 1
OB 100
FB 200
DB 222
OB100
Start-Up-OB
Call of FB 200 for initialization of "MODBUS"
:=2
:=W#16#7FC
:=T5
:=
:= W#16#B
:= W#16#1
:= W#16#7D
:= W#16#C
:= W#16#7E
:= W#16#FA
:= W#16#D
:= W#16#FB
:= W#16#177
:= W#16#E
:= W#16#178
:= W#16#1F4
:= W#16#F
:= W#16#1F5
:= W#16#271
:=
:=
:=
:=
:=
:=FALSE
:=FALSE
// with CP is client
// irrelevant
// trigger bit
// CP is client
7-5
Application Sample
FB 200 "INITIATE_MODBUS"
The FB 200 copies its parameters into the DB222 to provide the user with the
opportunity to start jobs with the Variable Table.
OPN "CONTROL DAT"
// DB 222
L
T
#ID
"CONTROL DAT".ID
L
T
#LADDR
"CONTROL DAT".LADDR
L
T
L
T
L
T
#DB_1
"CONTROL DAT".DB_1
#START_1
"CONTROL DAT".START_1
#END_1
"CONTROL DAT".END_1
L
T
L
T
L
T
#DB_2
"CONTROL DAT".DB_2
#START_2
"CONTROL DAT".START_2
#END_2
"CONTROL DAT".END_2
L
T
L
T
L
T
#DB_3
"CONTROL DAT".DB_3
#START_3
"CONTROL DAT".START_3
#END_3
"CONTROL DAT".END_3
L
T
L
T
L
T
#DB_4
"CONTROL DAT".DB_4
#START_4
"CONTROL DAT".START_4
#END_4
"CONTROL DAT".END_4
L
T
L
T
L
T
#DB_5
"CONTROL DAT".DB_5
#START_5
"CONTROL DAT".START_5
#END_5
"CONTROL DAT".END_5
A
=
#SERVER_CLIENT
"CONTROL DAT".SERVER_CLIENT
7-6
Application Sample
:="CONTROL DAT".ID
:="CONTROL DAT".LADDR
:=#TIMER_NR
:=
:="CONTROL DAT".DB_1
:="CONTROL DAT".START_1
="CONTROL DAT".END_1
:="CONTROL DAT".DB_2
:="CONTROL DAT".START_2
:="CONTROL DAT".END_2
:="CONTROL DAT".DB_3
:="CONTROL DAT".START_3
:="CONTROL DAT".END_3
:="CONTROL DAT".DB_4
:="CONTROL DAT".START_4
:="CONTROL DAT".END_4
:="CONTROL DAT".DB_5
:="CONTROL DAT".START_5
:="CONTROL DAT".END_5
:=
:=
:=
:=
:=
:="
:="CONTROL DAT".SERVER_CLIENT
:=
:=CONTROL DAT".ERROR
:=CONTROL DAT".STATUS
:=
:=
:=
:=
:=
"CONTROL DAT".ERROR
TRIG
TRIG:
JU
END
L
T
1
"CONTROL DAT".UNIT
L
T
1
"CONTROL DAT".START_ADDRESS
L
T
2
"CONTROL DAT".LENGTH
L
L
+I
T
"CONTROL DAT".TI
1
"CONTROL DAT".TI
SET
=
"CONTROL DAT".WRITE_READ
7-7
Application Sample
Cyclic Program
OB1
Cyclic-OB
"CONTROL DAT".ENQ_ENR
"CONTROL DAT".ENQ_ENR
//reset trigger
A
JC
"CONTROL DAT".DONE_NDR
TRIG
"CONTROL DAT".ERROR
BEU
TRIG:
L "CONTROL DAT".TI
L 1
+I
T "CONTROL DAT".TI
SET
= "CONTROL DAT".ENQ_ENR
//trigger
//initialize values for a
//new job here
7-8
Application Sample
7.2
Programming
Example
Start-Up
Comment
OB 1
OB 100
FB 200
DB 222
OB100
Start-Up-OB
Call of FB 200 for initialization of "MODBUS"
:=1
:=W#16#100
:=b#16#2
:=T5
:=
:= W#16#B
:= W#16#1
:= W#16#7D
:= W#16#C
:= W#16#7E
:= W#16#FA
:= W#16#D
:= W#16#FB
:= W#16#177
:= W#16#E
:= W#16#178
:= W#16#1F4
:= W#16#F
:= W#16#1F5
:= W#16#271
:=FALSE
:=FALSE
:=FALSE
:=FALSE
:=FALSE
:=FALSE
:=TRUE
//CP is server
7-9
Application Sample
FB 200 "INITIATE_MODBUS"
FB 200 copies its parameters to DB222. The user can monitor the jobs by watching
DB222 data in the variable table.
OPN "CONTROL DAT"
// DB 222
L
T
L
T
#ID
"CONTROL DAT".ID
#LADDR
"CONTROL DAT".LADDR
L
T
L
T
L
T
L
T
L
T
L
T
L
T
L
T
L
T
L
T
L
T
L
T
L
T
L
T
L
T
A
=
A
=
A
=
A
=
A
=
#DB_1
"CONTROL DAT".DB_1
#START_1
"CONTROL DAT".START_1
#END_1
"CONTROL DAT".END_1
#DB_2
"CONTROL DAT".DB_2
#START_2
"CONTROL DAT".START_2
#END_2
"CONTROL DAT".END_2
#DB_3
"CONTROL DAT".DB_3
#START_3
"CONTROL DAT".START_3
#END_3
"CONTROL DAT".END_3
#DB_4
"CONTROL DAT".DB_4
#START_4
"CONTROL DAT".START_4
#END_4
"CONTROL DAT".END_4
#DB_5
"CONTROL DAT".DB_5
#START_5
"CONTROL DAT".START_5
#END_5
"CONTROL DAT".END_5
#WRITE_PROTECT1
"CONTROL DAT".WRITE_PROTECT1
#WRITE_PROTECT2
"CONTROL DAT".WRITE_PROTECT2
#WRITE_PROTECT3
"CONTROL DAT".WRITE_PROTECT3
#WRITE_PROTECT4
"CONTROL DAT".WRITE_PROTECT4
#WRITE_PROTECT5
"CONTROL DAT".WRITE_PROTECT5
A
=
#SERVER_CLIENT
"CONTROL DAT".SERVER_CLIENT
7-10
Application Sample
//
:="CONTROL DAT".ID
:="CONTROL DAT".LADDR
:=#TIMER_NR
:=
:="CONTROL DAT".DB_1
:="CONTROL DAT".START_1
="CONTROL DAT".END_1
:="CONTROL DAT".DB_2
:="CONTROL DAT".START_2
:="CONTROL DAT".END_2
:="CONTROL DAT".DB_3
:="CONTROL DAT".START_3
:="CONTROL DAT".END_3
:="CONTROL DAT".DB_4
:="CONTROL DAT".START_4
:="CONTROL DAT".END_4
:="CONTROL DAT".DB_5
:="CONTROL DAT".START_5
:="CONTROL DAT".END_5
:="CONTROL DAT".WRITE_PROTECT1
:="CONTROL DAT".WRITE_PROTECT2
:="CONTROL DAT".WRITE_PROTECT3
:="CONTROL DAT".WRITE_PROTECT4
:="CONTROL DAT".WRITE_PROTECT5
:=
:="CONTROL DAT".SERVER_CLIENT
:=
:= :="CONTROL DAT".ERROR
:= :="CONTROL DAT".STATUS
:=
:=
:=
:=
:=
"CONTROL DAT".ERROR
ERR
SET
=
"CONTROL DAT".ENQ_ENR
JU END
ERR:
7-11
Application Sample
Cyclic Program
OB1
Cyclic-OB
:=
:=
:=
:="CONTROL DAT".MONITOR
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=CONTROL DAT".ENQ_ENR
:=
:="CONTROL DAT".DONE_NDR
:="CONTROL DAT".ERROR
:="CONTROL DAT".STATUS
:="CONTROL DAT".START_ADDRESS
:="CONTROL DAT".LENGTH
:="CONTROL DAT".WRITE_READ
:="CONTROL DAT".TI
:="CONTROL DAT".UNIT
7-12
A Literature
Schneider Electric
MODBUS
http://www.modbus.org
Appendix - 1
Glossary
A
Address
Automation System
B
Block Call
Block Parameter
Blocks
Blocks are elements of the user program which are defined by their
function, structure, or purpose. With STEP7 there are
C
Communications Processor
Configuration
Connection Parameterization The specification of a connection ID in the system function block. With
the help of a connection ID the system function blocks can
communicate between two communication points.
CPU
CRC
Cycle Time
The cycle time is the time the CPU needs to execute the user program
once.
Glossary - 1
D
Data Block (DB)
These are blocks containing data and parameters with which the user
program works. Unlike all other blocks, data blocks do not contain
instructions. They are subdivided into global data blocks and instance
data blocks. The data held in the data blocks can be accessed
absolutely or symbolically. Complex data can be stored in structured
form.
Data Type
Data types allow users to define how the value of a variable or constant
is to be used in the user program. They are classified into elementary
and structured data types.
Default Setting
Diagnostic Buffer
Diagnostic Event
Diagnostic Functions
The diagnostics functions cover the entire system diagnosis and include
detection, analysis and reporting of errors within the automation
system.
Download
F
Function Block (FB)
H
Hardware
Hardware is the term given to all the physical and technical equipment
of a PLC.
I
Instance Data Block
Interface Module
Interrupt
Glossary - 2
M
Module
Module Parameters
O
Online / Offline
Online Help
STEP7 allows you to display contextual help texts on the screen while
working with the programming software.
Operand
Operating Mode
P
Parameter
Parameterization
Parameterization Interface
CP 441:
Point-to-Point
Communication,
Parameter Assignment
Point-to-Point connection
Procedure
Process image
This is a special memory area in the PLC. At the beginning of the cyclic
program, the signal states of the input modules are transferred to the
process image input table. At the end of the cyclic program, the process
image of the outputs is transferred to the output modules as output
signals.
Protocol
Glossary - 3
R
Rack
S
Software
START UP
The operating mode START UP is active when the CPU transits from
operating mode STOP to operating mode RUN.
STEP7
System Block
System blocks differ from the other blocks in that they are already
integrated into the S7-400 system and are available for already defined
system functions. They are classified into system data blocks, system
functions, and system function blocks.
System Function Block (SFB) System function blocks are software modules with memory which are
already integrated into the operating system of the S7-CPU and can be
called up by the user as required.
T
Tool
U
Upload
Uploading means loading objects (e.g. code blocks) from the load
memory of the CPU into the programming device.
User Program
The user program contains all instructions and declarations for signal
processing, by means of which a system or a process can be
controlled. The user program for SIMATIC S7 is structured and is
divided into smaller units called blocks.
V
Variable
W
Work Memory
The work memory is a RAM on the CPU which the processor accesses
while processing the user program.
Glossary - 4