This document is a translation of the original document.
All rights to this documentation are reserved by Pilz GmbH & Co. KG. Copies may be made
for internal purposes.
Suggestions and comments for improving this documentation will be gratefully received.
Pilz®, PIT®, PMI®, PNOZ®, Primo®, PSEN®, PSS®, PVIS®, SafetyBUS p®, SafetyEYE®,
SafetyNET p®, the spirit of safety® are registered and protected trademarks of
Pilz GmbH & Co. KG in some countries.
SD means Secure Digital.
Contents
Contents
ContentsPage
Chapter 1 Introduction
1.1Validity of documentation1-1
1.1.1Retaining the documentation1-1
1.2Overview of documentation1-2
1.3Definition of symbols1-3
1.4System requirements1-4
Chapter 2 Communication via Modbus/TCP
2.1 Modbus/TCP - Basics2-1
2.2Modbus/TCP with PNOZmulti2-2
Chapter 3 Modbus/TCP - Data areas
3.1Overview3-1
3.2Function codes3-2
3.3Data transfer limits3-3
3.4Assignment of data areas3-4
3.4.1Virtual inputs3-4
3.4.2Control Register3-5
3.4.3Virtual outputs3-6
3.4.4LEDs3-7
3.4.5Configuration3-7
3.4.6State of the inputs from the base unit and
3-10
expansion modules
3.4.7State of the outputs from the base unit and
3-11
expansion modules
3.4.8LED status3-12
3.4.9Diagnostic word, element types3-14
3.4.10Current state of the virtual inputs3-22
3.4.11State of process data3-23
3.5Updating the data areas3-24
3.6Bit addressing in a Register3-25
Chapter 4 Application example
4.1Modbus subscriber4-1
4.2Data exchange via Modbus/TCP4-2
4.3Device configuration4-5
4.3.1Modular safety system PNOZmulti 4-5
4.3.2PSSu system in the automation system
PSS 4000
1.3Definition of symbols1300Definition of symbols1-Einfhrung Zeichen
Information that is particularly important is identified as follows:
DANGER!
This warning must be heeded! It warns of a hazardous situation
that poses an immediate threat of serious injury and death and
indicates preventive measures that can be taken.
WARNING!
This warning must be heeded! It warns of a hazardous situation
that could lead to serious injury and death and indicates preventive measures that can be taken.
CAUTION!
This refers to a hazard that can lead to a less serious or minor
injury plus material damage, and also provides information on
preventive measures that can be taken.
NOTICE
This describes a situation in which the product or devices could
be damaged and also provides information on preventive measures that can be taken.
INFORMATION
This gives advice on applications and provides information on
special features, as well as highlighting areas within the text that
are of particular importance.
` PNOZmulti Configurator: From Version 7.1.0
` Base unit PNOZ m0p ETH: From Version 1.0
` Base unit PNOZ m1p ETH: From Version 2.1
` Base unit PNOZ m2p ETH: From Version 1.0
` Base unit PNOZ m3p ETH: From Version 1.0
` Expansion module PNOZ mmc1p ETH from Version 1.0
22000Communication via Modbus/TCPCommunication via Modbus/TCP2-2.1 Modbus/TCP - Basics2100 Modbus/TCP - Basics2-ModbusTCP_Modbus/TCP Allg-1
Modbus is an open fieldbus standard published by the User Group
MODBUS-IDA (see www.Modbus-IDA.org).
Application Layer
Protocol
Modbus/TCP
TCP
(RFC 793)
IP
(RFC 791)
Industrial Ethernet
Physical Layer
Ethernet
Modbus/TCP is a protocol based on Industrial Ethernet (TCP/IP over
Ethernet). It is a protocol with Client/Server communication. Data is
transferred via a request/response mechanism using function codes
(FC).
Modbus/TCP is connection-oriented, i.e. before usable data is transferred via Modbus/TCP, a connection must first be established between
two Modbus/TCP interfaces. The initiator of the connection is called the
Client. The communications partner with which the Client establishes
the connection is called the Server. Whether a connection on a device
assumes the role of Client or Server is defined when a connection is configured. As a result, the Server/Client role only applies for the used connection.
2.2Modbus/TCP with PNOZmulti2200Modbus/TCP with PNOZmulti2-ModbusTCP_Modbus/TCP Allg-2-PNOZmulti
All base units from the modular safety system PNOZmulti that have an
Ethernet interface (PNOZ m1p ETH from V2.1) support Modbus/TCP.
The same applies for the base units PNOZmulti Mini in conjunction with
a communication module with Ethernet interface.
A PNOZmulti base unit can manage a max. of 8 Modbus/TCP connections. The PNOZmulti is always the Server in a connection. The Clients
in the connections may be various devices, e.g. PC (PNOZmulti Configurator), control system, display unit. They can access the modular safety
system PNOZmulti simultaneously.
The virtual I/Os plus all the information that is polled during fieldbus
communication are contained in data areas. The data is accessed directly. It's no longer necessary to switch via table/segment.
2-2
The configurations required for Modbus/TCP are fully pre-configured in
the PNOZmulti operating system. All that's necessary in the PNOZmulti
Configurator is to activate the virtual inputs and outputs (see PNOZmulti
Configurator's online help, under "Display and edit module selection").
On a modular control system PNOZmulti, port number "502" is fixed as
the default for data exchange via a Modbus/TCP connection. It is not
displayed in the PNOZmulti Configurator and cannot be modified.
Addressing for PNOZmulti systems starts at “0”. On devices
from other manufacturers, addressing can start at “1”.
Please refer to the operating manual provided by the relevant
manufacturer.
3.3Data transfer limits3300Data transfer limits3-ModbusTCP_Grenzen Datenübertragung-PNOZmulti
The following table contains information on the maximum data length
per telegram that is supported:
Data transferMax. data length per telegram
Read data
(Bit)
Read data
(Bit)
Read data
(Word)
Write data
(Word)
Read and write
data (Word)
FC 01 (Read Coils)1 … 2000
FC 02 (Read Discrete Inputs)
FC 05 (Write Single Coil)1 Bit
FC 15 (Write Multiple Coils)1 … 1968
FC 03 (Read Holding Registers)1 … 125
FC 04 (Read Input Register)
FC 06 (Write Single Register) 1 Word
FC 16 (Write Multiple Registers)1 … 123 Words
FC 23 (Read/Write Multiple Registers)Read 1 … 125 Words
Write 1 … 121 Words
INFORMATION
There may be some restrictions in data length, depending on the
device that is used. Please refer to the information stated in the
operating manual of the device you are using.
The table below describes the Modbus/TCP data areas that contain the
current state of the virtual inputs on the PNOZmulti. These are the virtual
inputs that can be set by the user.
Relevant areas for the data are defined in each Modbus/TCP data area
(Coils (0x), Discrete Inputs (1x), Input Register (3x), Holding Register
(4x)). Read/write access will depend on the Modbus/TCP data area.
Control Register3-ModbusTCP_Datenbereiche-Control Register-PNOZmulti
A watchdog can be activated in Control Register 255.
If no input bits are set by a Modbus/TCP subscriber within the preset
time, the PNOZmulti will set the input bits to "0".
The table below describes the Modbus/TCP data areas for the watchdog.
A relevant area for the watchdog is defined in each Modbus/TCP data
area (Coils (0x), Discrete Inputs (1x), Input Register (3x), Holding Register
(4x)). Read/write access will depend on the Modbus/TCP data area.
Bit 15 "Watchdog Trigger": The watchdog can be triggered by setting Bit
15 constantly to "1", or by a Client writing in the input area of the 128
inputs. The state of the bit when reading is undefined. A 1 or a 0 can be
read.
Bit 14 "Error Message": If this bit is set, an error stack entry is generated
when the watchdog is triggered.
Bit 10 … 8 "WD Timer": If the set time for the watchdog is set, then Bit
15 must be set, or become set, at the same time.
Watchdog Timer Bit 2Watchdog Timer Bit 1Watchdog Timer Bit 0Watchdog time
000Timer deactivated
001100 ms
010200 ms
011500 ms
1001 s
1013 s
1105 s
11110 s
The table below describes the Modbus/TCP data areas that contain the
state of the virtual outputs on the PNOZmulti.
Relevant areas for the data are defined in the Modbus/TCP data areas
Discrete Inputs (1x) and Input Register (3x). Read access is available to
these data areas.
The table below describes the Modbus/TCP data areas that contain the
LED status.
Relevant areas for the data are defined in the Modbus/TCP data areas
Discrete Inputs (1x) and Input Register (3x). Read access is available to
these data areas.
Register
(3x)
5208335...83208 Bit LED status;
521…783Reserved
Discrete Input
(1x)
ContentHigh ByteLow Byte
8 Bit reserved
Bit 0 = 1: LED OFAULT illuminates or flashes
Bit 1 = 1: LED IFAULT illuminates or flashes
Bit 2 = 1: LED FAULT illuminates or flashes
Bit 3 = 1: LED DIAG illuminates or flashes
Bit 4 = 1: LED RUN illuminates
Bit 5: Reserved
Bit 6: Reserved
Bit 7: Reserved
The table below describes the Modbus/TCP data areas that contain the
device data from the base unit and the project data. The data was defined in the PNOZmulti Configurator.
ReservedPNOZmulti LEDs
Relevant areas for the data are defined in the Modbus/TCP data areas
Discrete Inputs (1x) and Input Register (3x). Read access is available to
these data areas.
3.4.6State of the inputs from the base unit and expansion modules
State of the inputs from the base unit and expansion modules3-ModbusTCP_Datenbereiche-Status Eingänge Basisgerät u Module-PNOZmulti
The table below describes the Modbus/TCP data areas that contain the
state of the inputs from the base unit and expansion modules.
Relevant areas for the data are defined in the Modbus/TCP data areas
Discrete Inputs (1x) and Input Register (3x). Read access is available to
these data areas.
Register
(3x)
84713567... 13552Base unit i0 - i15i15 ….i8i7 ….i0
84813583... 13568Base unit i16 - 23Reserved i23...i16
84913599... 13584Reserved /
85013615... 13600Expansion module, right Right 3 (i7...i0)Right 2 (i7...i0)
85113631... 13616Expansion module, right Right 5 (i7...i0)Right 4 (i7...i0)
85213647... 13632Expansion module, right Right 7 (i7...i0)Right 6 (i7...i0)
85313663... 13648Expansion module, right / re-
85413679... 13664Expansion module, left Left 1 (i15…i8) Left 1 (i7…i0)
85513695... 13680Expansion module, left Left 1 (i31…i24)Left 1 (i23…i16)
85613711... 13696Expansion module, left Left 2 (i15…i8)Left 2 (i7…i0)
85713727... 13712Expansion module, left Left 2 (i31…i24)Left 2 (i23…i16)
85813743... 13728Expansion module, left Left 3 (i15…i8)Left 3 (i7…i0)
Coil/
Discrete Input
(1x)
ContentHigh ByteLow Byte
Right 1 (i7...i0)Reserved
expansion module, right
Reserved Right 8 (i7...i0)
served
3-10
85913759... 13744Expansion module, left Left 3 (i31…i24)Left 3 (i23…i16)
86013775... 13760Reserved
86113791... 13776Expansion module, left Left 4 (i15…i8)Left 4 (i7…i0)
86213807... 13792Expansion module, left Left 4 (i31…i24)Left 4 (i23…i16)
86313823... 13808Expansion module, left Left 5 (i15…i8)Left 5 (i7…i0)
86413839... 13824Expansion module, left Left 5 (i31…i24)Left 5 (i23…i16)
86513855... 13840Expansion module Left 6 (i15…i8)Left 6 (i7…i0)
86613871... 13856Expansion module, left Left 6 (i31…i24)Left 6 (i23…i16)
Please note: for analogue input modules, the content for "High Byte"
and "Low Byte" is transposed.
3.4.7State of the outputs from the base unit and expansion modules
State of the outputs from the base unit and expansion modules3-ModbusTCP_Datenbereiche-Status Ausgänge Basisgerät u Module-PNOZmulti
The table below describes the Modbus/TCP data areas that contain the
state of the outputs from the base unit and expansion modules.
Relevant areas for the data are defined in the Modbus/TCP data areas
Discrete Inputs (1x) and Input Register (3x). Read access is available to
these data areas.
Register
(3x)
86913919... 139040 / Base unit o0 - 034 Bit re-
87013935... 13920Base unit o4 - o5 / expansion
87113951... 13936Expansion module Right 3 o7…o0 Right 2 o7…o0
87213967... 13952Expansion module, right Right 5 o7…o0 Right 4 o7…o0
87313983... 13968Expansion module, right Right 7 o7…o0Right 6 o7…o0
87413999... 13984Expansion module, right
87514015... 14000000
87614031... 14016000
87714047... 140320 / Expansion module, right Right 1 o15…o80
87814063... 14048Expansion module, right Right 3 o15…o8Right 2 o15…o8
87914079... 14064Expansion module, right Right 5 o15…o8Right 4 o15…o8
88014095... 14080Expansion module, right Right 7 o15…o8Right 6 o15…o8
88114111... 14096Expansion module, right / resReserved Right 8 o15…o8
88214127... 14112Expansion module, left Left 1 (o15…o8)Left 1 (o7…o0)
88314143... 14128Expansion module, left Left 1 (o31…o24) Left 1 (o23…o16)
88414159... 14144Expansion module, left Left 2 (o15…o8)Left 2 (o7…o0)
88514175... 14160Expansion module, left Left 2 (o31…o24) Left 2 (o23…o16)
88614191... 14176Expansion module, left Left 3 (o15…o8)Left 3 (o7…o0)
88714207... 14192Expansion module, left Left 3 (o31…o24) Left 3 (o23…o16)
88814223... 142080
88914239... 14224Expansion module, left Left 4 (o15…o8)Left 4 (o7…o0)
89014255... 14240Expansion module, left Left 4 (o31…o24) Left 4 (o23…o16)
89114271... 14256Expansion module, left Left 5 (o15…o8)Left 5 (o7…o0)
89214287... 14272Expansion module, left Left 5 (o31…o24) Left 5 (o23…o16)
89314303... 14288Expansion module, left Left 6 (o15…o8)Left 6 (o7…o0)
89414319... 14304Expansion module, left Left 6 (o31…o24) Left 6 (o23…o16)
89514335... 143200
Coil/
Discrete Input
(1x)
ContentHigh ByteLow Byte
3.4.8LED status
LED status3-ModbusTCP_Datenbereiche-Status-LEDs
The table below describes the Modbus/TCP data areas that contain the
LED status.
Relevant areas for the data are defined in the Modbus/TCP data areas
Discrete Inputs (1x) and Input Register (3x). Read access is available to
these data areas.
Register
(3x)
89614351... 14336LEDs RUN / DIAGDiag Run
89714367... 14352LEDs FAULT/IFAULTI FaultFault
89814383... 14368LEDs OFAULT / Expansion mod-
89914399... 14384LEDs expansion module, rightRight 3Right 2
90014415... 14400LEDsRight 5Right 4
90114431... 14416LEDsRight 7Right 6
90214447... 14432LEDs / resReservedRight 8
90314463... 14448LED base unit i0 - i15LED i15…i8LED i7…i0
90414479... 14464LED base unit i16-i19 / 00LED i19…i16
90514495... 144800 / LEDs expansion module, right LED right 10
90614511... 14496LEDs expansion module, rightLED right 3LED right 2
LEDs for proximity switch: I10, I11, I20, I21:
If the LED is lit, the corresponding Bit will contain “1”. The proximity
switch is energised.
LEDs for incremental encoder: X12, X22:
If the LED is lit, the corresponding Bit will contain “1”; The incremental
encoder is connected correctly.
The LED functions are described in the operating manuals for the speed
monitors.
3.4.9Diagnostic word, element types
Diagnostic word, element types3-ModbusTCP_Datenbereiche-Diagnosewort-Elementtypen
The table below describes the Modbus/TCP data areas that contain information on the elements in the PNOZmulti Configurator and the diagnostic word.
Relevant areas for the data are defined in the Modbus/TCP data areas
Discrete Inputs (1x) and Input Register (3x). Read access is available to
these data areas.
104416719... 16704Diagnostic word 93Bit 15… 8Bit 7… 0
104516735... 16720Diagnostic word 94Bit 15… 8Bit 7… 0
104616751... 16736Diagnostic word 95Bit 15… 8Bit 7… 0
104716767... 16752Diagnostic word 96Bit 15… 8Bit 7… 0
104816783... 16768Diagnostic word 97Bit 15… 8Bit 7… 0
104916799... 16784Diagnostic word 98Bit 15… 8Bit 7… 0
105016815... 16800Diagnostic word 99Bit 15… 8Bit 7… 0
105116831... 16816Diagnostic word 100Bit 15… 8Bit 7… 0
105216847... 16832Reserved
105316863... 16848Reserved
105416879... 16864Reserved
105516895... 16880Reserved
105616911... 16896Reserved
105716927... 16912Reserved
105816943... 16928Reserved
105916959... 16944Reserved
106016975... 16960Reserved
106116991... 16976Reserved
106217007... 16992Reserved
106317023... 17008Reserved
106417039... 17024Reserved
106517055... 17040Reserved
106617071... 17056Reserved
106717087... 17072Reserved
106817103... 17088Reserved
106917119... 17104Reserved
107017135... 17120Reserved
107117151... 17136Element type Element ID = 2Element ID = 1
107217167... 17152Element type Element ID = 4Element ID = 3
107317183... 17168Element type Element ID = 6Element ID = 5
107417199... 17184Element type Element ID = 8Element ID = 7
107517215... 17200Element type Element ID = 10Element ID = 9
107617231... 17216Element type Element ID = 12Element ID = 11
107717247... 17232Element type 0Element ID = 13
107817263... 17248Element type Element ID = 15Element ID = 14
107917279... 17264Element type Element ID = 17Element ID = 16
108017295... 17280Element type Element ID = 19Element ID = 18
108117311... 17296Element type Element ID = 21Element ID = 20
108217327... 17312Element type Element ID = 23Element ID = 22
108317343... 17328Element type Element ID = 25Element ID = 24
108417359... 17344Element type 0Element ID = 26
108517375... 17360Element type Element ID = 15Element ID = 27
108617391... 17376Element type Element ID = 17Element ID = 29
108717407... 17392Element type Element ID = 19Element ID = 31
108817423... 17408Element type Element ID = 21Element ID = 33
108917439... 17424Element type Element ID = 23Element ID = 35
109017455... 17440Element type Element ID = 25Element ID = 37
109117471... 17456Element type 0Element ID = 39
109217487... 17472Element type Element ID = 41Element ID = 40
109317503... 17488Element type Element ID = 43Element ID = 42
109417519... 17504Element type Element ID = 45Element ID = 44
109517535... 17520Element type Element ID = 47Element ID = 46
109617551... 17536Element type Element ID = 49Element ID = 48
109717567... 17552Element type Element ID = 51Element ID = 50
109817583... 17568Element type 0Element ID = 52
109917599... 17584Element type Element ID = 54Element ID = 53
110017615... 17600Element type Element ID = 56Element ID = 55
110117631... 17616Element type Element ID = 58Element ID = 57
110217647... 17632Element type Element ID = 60Element ID = 59
110317663... 17648Element type Element ID = 62Element ID = 61
110417679... 17664Element type Element ID = 64Element ID = 63
110517695... 17680Element type 0Element ID = 65
110617711... 17696Element type Element ID = 67Element ID = 66
110717727... 17712Element type Element ID = 69Element ID = 68
110817743... 17728Element type Element ID = 71Element ID = 70
110917759... 17744Element type Element ID = 73Element ID = 72
111017775... 17760Element type Element ID = 75Element ID = 74
111117791... 17776Element type Element ID = 77Element ID = 76
111217807... 17792Element type 0Element ID = 78
111317823... 17808Element type Element ID = 80Element ID = 79
111417839... 17824Element type Element ID = 82Element ID = 81
111517855... 17840Element type Element ID = 84Element ID = 83
111617871... 17856Element type Element ID = 86Element ID = 85
111717887... 17872Element type Element ID = 88Element ID = 87
111817903... 17888Element type Element ID = 90Element ID = 89
111917919... 17904Element type 0Element ID = 91
112017935... 17920Element type Element ID = 93Element ID = 92
112117951... 17936Element type Element ID = 95Element ID = 94
112217967... 17952Element type Element ID = 97Element ID = 96
112317983... 17968Element type Element ID = 99Element ID = 98
112417999... 17984Element type Reserved Element ID = 100
112518015... 18000Element type ReservedReserved
112618031... 18016Element type ReservedReserved
Coil/
Discrete Input
(1x)
ContentHigh ByteLow Byte
Register 938 to 944 "Element enable 1 ... 100"
Each element is assigned an ID in the PNOZmulti Configurator. If the element's output = 0 (no enable), the corresponding bit is set.
Current state of the virtual inputs3-ModbusTCP_Datenbereiche-aktuelle Zustände der virtuellen Eingänge
The table below describes the Modbus/TCP data areas that contain the
current state of the virtual inputs. These are the virtual inputs that can be
set by various subscribers (e.g. fieldbus).
Relevant areas for the data are defined in the Modbus/TCP data areas
Discrete Inputs (1x) and Input Register (3x). Read access is available to
these data areas.
State of process data3-ModbusTCP_Datenbereiche-Zustand der Prozessdaten
The table below describes the Modbus/TCP data areas that contain the
status info register. The general state of the data is reproduced in the
status info register.
Relevant areas for the data are defined in the Modbus/TCP data areas
Discrete Inputs (1x) and Input Register (3x). Read access is available to
these data areas.
Register
(3x)
204832783... 32768Status informationSee below
High ByteReservedReservedReservedReservedReservedReservedReservedReserved
Low ByteReservedReservedWD Time-
Coil/
Discrete Input
(1x)
ContentHigh ByteLow Byte
ReservedReservedReservedReservedGlobal Er-
out
ror Bit
Bit 5 "WD Timeout": The set watchdog for the input bits has been triggered and the inputs set to "0".
Bit 0 "Error Bit": The content of the data areas is not current or the set
watchdog for the input bits has been triggered.
3.5Updating the data areas3500Updating the data areas3-ModbusTCP_Aktualisierung der Datenbereiche-PNOZmulti
Data is updated with varying priority.
The table below shows the typical update cycles for the various data.
ContentTyp. update cycle
Virtual inputs/outputs20 ms
ConfigurationOnce during initialisation
State of the inputs/outputs from the base unit and expansion modules320 ms
LED status1000 ms
Number of elements that can store a stateOnce during initialisation
Element enable320 ms
Diagnostic words1000 ms
Element typesOnce during initialisation
Current state of the virtual inputs1000 ms
INFORMATION
The update time may increase if there are additional TCP/IP connections (e.g. PNOZmulti Configurator, PMI, control system) on
the PG port (Port 9000).
4.2Data exchange via Modbus/TCP4200Data exchange via Modbus/TCP4-ModbusTCP_Bsp_Kommunikation Client - Server
An example of data exchange is shown below. The modular safety system PNOZmulti is always the server in a connection and the PSSu system from the automation system PSS 4000 is always the client in a
connection.
It is always the connection's client that initiates data transfer. The direction of the data flow (send/receive) and access to Modbus/TCP data areas (coils, discrete inputs, input registers, holding register) is defined by
the function code.
When sending, the connection's client sends data to a data area belonging to the connection's server. This is also known as "Writing data".
When receiving, the connection's client requests and receives data located in a data area belonging to the connection's server. This is also
known as "Reading data".
In this program, inputs on the PNOZmulti are copied to virtual outputs.
The PSSu system reads the data from the PNOZmulti, processes it and
then writes it back to the virtual inputs on the PNOZmulti. There the state
of the virtual inputs is written to signal outputs.
of Pilz GmbH & Co. KG in some countries. We would point out that product features may vary from the details stated in this document, depending on the status at the time of publication and the scope
of the equipment. We accept no responsibility for the validity, accuracy and entirety of the text and graphics presented in this information. Please contact our Technical Support if you have any questions.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.