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