Profibus DP Master Protocol API
Profibus DP Master Protocol API
PROFIBUS DP-Master
V2.6.x.x
Table of Contents
2/336
Table of Contents
1
Introduction ..............................................................................................................................................5
1.1 Abstract ..........................................................................................................................................5
1.2 List of Revisions .............................................................................................................................6
1.3 Functional Overview.......................................................................................................................7
1.4 System Requirements....................................................................................................................7
1.5 Intended Audience .........................................................................................................................7
1.6 Specifications .................................................................................................................................8
1.6.1 Technical Data .................................................................................................................................. 8
1.7
1.8
1.9
Copyright ......................................................................................................................................... 11
Important Notes............................................................................................................................... 11
Exclusion of Liability ........................................................................................................................ 12
Export .............................................................................................................................................. 12
Fundamentals.........................................................................................................................................13
2.1 General Access Mechanisms on netX Systems ..........................................................................13
2.2 Accessing the Protocol Stack by Programming the AP Tasks Queue........................................14
2.2.1 Getting the Receiver Task Handle of the Process Queue ............................................................... 14
2.2.2 Meaning of Source- and Destination-related Parameters................................................................ 14
2.3
Accessing the Protocol Stack via the Dual Port Memory Interface..............................................15
2.3.1 Communication via Mailboxes......................................................................................................... 15
2.3.2 Using Source and Destination Variables correctly........................................................................... 16
2.3.3 Obtaining useful Information about the Communication Channel.................................................... 19
2.4
Dual-Port-Memory..................................................................................................................................23
3.1 Cyclic Data (Input/Output Data) ...................................................................................................23
3.1.1 Input Data Image............................................................................................................................. 24
3.1.2 Process Data Output ....................................................................................................................... 24
3.2
3.3
Status ...........................................................................................................................................30
3.3.1 Common Status............................................................................................................................... 30
3.3.2 Extended Status .............................................................................................................................. 38
3.4
4
Control Block................................................................................................................................48
4.3
Overview .................................................................................................................................................70
5.1 PROFIBUS DP and the OSI/ISO Layer Model ............................................................................70
5.2 PROFIBUS DP Operation Modes (States) ..................................................................................71
5.3 Functionality of the FSPMM-Task (Layer 7) ................................................................................72
5.3.1
5.3.2
5.3.3
5.3.4
Hilscher, 2006-2013
Table of Contents
3/336
5.3.5 Diagnosis......................................................................................................................................... 82
5.4
5.5
5.6
5.7
6
Redundancy Functionality..........................................................................................................103
6.2
6.3
Hilscher, 2006-2013
Table of Contents
4/336
6.4
6.5
7.2
7.3
7.4
Appendix...............................................................................................................................................331
8.1 List of Figures.............................................................................................................................331
8.2 List of Tables..............................................................................................................................332
Contacts................................................................................................................................................336
Hilscher, 2006-2013
Introduction
5/336
1 Introduction
1.1 Abstract
This manual describes the application interface of the PROFIBUS DP Master stack, with the aim to
support and lead you during the integration process of the given stack into your own application.
Base of the development of the stack itself is the Hilschers Task Layer Reference Programming
Model. It is a description of how to program a task in general, which is defined as a combination of
appropriate functions belonging to the same type of protocol layer. It furthermore defines of how
different tasks have to communicate with each other in order to exchange their layer information in
between. The reference model is commonly used by all programmers at Hilscher and shall be used
by you as well when writing your application task on top of the stack.
Hilscher, 2006-2013
Introduction
6/336
Date
Name
Revisions
14
2011-09-14
RG/MP
15
2011-12-07
RG/MP
PROFIBUS_MSCS1M_CMD_INIT_CS_REQ/CNF Initialize
ClockSync Feature
PROFIBUS_MSCY1M_CMD_REDUNDANCY_SWITCH_REQ/CNF
Switch Redundancy
16
2012-12-21
RG/MP
17
2013-05-24
RG/MP
18
2013-05-28
RG/MP
Hilscher, 2006-2013
Introduction
7/336
Hilscher, 2006-2013
Introduction
8/336
1.6 Specifications
The data below applies to PROFIBUS DP Master firmware and stack version V2.6.x.x.
125 (DPV0/DPV1)
5712 bytes
(status information is separately managed)
5760 bytes
244 bytes/slave
244 bytes/slave
Configuration data
Acyclic communication
Functions
Redundancy function
Baud rate
PROFIBUS FDL
Hilscher, 2006-2013
Introduction
9/336
no
yes
PCI
DMA Support for PCI targets
yes
Slot Number
Slot number supported for
CIFX 50-DP
Configuration
Configuration by tool SYCON.net (Download or exported configuration file named config.nxd).
Configuration by tool SyCon (exported configuration file named config.dbm).
Configuration by packets to transfer bus and slave parameters.
Diagnostic
Firmware supports common and extended diagnostic in the dual-port-memory for loadable
firmware.
Limitations
DPV2 isochronous mode and slave-to-slave communication are not supported.
Redundancy functionality not supported for configuration with packets.
Hilscher, 2006-2013
Introduction
10/336
Description
AP
AREP
MS0
MS1
MS3
DL
FSPMM
MSCS1M
MSCY1M
DMPMM
MSAC1M
MSAC2M
All variables, parameters and data used in this manual have basically the LSB/MSB (Intel) data
representation. This corresponds to the convention of the Microsoft C Compiler.
DPM Interface Manual for netX based Products, Revision 12; Hilscher Gesellschaft fr Systemautomation
mbH; 2007-2011
There are also some documents available from the users organization PROFIBUS International,
which contain all relevant parts of the PROFIBUS DP specifications and can be used alternatively
to reference #3. These are:
1
Hilscher, 2006-2013
Introduction
1.9
1.9.1
11/336
Legal Notes
Copyright
1.9.2
Important Notes
The user manual, accompanying texts and the documentation were created for the use of the
products by qualified experts, however, errors cannot be ruled out. For this reason, no guarantee
can be made and neither juristic responsibility for erroneous information nor any liability can be
assumed. Descriptions, accompanying texts and documentation included in the user manual do
not present a guarantee nor any information about proper use as stipulated in the contract or a
warranted feature. It cannot be ruled out that the user manual, the accompanying texts and the
documentation do not correspond exactly to the described features, standards or other data of the
delivered product. No warranty or guarantee regarding the correctness or accuracy of the
information is assumed.
We reserve the right to change our products and their specification as well as related user
manuals, accompanying texts and documentation at all times and without advance notice, without
obligation to report the change. Changes will be included in future manuals and do not constitute
any obligations. There is no entitlement to revisions of delivered documents. The manual delivered
with the product applies.
Hilscher Gesellschaft fr Systemautomation mbH is not liable under any circumstances for direct,
indirect, incidental or follow-on damage or loss of earnings resulting from the use of the information
contained in this publication.
Hilscher, 2006-2013
Introduction
1.9.3
12/336
Exclusion of Liability
The software was produced and tested with utmost care by Hilscher Gesellschaft fr
Systemautomation mbH and is made available as is. No warranty can be assumed for the
performance and flawlessness of the software for all usage conditions and cases and for the
results produced when utilized by the user. Liability for any damages that may result from the use
of the hardware or software or related documents, is limited to cases of intent or grossly negligent
violation of significant contractual obligations. Indemnity claims for the violation of significant
contractual obligations are limited to damages that are foreseeable and typical for this type of
contract.
It is strictly prohibited to use the software in the following areas:
in air traffic control systems, air traffic or air traffic communication systems;
in systems in which failures in the software could lead to personal injury or injuries leading to
death.
We inform you that the software was not developed for use in dangerous environments requiring
fail-proof control mechanisms. Use of the software in such an environment occurs at your own risk.
No liability is assumed for damages or losses due to unauthorized use.
1.9.4
Export
The delivered product (including the technical data) is subject to export or import laws as well as
the associated regulations of different counters, in particular those of Germany and the USA. The
software may not be exported to countries where this is prohibited by the United States Export
Administration Act and its additional provisions. You are obligated to comply with the regulations at
your personal responsibility. We wish to inform you that you may require permission from state
authorities to export, re-export or import the product.
Hilscher, 2006-2013
Fundamentals
13/336
2 Fundamentals
2.1 General Access Mechanisms on netX Systems
This chapter explains the possible ways to access a Protocol Stack running on a netX system :
1. By accessing the Dual Port Memory Interface directly or via a driver.
2. By accessing the Dual Port Memory Interface via a shared memory.
3. By interfacing with the Stack Task of the Protocol Stack.
The picture below visualizes these three ways:
1
2
Send Mailbox
Reveive Mailbox
AP Task
Fieldbus Task(s)
Network
Figure 1: The 3 different Ways to access a Protocol Stack running on a netX System
This chapter explains how to program the stack (alternative 3) correctly while the next chapter
describes accessing the protocol stack via the dual-port memory interface according to alternative
1 (and 2, if the user application is executed on the netX chip in the context of the rcX operating
system and uses the virtual DPM).
Finally, chapter 6 titled The Application Interface describes the entire interface to the protocol
stack in detail.
Depending on you choose the stack-oriented approach or the Dual Port Memory-based approach,
you will need either the information given in this chapter or those of the next chapter to be able to
work with the set of functions described in chapter 6. All of those functions use the four parameters
ulDest, ulSrc, ulDestId and ulSrcId. This chapter and the next one inform about how
to work with these important parameters.
Hilscher, 2006-2013
Fundamentals
14/336
Description
"FSPMM_QUE
"FSPMM2_QUE
"PB_DL_QUE
"APM_QUE
The returned handle has to be used as value ulDest in all initiator packets the AP-Task intends to
send to the FSPMM_QUE-Task. This handle is the same handle that has to be used in conjunction
with the macros like TLR_QUE_SENDPACKET_FIFO/LIFO() for sending a packet to the
respective task.
Meaning
ulDest
ulSrc
For more information about programming the AP tasks stack queue, please refer to the Hilscher
Task Layer Reference Model Manual. Especially the following sections might be of interest in this
context:
1. Section 7 Queue-Packets
2. Section 10.1.9 Queuing Mechanism
Hilscher, 2006-2013
Fundamentals
15/336
2.3 Accessing the Protocol Stack via the Dual Port Memory Interface
This chapter defines the application interface of the DP-Master Stack.
Send Mailbox
Packet transfer from host system to netX firmware
Receive Mailbox
Packet transfer from netX firmware to host system
For more details about acyclic data transfer via mailboxes see section 3.2. The concept of using
messages called packets in this context, is described in detail in section 3.2.1 General Structure of
Messages or Packets for Non-Cyclic Data Exchange while the possible codes that may appear
are listed in section 3.2.2. Status & Error Codes.
However, this section concentrates on correct addressing the mailboxes.
Hilscher, 2006-2013
Fundamentals
16/336
How to use ulDest for Addressing rcX and the netX Protocol Stack by the System and
Channel Mailbox
System
Mailbox
Channel 0
Mainbox
ulDest = 0x02
ulDest = 0x01
ulDest = 0x00
ulDest = 0x20
ulDest = 0x02
ulDest = 0x01
ulDest = 0x00
ulDest = 0x20
ulDest = 0x02
ulDest = 0x01
ulDest = 0x00
ulDest = 0x20
The preferred way to address the netX operating system rcX is through the system mailbox; the
preferred way to address a protocol stack is through its channel mailbox. All mailboxes, however,
have a mechanism to route packets to a communication channel or the system channel,
respectively. Therefore, the destination identifier ulDest in a packet header has to be filled in
according to the targeted receiver. See the following example.
Channel 1
Mailbox
netX OS
rcX
AP Task 1
AP Task 2
For use in the destination queue handle, the tasks have been assigned to hexadecimal numerical
values as described in the following table:
ulDest
Description
0x00000000
0x00000001
0x00000002
0x00000003
0x00000004
0x00000020
else
The picture and the table above both show the use of the destination identifier ulDest.
Hilscher, 2006-2013
Fundamentals
17/336
A remark on the special channel identifier 0x00000020 (= Channel Token): The Channel Token is
valid for any mailbox. That way the application uses the same identifier for all packets without
actually knowing which mailbox or communication channel is applied. The packet stays 'local'. The
system mailbox is a little bit different, because it is used to communicate to the netX operating
system rcX. The rcX has its own range of valid commands codes and differs from a communication
channel.
Unless there is a reply packet, the netX operating system returns it to the same mailbox the
request packet went through. Consequently, the host application has to return its reply packet to
the mailbox the request was received from.
2.3.2.2
Generally, a netX protocol stack can be addressed through its communication channel mailbox.
The example below shows how a host application addresses a protocol stack running in the
context of a netX chip. The application is identified by a number (#444 in this example). The
application consists of three processes identified by the numbers #11, #22 and #33. These
processes communicate through the channel mailbox with the AP task of the protocol stack. Have
a look at the following image:
Process #33
Process #22
Process #11
Application #444
Channel
Mainbox
Hilscher, 2006-2013
Fundamentals
18/336
Example
This example applies to command messages initiated by a process in the context of the host
application. If the process #22 sends a packet through the channel mailbox to the AP task, the
packet header has to be filled in as follows:
Object
Variable
Name
Numeric
Value
Explanation
Destination
Queue Handle
ulDest
= 32
Source Queue
Handle
ulSrc
= 444
Destination
Identifier
ulDestId
= 0
Source Identifier
ulSrcId
= 22
(0x00000020)
For packets through the channel mailbox, the application uses 32 (= 0x20, Channel Token) for the
destination queue handler ulDest. The source queue handler ulSrc and the source identifier ulSrcId
are used to identify the originator of a packet. The destination identifier ulDestId can be used to
address certain resources in the protocol stack. It is not used in this example. The source queue
handler ulSrc has to be filled in. Therefore its use is mandatory; the use of ulSrcId is optional.
The netX operating system passes the request packet to the protocol stack's AP task. The protocol
stack then builds a reply to the packet and returns it to the mailbox. The application has to make
sure that the packet finds its way back to the originator (process #22 in the example).
2.3.2.3
To route an rcX packet the source identifier ulSrcId and the source queues handler ulSrc in the
packet header hold the identification of the originating process. The router saves the original
handle from ulSrcId and ulSrc. The router uses a handle of its own choices for ulSrcId and ulSrc
before it sends the packet to the receiving process. That way the router can identify the
corresponding reply packet and matches the handle from that packet with the one stored earlier.
Now the router replaces its handles with the original handles and returns the packet to the
originating process.
Hilscher, 2006-2013
Fundamentals
19/336
This section describes a procedure how to obtain useful information for accessing the
communication channel(s) of your netX device and to check if it is ready for correct operation.
Proceed as follows:
1) Start with reading the channel information block within the system channel (usually starting
at address 0x0030).
2) Then you should check the hardware assembly options of your netX device. They are
located within the system information block following offset 0x0010 and stored as data
type UINT16. The following table explains the relationship between the offsets and the
corresponding xC Ports of the netX device:
0x0010
0x0012
0x0014
0x0016
Check each of the hardware assembly options whether its value has been set to
RCX_HW_ASSEMBLY_PROFIBUS = 0x0050. If true, this denotes that this xCPort is suitable
for running the PROFIBUS protocol stack. Otherwise, this port is designed for another
communication protocol. In most cases, xC Port[2] will be used for field-bus systems, while
xC Port[0] and xC Port[1] are normally used for Ethernet communication.
Hilscher, 2006-2013
Fundamentals
20/336
3) You can find information about the corresponding communication channel (03) under the
following addresses:
0x0050
Communication Channel 0
0x0060
Communication Channel 1
0x0070
Communication Channel 2
0x0080
Communication Channel 3
In devices which support only one communication system which is usually the case (either
a single field-bus system or a single standard for Industrial-Ethernet communication),
always communication channel 0 will be used. In devices supporting more than one
communication system you should also check the other communication channels.
4) There you can find such information as the ID (containing channel number and port
number) of the communication channel, the size and the location of the handshake cells,
the overall number of blocks within the communication channel and the size of the channel
in bytes. Evaluate this information precisely in order to access the communication channel
correctly.
The information is delivered as follows:
Size of Channel in Bytes
Address Data
Type
0x0050
UINT8
Description
0x0051
UINT8
0x0052
UINT8
0x0053
UINT8
0x0054
UINT32
0x0058
UINT8[8]
Hilscher, 2006-2013
Fundamentals
21/336
netX
Confirmation
Indication
Response
Hilscher, 2006-2013
Fundamentals
22/336
netX
Response
Hilscher, 2006-2013
Dual-Port-Memory
23/336
3 Dual-Port-Memory
All data in the dual-port memory is structured in blocks. According to their functions, these blocks
use different data transfer mechanisms. For example, data transfer through mailboxes uses a
synchronized handshake mechanism between host system and netX firmware. The same is true
for IO data images, when a buffered handshake mode is configured. Other blocks, like the status
block, are read by the host application and use no synchronization mechanism.
Types of blocks in the dual-port memory are outlined below:
Mailbox
transfer non-cyclic messages or packages with a header for routing information
Data Area
holds the process image for cyclic IO data or user defined data structures
Control Block
is used to signal application related state to the netX firmware
Status Block
holds information regarding the current network state
Change of State
collection of flags, that initiate execution of certain commands or signal a change of state
Hilscher, 2006-2013
Dual-Port-Memory
24/336
Type
Name
Description
0x2680
UINT8
abPd0Input[5760]
Note: In case of a network fault (e.g. a disconnected network cable), a slave firmware
keeps the last state of the input data image. As soon as the firmware detects the network
fault, it clears the Communicating flag in netX communication flags (see section 3.2.2.1);
the input data should not be evaluated.
The default size of the output data image is 5760 byte. An output data block may or may not be
available in the dual-port memory. They are always available in the default memory map (see netX
DPM Manual).
Output Data Image
Offset
Type
Name
Description
0x1000
UINT8
abPd0Output[5760]
Hilscher, 2006-2013
Dual-Port-Memory
25/336
Send Mailbox
Packet transfer from host system to firmware
Receive Mailbox
Packet transfer from firmware to host system
The send and receive mailbox areas are used by field bus protocols providing a non-cyclic data
exchange mechanism. Another use of the mailbox system is to allow access to the firmware
running on the netX chip itself for diagnostic and identification purposes. The send mailbox is used
to transfer cyclic data to the network or to the firmware. The receive mailbox is used to transfer
cyclic data from the network or from the firmware.
A send/receive mailbox may or may not be available in the communication channel. It depends on
the function of the firmware whether or not a mailbox is needed. The location of the system
mailbox and the channel mailbox is described in the netX DPM Interface Manual.
Note: Each mailbox can hold one packet at a time. The netX firmware stores packets that
are not retrieved by the host application in a packet queue. This queue has limited space
and may fill up so new packets maybe lost. To avoid these data loss situations, it is
strongly recommended to empty the mailbox frequently, even if packets are not expected
by the host application. Unexpected command packets should be returned to the sender
with an Unknown Command in the status field; unexpected reply messages can be
discarded.
Hilscher, 2006-2013
Dual-Port-Memory
26/336
tData
Type
Value / Range
Description
Structure Information
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
Command / Response
ulExt
UINT32
Reserved
ulRout
UINT32
Routing Information
Structure Information
User Data
Specific To The Command
Some of the fields are mandatory; some are conditional; others are optional. However, the size of a
packet is always at least 10 double-words or 40 bytes. Depending on the command, a packet may
or may not have a data field. If present, the content of the data field is specific to the command,
respectively the reply.
Destination Queue Handler
The ulDest field identifies a task queue in the context of the netX firmware. The task queue
represents the final receiver of the packet and is assigned to a protocol stack. The ulDest field has
to be filled out in any case. Otherwise, the netX operating system cannot route the packet. This
field is mandatory.
Source Queue Handler
The ulSrc field identifies the sender of the packet. In the context of the netX firmware (inter-task
communication) this field holds the identifier of the sending task. Usually, a driver uses this field for
its own handle, but it can hold any handle of the sending process. Using this field is mandatory.
The receiving task does not evaluate this field and passes it back unchanged to the originator of
the packet.
Hilscher, 2006-2013
Dual-Port-Memory
27/336
Destination Identifier
The ulDestId field identifies the destination of an unsolicited packet from the netX firmware to the
host system. It can hold any handle that helps to identify the receiver. Therefore, its use is
mandatory for unsolicited packets. The receiver of unsolicited packets has to register for this.
Source Identifier
The ulSrcId field identifies the originator of a packet. This field is used by a host application, which
passes a packet from an external process to an internal netX task. The ulSrcId field holds the
handle of the external process. When netX operating system returns the packet, the application
can identify the packet and returns it to the originating process. The receiving task on the netX
does not evaluate this field and passes it back unchanged. For inter-task communication, this field
is not used.
Length of Data Field
The ulLen field holds the size of the data field in bytes. It defines the total size of the packets
payload that follows the packets header. The size of the header is not included in ulLen. So the
total size of a packet is the size from ulLen plus the size of packets header. Depending on the
command, a data field may or may not be present in a packet. If no data field is included, the
length field is set to zero.
Identifier
The ulId field is used to identify a specific packet among others of the same kind. That way the
application or driver can match a specific reply or confirmation packet to a previous request packet.
The receiving task does not change this field and passes it back to the originator of the packet. Its
use is optional in most of the cases, but it is mandatory for sequenced packets.
Example:
Downloading big amounts of data that does not fit into a single packet. For a sequence of packets
the identifier field is incremented by one for every new packet.
Status / Error Code
The ulState field is used in response or confirmation packets. It informs the originator of the packet
about success or failure of the execution of the command. The field may be also used to hold
status information in a request packet.
Command / Response
The ulCmd field holds the command code or the response code, respectively. The
command/response is specific to the receiving task. If a task is not able to execute certain
commands, it will return the packet with an error indication. A command is always even (the least
significant bit is zero). In the response packet, the command code is incremented by one indicating
a confirmation to the request packet.
Extension
The extension field ulExt is used for controlling packets that are sent in a sequenced manner. The
extension field indicates the first, last or a packet of a sequence. If sequencing is not required, the
extension field is not used and set to zero.
Hilscher, 2006-2013
Dual-Port-Memory
28/336
Routing Information
The ulRout field is used internally by the netX firmware only. It has no meaning to a driver type
application and therefore set to zero.
User Data Field
This field contains data related to the command specified in ulCmd field. Depending on the
command, a packet may or may not have a data field. The length of the data field is given in the
ulLen field.
The netX operating system rcX only uses the system mailbox.
The system mailbox, however, has a mechanism to route packets to a communication
channel.
A channel mailbox passes packets to its own protocol stack only.
The size is 1596 bytes for the send mailbox in the default memory layout. The mailbox is
accompanied by counters that hold the number of packages that can be accepted.
Hilscher, 2006-2013
Dual-Port-Memory
29/336
Type
Name
Description
0x0200
UINT16
usPackagesAccepted
Packages Accepted
Number of Packages that
can be Accepted
0x0202
UINT16
usReserved
Reserved
Set to 0
0x0204
UINT8
abSendMbx[ 1596 ]
Send Mailbox
Non Cyclic Data To The
Network or to the Protocol
Stack
0x0840
UINT16
usWaitingPackages
Packages waiting
Counter of packages that
are waiting to be
processed
0x0842
UINT16
usReserved
Reserved
Set to 0
0x0844
UINT8
abRecvMbx[ 1596 ]
Receive Mailbox
Non Cyclic Data from the
network or from the
protocol stack
Table 14: Channel Mailboxes
Hilscher, 2006-2013
Dual-Port-Memory
3.3
30/336
Status
A status block is present within the communication channel. It contains information about network
and task related issues. In some respects, status and control block are used together in order to
exchange information between host application and netX firmware. The application reads a status
block whereas the control block is written by the application. Both status and control block have
registers that use the Change of State mechanism (see also section 2.2.1 of the netX Dual-PortMemory manual).
All Implementations
Type
Name
Description
0x0010
UINT32
ulCommunicationCOS
Communication Change
of State
READY, RUN, RESET
REQUIRED, NEW,
CONFIG AVAILABLE,
CONFIG LOCKED
0x0014
UINT32
ulCommunicationState
Communication State
NOT CONFIGURED,
STOP, IDLE, OPERATE
0x0018
UINT32
ulCommunicationError
Communication Error
Unique Error Number
According to Protocol
Stack
0x001C
UINT16
usVersion
Version
Version Number of this
Diagnosis Structure
0x001E
UINT16
usWatchdogTime
Watchdog Timeout
Configured Watchdog
Time
0x0020
UINT16
usHandshakeMode
0x0022
UINT16
usReserved
Reserved
Set to 0
0x0024
UINT32
ulHostWatchdog
Host Watchdog
Handshake Mode
Process Data Transfer
Mode (see netX DPM
Interface Manual)
Joint Supervision
Mechanism
PROFIBUS DP-Master | Protocol API
DOC061001API18EN | Revision 18 | English | 2013-10 | Released | Public
Hilscher, 2006-2013
Dual-Port-Memory
31/336
Protocol Stack Writes,
Host System Reads
0x0028
UINT32
ulErrorCount
Error Count
Total Number of Detected
Error Since Power-Up or
Reset
0x002C
UINT32
ulErrorLoglnd
0x0030
UINT32
ulReserved[2]
Reserved
Set to 0
Hilscher, 2006-2013
Dual-Port-Memory
32/336
The communication change of state register contains information about the current operating
status of the communication channel and its firmware. Every time the status changes, the netX
protocol stack toggles the netX Change of State Command flag in the netX communication flags
register (see section 3.2.2.1 of the netX DPM Interface Manual). The application then has to toggle
the netX Change of State Acknowledge flag back acknowledging the new state (see section
3.2.2.2 of the netX DPM Interface Manual).
Short name
Name
D31..D7
D6
RCX_COMM_COS_RESTART_REQUIRED_ENABLE
D5
Restart Required
RCX_COMM_COS_RESTART_REQUIRED
D4
Configuration New
RCX_COMM_COS_CONFIG_NEW
D3
Configuration Locked
RCX_COMM_COS_CONFIG_LOCKED
D2
Bus On
RCX_COMM_COS_BUS_ON
D1
Running
RCX_COMM_COS_RUN
D0
Ready
RCX_COMM_COS_READY
Hilscher, 2006-2013
Dual-Port-Memory
33/336
Bit
0
Definition / Description
Ready (RCX_COMM_COS_READY)
0-
1 - The Ready flag is set as soon as the protocol stack is started properly. Then the protocol
stack is awaiting a configuration. As soon as the protocol stack is configured properly, the
Running flag is set, too.
Running (RCX_COMM_COS_RUN)
0-
1 -The Running flag is set when the protocol stack has been configured properly. Then the
protocol stack is awaiting a network connection. Now both the Ready flag and the Running
flag are set.
Bus On (RCX_COMM_COS_BUS_ON)
0-
1 -The Bus On flag is set to indicate to the host system whether or not the protocol stack
has the permission to open network connections. If set, the protocol stack has the
permission to communicate on the network; if cleared, the permission was denied and the
protocol stack will not open network connections.
7 31
Reserved, set to 0
Hilscher, 2006-2013
Dual-Port-Memory
34/336
The communication state field contains information regarding the current network status of the
communication channel. Depending on the implementation, all or a subset of the definitions below
is supported.
UNKNOWN
#define RCX_COMM_STATE_UNKNOWN
NOT_CONFIGURED
STOP
#define RCX_COMM_STATE_STOP
0x00000002
IDLE
#define RCX_COMM_STATE_IDLE
0x00000003
OPERATE
#define RCX_COMM_STATE_OPERATE
0x00000004
0x00000000
This field holds the current error code of the communication channel. If the cause of error is
resolved, the communication error field is set to zero (= RCX_SYS_SUCCESS) again. Not all of the
error codes are supported in every implementation. Protocol stacks may use a subset of the error
codes below.
SUCCESS
#define RCX_SYS_SUCCESS
0x00000000
#define RCX_E_WATCHDOG_TIMEOUT
0xC000000C
Runtime Failures
WATCHDOG TIMEOUT
Initialization Failures
0xC0000100
#define RCX_E_DATABASE_ACCESS_FAILED
0xC0000101
Configuration Failures
NOT CONFIGURED
#define RCX_E_NOT_CONFIGURED
0xC0000119
0xC0000120
#define RCX_E_INCONSISTENT_DATA_SET
0xC0000121
#define RCX_E_DATA_SET_MISMATCH
INSUFFICIENT LICENSE
#define RCX_E_INSUFFICIENT_LICENSE
0xC0000122
0xC0000123
PARAMETER ERROR
#define RCX_E_PARAMETER_ERROR
0xC0000124
0xC0000125
NO SECURITY MEMORY
#define RCX_E_NO_SECURITY_MEMORY
0xC0000126
Hilscher, 2006-2013
Dual-Port-Memory
35/336
Network Failures
#define RCX_COMM_NETWORK_FAULT
0xC0000140
CONNECTION CLOSED
#define RCX_COMM_CONNECTION_CLOSED
0xC0000141
#define RCX_COMM_CONNECTION_TIMEOUT
0xC0000142
LONELY NETWORK
#define RCX_COMM_LONELY_NETWORK
0xC0000143
DUPLICATE NODE
#define RCX_COMM_DUPLICATE_NODE
0xC0000144
CABLE DISCONNECT
#define RCX_COMM_CABLE_DISCONNECT
0xC0000145
The version field holds version of this structure. It starts with one; zero is not defined.
STRUCTURE VERSION
#define RCX_STATUS_BLOCK_VERSION
0x0001
This field holds the configured watchdog timeout value in milliseconds. The application may set its
watchdog trigger interval accordingly. If the application fails to copy the value from the host
watchdog location to the device watchdog location, the protocol stack will interrupt all network
connections immediately regardless of their current state. For details, see section 4.13 of the netX
DPM Interface Manual.
Host Watchdog (All Implementations)
The protocol stack supervises the host system using the watchdog function. If the application fails
to copy the value from the device watchdog location (section 3.2.5 of the netX DPM Interface
Manual) to the host watchdog location (section 3.2.4 of the netX DPM Interface Manual), the
protocol stack assumes that the host system has some sort of problem and shuts down all network
connections. For details on the watchdog function, refer to section 4.13 of the netX DPM Interface
Manual.
Error Count (All Implementations)
This field holds the total number of errors detected since power-up, respectively after reset. The
protocol stack counts all sorts of errors in this field no matter if they were network related or caused
internally.
Error Log Indicator (All Implementations)
Not supported yet: The error log indicator field holds the number of entries in the internal error log.
If all entries are read from the log, the field is set to zero.
Hilscher, 2006-2013
Dual-Port-Memory
3.3.1.2
36/336
Master Implementation
In addition to the common status block as outlined in the previous section, a master firmware
maintains the following structure.
Master Status Structure Definition
Master Status
Offset
Type
Name
Description
0x0010
Structure
0x0038
UINT32
ulSlaveState
Slave State
OK, FAILED (At Least
One Slave)
0x003C
UINT32
ulSlaveErrLogInd
0x0040
UINT32
ulNumOfConfigSlaves
Configured Slaves
Number of Configured
Slaves On The Network
0x0044
UINT32
ulNumOfActiveSlaves
Active Slaves
Number of Slaves
Running Without
Problems
0x0048
UINT32
ulNumOfDiagSlaves
Faulted Slaves
Number of Slaves
Reporting Diagnostic
Issues
0x004C
UINT32
ulReserved
Reserved
Set to 0
Hilscher, 2006-2013
Dual-Port-Memory
37/336
Slave State
The slave state field is available for master implementations only. It indicates whether the master is
in
cyclic data exchange to all configured slaves. In case there is at least one slave missing or if the
slave
has a diagnostic request pending, the status is set to FAILED. For protocols that support non-cyclic
communication only, the slave state is set to OK as soon as a valid configuration is found.
Status and Error Codes
Code (Symbolic Constant)
Numerical Value
Meaning
RCX_SLAVE_STATE_UNDEFINED
0x00000000
UNDEFINED
RCX_SLAVE_STATE_OK
0x00000001
OK
RCX_SLAVE_STATE_FAILED
0x00000002
Slave Implementation
The slave firmware only uses the common structure as outlined in section 3.3.1.1 of this document.
Hilscher, 2006-2013
Dual-Port-Memory
38/336
Type
Name
Description
0x0050
UINT8[]
PROFIBUS_APM_EXT_STATUS_T)
abExtendedStatu
s)
0x0090
UINT8[]
unused, (rest of
abExtendedStatu
s)
0x00FC
Structure
tExtStateField
NETX_EXTENDED_STATE_FIELD_T
Structure to define
Status Fields and their
Properties. Status type
and properties are
specific to protocol
implementation
Note: Each offset is always related to the begin of corresponding channel start
The definition of the first structure remains specific to correspondent protocol and contains
additional information about network status (i.e. flags, error counters, events etc.).
The second structure begins at offset 0x00FC and provides the definition of the up to 32
independent State Fields. These state fields can be defined to represent a kind of bit-list, byte-list
etc. with up to 65535 entities. In this way a common access mechanism for different state
definitions and quantities can be provided independent of protocol implementation.
Hilscher, 2006-2013
Dual-Port-Memory
39/336
bus timeouts */
usTime_Out_Cnt;
/* reserved area */
unsigned char
abReserved[8];
/* Bit-Ready, Cfg-Ready and diagnostic display of slave devices */
unsigned char
abSl_cfg [16]; /* Slave configuration area */
unsigned char
abSl_state[16]; /* Slave state information area */
unsigned char
abSl_diag [16]; /* Slave diagnostic area */
} PROFIBUS_APM_GLOBAL_STATE_FIELD_T;
typedef struct PROFIBUS_APM_EXT_STATUS_Ttag {
PROFIBUS_APM_GLOBAL_STATE_FIELD_T tGlobStateFiled;
} PROFIBUS_APM_EXT_STATUS_T;
Hilscher, 2006-2013
Dual-Port-Memory
40/336
Type
Name
Description
0x50
unsigned char
bGlobalBits
0x51
unsigned char
bDPM_state
0x52
unsigned char
bErr_Rem_Adr
0x53
unsigned char
bErr_Event
Error event
0x54
unsigned short
usBus_Error_Cnt
0x56
unsigned short
usTime_Out_Cnt
0x58
unsigned char
abReserved[8]
Reserved area
Bit-Ready, Cfg-Ready and diagnostic display of
slave devices:
0x60
[16]
0x60
unsigned char
abSl_cfg
0x70
unsigned char
abSl_state[16]
0x80
unsigned char
abSl_diag [16]
Table 21: Extended Status Block for PROFIBUS DP-Master First part
The single items of the Extended Status Block for PROFIBUS DP Master have the following
meaning
bGlobalBits/ Global Bits
The global bits byte bGlobalBits is a bit field to indicate bus and master main errors
containing the following information:
Bit 7
Unused
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bits 0
MSK_PRO
FIBUS_A
PM_EXT_
STA_TOU
T
MSK_PROF
IBUS_APM
_EXT_STA
_NRDY
MSK_PRO
FIBUS_A
PM_EXT_
STA_FAT
L_ERR
MSK_PRO
FIBUS_A
PM_EXT_
STA_NEX
C_ERR
MSK_PROF
IBUS_APM
_EXT_STA
_ACLR_ER
R
MSK_PRO
FIBUS_A
PM_EXT_
STA_CTR
L_ERR
This bit field serves as collective display of global notifications. Notified errors can either
occur at the device itself or at the slaves. To distinguish the different errors the variable
bErr_Rem_Adr contains the error location (i.e. bus address), while the variable
bErr_Event specifies the corresponding error number. If more than one error is
determined, the error location will always show the lowest faulty bus address.
Hilscher, 2006-2013
Dual-Port-Memory
41/336
Explanation
MSK_PROFIBUS_APM_EXT_STA_CTRL_ERR
CONTROL-ERROR:
This error is caused by incorrect parameterization.
MSK_PROFIBUS_APM_EXT_STA_ACLR_ERR
AUTO-CLEAR-ERROR:
The device stopped the communication to all slaves
and reached the auto-clear end state
MSK_PROFIBUS_APM_EXT_STA_NEXC_ERR
NON-EXCHANGE-ERROR:
At least one slave has not reached the data exchange
state and no process data are exchanged with it.
MSK_PROFIBUS_APM_EXT_STA_FATL_ERR
FATAL-ERROR:
Because of a severe bus error, no bus communication
is possible any more
MSK_PROFIBUS_APM_EXT_STA_NRDY
Host-NOT-READY-NOTIFICATION:
Indicates if the host program has set its state to
operative or not. If the bit is set the host
TIMEOUT-ERROR:
The Device has detected an overstepped timeout
supervision time because of rejected PROFIBUS
telegrams. It's an indication for bus short circuits while
the master interrupts the communication. The number
of detected timeouts are fixed in the Time_out_cnt
variable. The bit will be set when the first timeout
The master main state represents the operation mode of the PROFIBUS DP master stack.
This
operation
mode
is
defined
in
section
6.1.3PROFIBUS_FSPMM_CMD_SET_MODE_REQ/CNF Set a new Operation Mode
of this document. Allowed operation modes are:
Operation mode
Value
USIF_OFFLINE
0x00
USIF_STOP
0x40
USIF_CLEAR
0x80
USIF_OPERATE
0xC0
Table 24: Operation Modes of the PROFIBUS DP Master and their Values
Changes
of
the
master
main
state
are
indicated
by
the
PROFIBUS_FSPMM_CMD_MODE_CHANGE_IND Mode changed Indication, also see
section 0 for more information. If you want to change this state, you can accomplish this
by sending a PROFIBUS_FSPMM_CMD_SET_MODE_REQ/CNF Set a new Operation
packet to the FSPMM task, also see section 6.1.3 of this document.
PROFIBUS DP-Master | Protocol API
DOC061001API18EN | Revision 18 | English | 2013-10 | Released | Public
Hilscher, 2006-2013
Dual-Port-Memory
42/336
This variable is a counter for severe bus errors, for example short circuits on the bus.
usTime_Out_Cnt/ Counter for bus timeouts
This variable is a counter for the number of rejected PROFIBUS telegrams because of
heavy bus error.
abReserved[8]/ Reserved area
This variable is a field of 16 bytes and contains the parameterization state of each slave
station. The following table shows, which bit is related to which slave station address:
Bit
D7
D6
D5
D4
D3
D2
D1
D0
0x60
0x61
15
14
13
12
11
10
0x62
23
22
21
20
19
18
17
16
127
126
125
124
123
122
121
120
Offset
0x6F
Table 25: Relationship between Slave Station Address and the corresponding abSl_cfg Bit
This variable is a field of 16 bytes and contains the state of each slave station. The
following table shows, which bit is related to which slave station address:
Bit
D7
D6
D5
D4
D3
D2
D1
D0
0x70
0x71
15
14
13
12
11
10
0x72
23
22
21
20
19
18
17
16
127
126
125
124
123
122
121
120
Offset
0x7F
Table 26: Relationship between Slave Station Address and the corresponding abSl_state Bit
PROFIBUS DP-Master | Protocol API
DOC061001API18EN | Revision 18 | English | 2013-10 | Released | Public
Hilscher, 2006-2013
Dual-Port-Memory
43/336
This variable is a field of 16 bytes containing the diagnostic bit of each slave. The
following table shows the relationship between the slave station address and the
corresponding bit in the variable abSl_diag.
Bit
D7
D6
D5
D4
D3
D2
D1
D0
0x80
0x81
15
14
13
12
11
10
0x82
23
22
21
20
19
18
17
16
127
126
125
124
123
122
121
120
Offset
0x8F
Table 27: Relationship between Slave Station Address and the corresponding abSl_diag Bit
abSl_state
abSl_diag = 0
abSl_diag = 1
abSl_state = 0
abSl_state = 1
No
DataIOExchange
between master and
slave.
and
DataIOExchange
between master
slave.
Hilscher, 2006-2013
Dual-Port-Memory
44/336
The following error numbers are valid for bErr_Event, if bErr_Rem_Adr is not equal to 255:
bErr_Event
signification
error source
help
Master telegram
Master telegram
no answer-data, although
the slave must response
with data
Slave
17
Slave
18
Device
incorrect parameter in
request
master telegram
21
Table 29: Errors which may occur in the Network (bErr_Rem_Adr is not equal to 255)
The following error numbers are valid for bErr_Event, if bErr_Rem_Adr is equal to 255:
bErr_Event
signification
error source
help
no mistakes appear
50
Device
51
no global data-field
Device
52
Device
53
Device
54
Device
55
incorrect parameter-value
in the master parameters
project planning
56
project planning
57
incorrect parameter-value
in a slave parameters
data file
project planning
58
project planning
59
project planning
60
project planning
61
project planning
Hilscher, 2006-2013
Dual-Port-Memory
bErr_Event
45/336
signification
error source
help
process data
62
data-areas of slaves
overlapping in the receive
process data
project planning
63
warmstart
check warmstart
parameters
64
Device
65
project planning
202
Device
212
incorrect reading of a
data base
Device
213
structure-surrender to
operating system faulty
Device
220
Host
221
No Data Acknowledge in
process data handshake
mode 0
Host
222
Master in Auto_Clear
Slave Device
225
No further Segments
Device
Table 30: Errors which may occur in the PROFIBUS DP Master Device (bErr_Rem_Adr is equal to 255)
Besides the global bits, master main state, error informations and counters, additional status bit
lists of slaves are defined in this structure (namely slave configuration area, slave state information
area, slave diagnostic area). These bit lists contain the current state information of all slave
devices the master communicates with (i.e. 16 bytes = 128 devices). Despite the fact that the
implementation of extended status block is protocol specific, the place and definition of these bit
lists are to a greater or lesser extent similar for all Hilscher Fieldbus Master protocol stacks. The
layout of this block is still maintained with actual specification and will be supported further. The
example below shows a generic way to define the corresponding location of the bit lists located at
the offsets 0x60, 0x70 and 0x80 (see Table above). Three state structures are needed to be
defined to locate such bit lists i.e. inside of input data block.
Hilscher, 2006-2013
Dual-Port-Memory
46/336
Extended Status Block for PROFIBUS DP-Master Second part (State Field Definition Block)
Offset
Type
Name
Description/Value
0x00FC
unsigned char
bReserved[3]
0x00FF
unsigned char
bNumStateStructs
NETX_EXTENDED_
atStateStruct[0]
bStateArea
STATE_STRUCT_T
0x0100
unsigned char
channel 0
unsigned char
bStateTypeID
unsigned short
usNumOfStateEntries
unsigned long
ulStateOffset
NETX_EXTENDED_
atStateStruct[1]
bStateArea
STATE_STRUCT_T
0x0108
unsigned char
channel 0
unsigned char
bStateTypeID
unsigned short
usNumOfStateEntries
unsigned long
ulStateOffset
NETX_EXTENDED_
atStateStruct[2]
bStateArea
STATE_STRUCT_T
0x0110
unsigned char
channel 0
unsigned char
bStateTypeID
unsigned short
usNumOfStateEntries
unsigned long
ulStateOffset
Hilscher, 2006-2013
Dual-Port-Memory
NETX_EXTENDED_
47/336
atStateStruct[3]
bStateArea
STATE_STRUCT_T
0x0130
unsigned char
channel 0
unsigned char
bStateTypeID
unsigned short
usNumOfStateEntries
unsigned long
ulStateOffset
Table 31: Extended Status Block for PROFIBUS DP-Master Second part (State Field Definition Block)
If the location of the state fields is defined to be inside of input data area 0 block (as it is shown in
generic example above), the corresponding bit lists will be updated by the stack consistently to the
data in this area. Moreover, the data and corresponding state fields can be read out by the host
application as one data block i.e. with DMA support.
Hilscher, 2006-2013
Dual-Port-Memory
48/336
Type
Name
Description
0x0008
UINT32
ulApplicationCOS
Application Change Of
State
State Of The Application
Program
INITIALIZATION, LOCK
CONFIGURATION
0x000C
UINT32
ulDeviceWatchdog
Device Watchdog
Host System Writes,
Protocol Stack Reads
For more information concerning the Control Block please refer to the netX DPM Interface Manual.
Hilscher, 2006-2013
49/336
Topic
Section
Number
Section Name
Cyclic data
transfer
(Input/Output)
6.1.8
6.1.7
Acyclic data
transfer (Records)
6.1.9
6.1.10
Alarm
management
6.1.11
PROFIBUS_FSPMM_CMD_ALARM_NOTIFICATION_IND Alarm
Notification
6.1.12
PROFIBUS_FSPMM_CMD_ALARM_ACK_REQ/CNF Alarm
Acknowledge
Table 32: Overview about Essential Functionality (Cyclic and acyclic Data Transfer and Alarm Handling).
Hilscher, 2006-2013
50/336
Hilscher, 2006-2013
51/336
Hilscher, 2006-2013
52/336
Parameter
Meaning
Bus_Para_Len
34
FDL_Add
1-125
Baud_rate
0-11
TSL
Slot-time
37-16383
Min TSDR
1-1023
Max TSDR
1-1023
TQUI
Quiet time
0-127
TSET
Setup time
1-255
TTR
>= 255
1-255
HSA
1-126
Max_Retry_Limit
1-15
Bp_Flag
0-255
Min_Slave_Interval
0-65535
Poll_Timeout
0-65535
Data_Control_Time
1-65535
Alarm_Max
Maximum Alarms
7-32
Max_User_Global_C
ontrol
1-255
Reserved
4 reserved octets
Master_User_Data_L
en
Master_Class2_Nam
e[32]
Master_User_Data[32
]
TCL
Max_TSH
0-32
0-32
Table 33: Bus and Master Parameters, their Meanings and their Ranges of allowed Values
Hilscher, 2006-2013
53/336
Bus_Para_Len
This parameter is calculated as the length of the bus parameter structure in bytes including the
field itself.
4.2.3.2
FDL_Add
This parameter is used for defining the address of the PROFIBUS DP Master itself.
Note: Configuration of addresses in a PROFIBUS network must be performed in such a
way that all addresses are used uniquely. No addresses may appear twice or more often
within the PROFIBUS network!
Note: Do not use the address 0 as the master address although this would both be
possible and allowed because this address is often used by configuration and diagnosis
devices. Therefore, it is a good idea to choose a non-zero address for the PROFIBUS DP
Master.
4.2.3.3
Baud_rate
This parameter contains the baud rate (i.e. the transmission speed of data signals) used by all
stations of the PROFIBUS network in a coded manner. This value must be set to the same value at
all slave stations within the network. If this is not the case, all stations with deviating transmission
speed setting will not operate correctly.
The coding is as follows:
Symbolic Name
Baud rate
Value
PROFIBUS_DL_DATA_RATE_96
9,6 kBits/s
PROFIBUS_DL_DATA_RATE_19_2
19,2 kBits/s
PROFIBUS_DL_DATA_RATE_93_75
93,75 kBits/s
PROFIBUS_DL_DATA_RATE_187_5
187,5 kBits/s
PROFIBUS_DL_DATA_RATE_500
500 kBits/s
PROFIBUS_DL_DATA_RATE_1500
1500 kBits/s
PROFIBUS_DL_DATA_RATE_3000
3000 kBits/s
PROFIBUS_DL_DATA_RATE_6000
6000 kBits/s
PROFIBUS_DL_DATA_RATE_12000
12000kBits/s
PROFIBUS_DL_DATA_RATE_31_25
31.25kBits/s
10
PROFIBUS_DL_DATA_RATE_45_45
45.45 kBits/s
11
PROFIBUS_DL_DATA_RATE_AUTO
Auto-detection mode.
15
4.2.3.4
This parameter defines the 'Wait for receipt' monitoring time, i.e. the time the master will wait for
immediate response or confirmation after sending a request. If the slot time has passed and no
response arrived, the telegram will be sent again until the maximum retry limit (i.e. maximum
allowed number of repetitions of sending the telegram) has been reached.
PROFIBUS DP-Master | Protocol API
DOC061001API18EN | Revision 18 | English | 2013-10 | Released | Public
Hilscher, 2006-2013
54/336
This time is identical to the time interval within which the master must either send a request
telegram or give the token to the next station.
Allowed values for the slot time range from 37 to 16383. The default value however depends on
the chosen baudrate.
4.2.3.5
Min TSDR
This is the shortest time that must elapse before a remote recipient (Responder) may send an
acknowledgement of a received query telegram. The shortest time between the reception of the
last Bit of a telegram to the sending of the first Bit of a following telegram.
Allowed values for the slot time range from 1 to 65535. Default value is 11.
4.2.3.6
Max TSDR
This is the longest time that must elapse before a sender (Requestor) is allowed to send a further
query telegram. The largest time between reception of the last Bit of a telegram to the sending of
the first bit of a following telegram. The sender (Requestor, Master) must wait at least for this time
after the sending of an unacknowledged telegram (e.g. Broadcast only) before a new telegram is
sent.
Allowed values for the slot time range from 1 to 65535. The default value depends from the baud
rate.)
4.2.3.7
The quiet time is defined as the time delay that occurs for modulators (Modulator-trip time) and
Repeaters (Repeater-switch time) for the change over from sending to receiving.
Allowed values for the slot time range from 0 to 127. (The default value depends from the baud
rate.)
4.2.3.8
The setup time represents the minimum period reaction time between the receipt of an
acknowledgement to the sending of a new query telegram (Reaction) by the Sender (Requestor).
Allowed values for the slot time range from 0 to 255. (The default value depends from the baud
rate.)
4.2.3.9
The target rotation time is defined as the pre-set nominal token cycling time within the sender
authorization (Token) will cycle around the ring. How much time the Master still has available for
sending data telegrams to the Slaves is dependent on the difference between the nominal and the
actual token cycling time.
Allowed values for the target rotation time range from 1 .. 224-1 (=16.777.215). (The default value
depends on the number of slaves attached to the master and their module configuration)
4.2.3.10 G (GAP Actualization Factor)
The GAP Actualization Factor is applied for determining after how many token cycles an added
participant is accepted into the token ring. After expiry of the time G*TTR, the station searches to
see whether a further participant wishes to be accepted into the logical ring.
Allowed values for the GAP Actualization Factor range from 1 to 100. (The default value is 10.)
PROFIBUS DP-Master | Protocol API
DOC061001API18EN | Revision 18 | English | 2013-10 | Released | Public
Hilscher, 2006-2013
55/336
The Highest Station Address parameter represents the highest bus address up to which a Master
searches for another Master at the bus in order to pass on the Token. On no account, this station
address must be smaller than the Master station address.
Allowed values for the highest station address range from 1 to 126.
4.2.3.12 Max_Retry_Limit
As already mentioned above, this parameter is the maximum allowed number of repetitions in
order to send the telegram before sending will be aborted.
Allowed values for the maximum retry limit range from 1 to 15. The default value depends on the
baud rate.
4.2.3.13 Bp_Flag
This flag decides on the system behaviour if the master recognizes one slave station not to be
responsive any more. If the most significant bit is set, then Auto Clear mode is activated meaning
the operational state of the affected slave will be set from OPERATIONAL to STOP by the master.
Otherwise, the slave will remain in OPERATIONAL state.
4.2.3.14 Min_Slave_Interval
The minimum slave interval defines the minimum time period between two slave list cycles. The
maximum value that the active Stations require is always given.
Allowed values for the minimum slave interval range from 1.. 216-1 (=65535). The default value
depends from the types of slaves used in the PROFIBUS network.
4.2.3.15 Poll_Timeout
The Class2 Poll timeout parameter is only relevant when working as DP V1 Class 2 master
(currently not supported). It defines the maximum time in a Master-Master communication
relationship within which the answer must be fetched by the requestor.
Allowed values for the Class2 Poll timeout parameter range from 0... 216-1 (=65535).
4.2.3.16 Data_Control_Time
The data control time defines the time within the Data_Transfer_List is updated at least once. After
the expiration of this period, the Master (class 1) reports its operating condition automatically via
the Global_Control command.
Allowed values for the data control time from 1.. 232-1 (= 4.294.967.295). The default value
depends from the baud rate.
4.2.3.17 Master Setting
This parameter may only have the values 0 or 1. It indicates whether word-oriented IO data (16 bit
data) are handled in Motorola (Master Setting = 0) or Intel format(Master Setting = 1, high and low
byte are swapped, i.e. exchanged by each other).
Note: The former parameter Alarm_Max is no longer supported.
Hilscher, 2006-2013
56/336
4.2.3.18 Max_User_Global_Control
This parameter specifies the allowed maximum number of simultaneously active Global Control
requests from the user. This is a capability of the PROFIBUS DP master. This value can range
from 1 to 255, but it might be reasonable to set it to 16 in order to provide he possibility to issue
one SYNC and one FREEZE command for each of the 8 slave groups.
4.2.3.19 Reserved
It specifies the length of the user data area at the master. It may not exceed 32, see
Master_User_Data[32] below.
4.2.3.21 Master_Class2_Name[32]
The Master Class2 Name parameter is only relevant when working as DP V1 Class 2 master
(currently not supported) It represents the name of a PROFIBUS DP V1 Class 2 master, if any is
present within the PROFIBUS DP network. It is a field with a length of 32 bits.
4.2.3.22 Master_User_Data[32]
The first two bytes are spend to set the PROFIBUS Ident Number. Therefore the variable
Master_User_Data_Len has to be set to 2. If the values are set to 0 the stack will ignore this Ident
number.
Master_User_Data[0] = IdentNumberLowByte;
Master_User_Data[1] = IdentNumberHigh Byte
The next four bytes are used to overwrite some internal FW/HW revision variables for the stack.
Master_User_Data[2] = bHardVrsUsrDdlm
Master_User_Data[3] = bFirmVrsUsrDdlm
Master_User_Data[2] = bHardVrsUsr
Master_User_Data[3] = bFirmVrsUsr
This variables are returned with service Get_Master_Diag() of a master - master communication.
Usually this values can be set to 0 and the stack will use it internal values. If it is necessary to
change this values e.g. to adopt to your own HW revision, the it can be overwritten if the particular
value is <> 0. There for the variable Master_User_Data_Len has to set 6.
4.2.3.23 TCL
Hilscher, 2006-2013
57/336
In order to get correct communication on the PROFIBUS network, it is necessary that the following
conditions for some important bus parameters are fulfilled:
TQUI < min TSDR
TRDY < min TSDR
TQUI < TRDY
Hilscher, 2006-2013
58/336
Meaning
Range of Values
Slave Address
0125
Slave_Para_Len
0-65535
Sl_Flag
0-255
Slave_Type
0-255
Max_Diag_Data_Len
Max_Alarm_Len
4-64
Max_Channel_Data_Length
4-244
Diag_Upd_Delay
0-15
Alarm_Mode
0-7
Add_Sl_Flag
Ignore auto_clear
0-3
C1_Timeout
0-65535
bReserved[4]
Prm_Data_Len
Prm_Data
Cfg_Data_Len
Cfg_Data
Add_Tab_Len
Add_Tab
Slave_User_Data_Len
Slave_User_Data
9-246
3-246
2-65504
2-65504
Table 35:Slave Parameters, their Meanings and their Ranges of allowed Values
Hilscher, 2006-2013
59/336
Slave Address
Slave_Para_Len
This parameter indicates the length of the whole data structure containing the slave parameter set
given in bytes. This length is computed including the length parameter itself.
It is also used for another purpose: By setting this parameter to zero, a PROFIBUS DP slave
parameter set can be deleted easily.
4.2.4.3
Sl_Flag
This parameter (1 byte) contains some flags, which are explained by the table below:
Name
Value
Description
D7
Active
DP slave is deactivated
DP slave is activated
D6
D5
New_Prm
Fail_Safe
D4
D3
D2
D1
D0
Reserved
DPV1_Supported
DPV1_Data_Type
Extra_Alarm_SAP
Reserved
Hilscher, 2006-2013
60/336
Slave_Type
meaning
DP slave
1 - 15
16 - 255
Manufacturer-specific meaning
4.2.4.5
Max_Diag_Data_Len
This parameter indicates the maximum length of diagnostic data the slaves should send to the
master.
4.2.4.6
Max_Alarm_Len
This parameter specifies the maximum length of the data area for DPV1 alarms.This value must be
at least 4 and may not exceed the lower value of
Max_Diag_Data_Len 6
and 64.
4.2.4.7
Max_Channel_Data_Length
This parameter indicates the maximum size of channel data (i.e. the size of the PDU of the status
machine MSAC1 described in the IEC 61158/EN 50170 specification.
4.2.4.8
Diag_Upd_Delay
This parameter is used for counting the number of DDLM_Slave_Diag.con confirmations in the
state DIAG2 while Diag_Data.Prm_Req continues to be set (for slaves with reduced performance).
4.2.4.9
Alarm_Mode
This parameter indicates the maximum number of active alarms that can be handled by the
PROFIBUS DP master. The table below explains the coding:
Value
Meaning
2 alarms in total
4 alarms in total
8 alarms in total
12 alarms in total
16 alarms in total
24 alarms in total
32 alarms in total
Hilscher, 2006-2013
61/336
4.2.4.10 Add_Sl_Flag
This parameter (1 byte) contains some flags, which are explained by the table below:
Explanation of Bits of Add_Sl_Flag within Slave Parameter Block
Bit
Name
Value
Description
D7
Reserved
D6
Reserved
D5
Reserved
D4
Reserved
D3
Reserved
D2
Reserved
D1
D0
Ignore_Aclr
NA_To_Abort
no abort if NA occurs
abort if NA occurs
4.2.4.11 C1_Timeout
This parameter indicates a 16-bit value specifying a timeout value for Class 1 services.
4.2.4.12 bReserved[4]
This parameter contains the length of the subsequent parameter area Prm_Data including 2 bytes
the length parameter itself. The length is specified in bytes
4.2.4.14 Prm_Data
The length of these together must not exceed 244 bytes, however, it is recommended not to
exceed an amount of 32 bytes otherwise some restrictions apply, see IEC 61158/EN 50170
specification.
The 7 octets are structured as follows:
Hilscher, 2006-2013
62/336
Name
D7
Lock_Req
The lock request bit together with the unlock request bit governs how the DP slave
will be locked or unlocked, see table below.
D6
Unlock_Req
The unlock request bit together with the lock request bit governs how the DP slave
will be locked or unlocked, see table below.
D5
Sync_Req.
Forces operation in SYNC mode if supported by the slave and delivered by the
Global_Control function.
D4
Freeze_Req
Forces operation in FREEZE mode if supported by the slave and delivered by the
Global_Control function.
D3
WD_On
D2D0
Value
Description
Watchdog control
Reserved
The possible combinations of the Lock_Req bit and the Unlock_Req bit have the following
meaning:
Lock_Req bit
Unlock_Req bit
Meaning
It is only possible to change the parameter TSDR, all other parameters cannot be
changed.
The DP slave is locked for accesses from other masters. All parameters are
accepted, except minTSDR will be set to 0.
These octets may have values between 0 and 255. Both values represent factors for setting the
watchdog control time TWD. If the master fails and subsequently the chosen watchdog time expires,
the output data will fall into the safe state.
The watchdog time can be computed in units of multiples of 10 milliseconds (= 0,01 seconds) by
simply multiplying WD_Fact1 with WD_Fact2. Thus, values between 10 milliseconds and
approximately 650 seconds are selectable for the watchdog time.
Note: Watchdog control is switched on and off using bit D3 of octet 1, refer to above.
Hilscher, 2006-2013
63/336
This is the minimum time a DP slave will wait until it will send the response frame to the master. In
case of a pure DP system, this is a value in the range between 0 and the value maxTSDR
In mixed systems, the upper limit is 255 times TBit.
Octet 5_6: Ident_Number
In these bytes, the slave station reports its identification number, which has been assigned to it by
the manufacturer.
Octet 7: Group Ident_Number
This is an extended diagnostic buffer. The values are determined by the slave station and should
be described in the manual of the slave station.
4.2.4.15 Cfg_Data_Len
This parameter contains the length of the subsequent parameter area Cfg_Data including 2 bytes
the length parameter itself. The length is specified in bytes
4.2.4.16 Cfg_Data
The length of the complete check configuration data block must not exceed 244 bytes, however, it
is recommended not to exceed an amount of 32 bytes otherwise some restrictions apply, see the
IEC 61158 or EN 50170 specification.
4.2.4.17 Add_Tab_Len
This parameter contains the length of the subsequent parameter area Add_Tab including 2 bytes
the length parameter itself. The length is specified in bytes
Hilscher, 2006-2013
64/336
4.2.4.18 Add_Tab
The abAddTab field is a Hilscher-specific field, which configures the different offset addresses of
process data within the dual-port memory for modular and simple I/O slaves in common. See the
following structure:
abAddTab structure
Variable name
Type
Explanation
Input_Count
byte
Output_count
byte
One module entry in the Cfg_list must result in a corresponding entry in the abAddTab, except
modules with a data length of 0. In this table, the offset address within the dual-port memory of
each module is stored.
Offset addresses to be specified here are relative to the process image area and begin with 0. If
there are multiple offset addresses specified, each new one is again relative to the beginning of the
(input or output) process image area.
If the upper bit 15 in the IO_Offset[...] value is set to logical '1' then the address is interpreted
by the device as byte offset address, otherwise it is interpreted as word offset address.
If the first specified entry contains an offset of 2 and the second specified entry contains an offset
of 0 then the following will apply:
o
If its length does not exceed 2 bytes, the second specified entry will be located as the first
entry within the process image (at offset 0) and the first specified entry will be located as
the second entry within the process image (at offset 2).
Example
A configuration table for the above mentioned configuration with one input module (width 1 byte)
and two output modules with a width of 8 and 2 bytes:
o
Cfg_Data_Len = 0x05
Add_Tab_Len = 0x0A
Input_Count = 0x01
Output_Count = 0x02
Hilscher, 2006-2013
65/336
In this case, input and output data are arranged as displayed in the following figure:
4.2.4.19 Slave_User_Data_Len
This parameter contains the length of the subsequent parameter area Slave_User_Data
including 2 bytes the length parameter itself. The length is specified in bytes.
4.2.4.20 Slave_User_Data
This parameter contains slave specific data; see the slaves documentation for an explanation of
the meaning.
Hilscher, 2006-2013
66/336
DPM
MBX
Out
MBX
In
MBX
Task
MBX
Task
Handshake Area
HC
HC
Channel Area
Channel
MBX
Out
MBX
In
MBX
Task
MBX
Task
Out
In
netX
A
rX-Idle
rX-Timer
rX-System
Config
DB
Appl.
Cycle
AP-Task
FSPMM 0+1
Triple
Buffer for
cyclic IO
FSPMM2
Function Interface
Packet Interface
PROFIBUS-DL Task
Bus
Cycle
Timer
Other kind of
relation
xC
PROFIBUS XC
SRD, SDN, SDA
Figure 7: Internal Structure of PROFIBUS DP-Master Firmware
For the explanation of the different kinds of arrows see lower left corner of figure.
The dual-port memory is used for exchange of information, data and packets. Configuration and IO
data will be transferred using this way.
The user application only accesses the task located in the highest layer namely the AP-task which
constitute the application interface of the PROFIBUS DP-Master Stack.
The PROFIBUS FSPMM task, FSPMM2 task and PROFIBUS DL task together represent the core
of the PROFIBUS DP-Master Stack.
Hilscher, 2006-2013
67/336
In detail, the various tasks have the following functionality and responsibilities:
AP task
The AP task provides the interface to the user application and the control of the stack. It also
completely handles the Dual Port Memory interface of the communication channel. In detail, it is
responsible for the following:
Handling the communication channels DPM-interface
o
Channel mailboxes
Watchdog
Configuration packets
Packet Routing
PROFIBUS DL task
The PROFIBUS DL task is responsible for the FDL services. It provides the following items:
SAP handling
Life List
Data transmission services (SDA, SDN, SRD)
Hilscher, 2006-2013
4.3.1
68/336
An application which is based on Hilschers DPM for netX can obtain diagnostic and status
information about all slaves connected to and administered by this master from the master
firmware as described in general in the netX DPM Manual (Ref. 2). (This information only concerns
cyclic data transfer.) The PROFIBUS DP Master firmware supports this feature.
The netX operating system rcX uses handles in order to access at the slaves.
Retrieving the diagnostic information is a two-step-process as you first retrieve the handle using
the Get Slave Handle request and subsequently you retrieve the diagnostic information using the
handle.
1. Retrieve the handle by the Get Slave Handle request (RCX_GET_SLAVE_HANDLE_REQ,
Command code 0x2F08) which is described in the netX DPM Manual (Ref. 1), chapter
5.2.2.1. In order to do so, you need to choose which kind of list of the above mentioned slave
lists
you
want
to
obtain.
The
confirmation
packet
you
will
receive
(RCX_GET_SLAVE_HANDLE_CNF, Command code 0x2F09) will then deliver an array of
handles to the elements of the selected list.
This allows to obtain a diagnosis structure for the specific slave by the Get Slave Connection
Information request (RCX_GET_SLAVE_CONN_INFO_REQ, Command code 0x2F0A). This packet
requires the handle of the specific slave taken from the array of handles to the elements of the
selected list obtained in the first step. You will then receive the confirmation packet
(RCX_GET_SLAVE_CONN_INFO_CNF, Command code 0x2F0B) delivering besides others a
structure tState containing the following structure with information about the selected slave from
the master firmware (see reference 1 for more details). For a PROFIBUS DP Slave this structure
(PROFIBUS_FSPMM_DIAGNOSTIC_DATA_T) structure looks like:
typedef struct PROFIBUS_FSPMM_DIAGNOSTIC_DATA_Ttag {
struct
{
TLR_UINT8 bStation_Non_Existent : 1; /* no response */
TLR_UINT8 bStation_Not_Ready : 1; /* station not ready */
TLR_UINT8 bCfg_Fault : 1; /* configuration fault */
TLR_UINT8 bExt_Diag : 1; /* extended diagnostic */
TLR_UINT8 bNot_Supported : 1; /* sync, freeze not supported */
TLR_UINT8 bInvalid_Response : 1; /* response faulty */
TLR_UINT8 bPrm_Fault : 1; /* parameters faulty */
TLR_UINT8 bMaster_Lock : 1; /* locked by a master */
} Stationstatus_1;
struct
{
TLR_UINT8 bPrm_Req : 1; /* request new parameters */
TLR_UINT8 bStat_Diag : 1; /* static diagnostic */
TLR_UINT8 bTrue : 1; /* set to 1 by a slave */
TLR_UINT8 bWd_On : 1; /* watchdog function on/off */
TLR_UINT8 bFreeze_Mode : 1; /* freeze mode active */
TLR_UINT8 bSync_Mode : 1; /* sync mode active */
TLR_UINT8 bReserved : 1; /* reserved */
TLR_UINT8 bDeactivated : 1; /* slave deactivated */
} Stationstatus_2;
struct
{
TLR_UINT8 bReserved : 7;
TLR_UINT8 bExt_Diag_Overflow : 1; /* ext. diagnostic overflow */
} Stationstatus_3;
TLR_UINT8 bMaster_Add; /* corresponding master address */
TLR_UINT16 usIdent_Number; /* ident number, motorola format */
TLR_UINT8 abExt_Diag_Data[PROFIBUS_FSPM_ACT_MAX_EXT_DIAG_LEN];
/* extended diagnostic field */
} PROFIBUS_FSPMM_DIAGNOSTIC_DATA_T;
PROFIBUS DP-Master | Protocol API
DOC061001API18EN | Revision 18 | English | 2013-10 | Released | Public
Hilscher, 2006-2013
69/336
This
structure
is
exactly
the
same
as
the
one
delivered
by
the
PROFIBUS_FSPMM_PACKET_GET_SLAVE_DIAG_CNF_T confirmation packet, also see section
6.1.5PROFIBUS_FSPMM_CMD_GET_SLAVE_DIAG_REQ/CNF Request a Slave Diagnostic
on page 118 of this document.
The variables of this structure are explained in more detail in section 5.3.5.1 Diagnostic model of
PROFIBUS DP V0 (description of octets 1 to 3).
Hilscher, 2006-2013
Overview
70/336
5 Overview
5.1 PROFIBUS DP and the OSI/ISO Layer Model
As the picture below illustrates, PROFIBUS DP does not affect the layers 3, 4, 5 and 6 of the
OSI/ISO reference model of data communication within a network. It only specifies
Layer 1 (Physical layer)
Layer 2 (Data link layer)
Layer 7 (Application layer)
Hilscher, 2006-2013
Overview
71/336
Changes of the operation mode are supervised by an internal state machine within the PROFIBUS
DP master.
The system behaviour on the failure of a slave can be parameterized in the DP master, so that it
switches over automatically from OPERATE condition to the STOP condition. This also interrupts
user data transfer to all slaves and the module outputs are switched to the secure zero condition.
A
change
of
the
mode
is
indicated
to
the
AP-task
by
the
indication
PROFIBUS_FSPMM_CMD_MODE_CHANGE_IND Mode changed Indication, see section 0.
If the AP-task wants to change the mode, it can accomplish this by sending the
PROFIBUS_FSPMM_CMD_SET_MODE_REQ/CNF Set a new Operation Mode packet, which
is described in section 6.1.3 of this document.
Hilscher, 2006-2013
Overview
72/336
Alarm Processing
Diagnostics
Page
126
123
5.3.1.1
The most important prerequisite for cyclic data transfer is, that the operation mode is OPERATE.
In state CLEAR only a restricted cyclic data transfer is possible, in the other states no cyclic data
transfer at all is performed.
For example, a data transfer from the master to the slave using the
PROFIBUS_FSPMM_CMD_SET_OUTPUT_REQ/CNF Set new Output packet works in the
following way:
The master sends an SRD request with a variable data field length containing the output data
to the slave.
Immediately the slave will send back an SRD response containing its input data.
The number of available input and output channels is defined at the configuration during system
start-up. This configuration is done as a part of the processing of the bus parameter set, for more
information see
Hilscher, 2006-2013
Overview
5.3.1.2
73/336
Cyclic data transfer is supervised by a watchdog timer. The PROFIBUS DP slaves outputs will be
switched to a safe state if no regular data transfer happens within in the timer interval of the
watchdog timer. The PROFIBUS DP master contains a timer for each DP slave. The reaction of
the system depends on the value of the Auto_Clear configuration parameter in the following way:
Auto_Clear = TRUE:
If one slave supervised by the DP master fails, the outputs of all DP slaves which are supervised by this
DP master will be set to the save state. This option offers the highest degree of security.
Auto_Clear = FALSE:
If one slave supervised by the DP master fails, the cyclic data transfer is continued and a user-specific
reaction can occur. This option enables the addition and removal of stations during full operation of the
PROFIBUS system, which might be desirable in many cases.
For more information on the Auto_Clear flag, see section Bp_Flag on page 55.
Cyclic data transfer can also partially or totally be influenced by the synchronization commands
sync and freeze.
This can be done individually for inputs and outputs or also in a combined manner.
5.3.1.3
Synchronization of Inputs
Sending a Freeze command to a DP slave will cause reading the inputs and freezing them. This
means, all following read attempts of this input will deliver the value read at the time of the Freeze
command as long as the Freeze command has not been suspended. Suspending the Freeze
command is possible either by an unfreeze command or by a subsequent Freeze command.
Sending a Unfreeze command to a DP slave will cause normal operation of the cyclic inputs
again.
5.3.1.4
Synchronization of Outputs
Sending a Sync command to a DP slave will cause the current output values to be frozen. These
values will be used until the Sync command is suspended. This can be accomplished either by
sending an Unfreeze command or another Sync command.
Sending a Unsync command to a DP slave will cause normal operation of the cyclic outputs
again.
Also all outputs can be set to the safe state by the Clear_Data option. All these options are
provided
by
the
global
control
command,
see
section
PROFIBUS_FSPMM_CMD_GLOBALCONTROL_REQ/CNF Global Control Message on page
153.
Hilscher, 2006-2013
Overview
74/336
Acyclic data transfer only happens on request and not periodically in cycles as the cyclic data
transfer.
In PROFIUS DP, acyclic data transfer is supported by level DP V1, but not by the lowest level DP
V0. This means it is necessary that the slave to read from or write to supports the DP V1
extensions to the PROFIBUS standard. The acyclic data transfer happens with lower priority than
the cyclic data transfer does as it uses gaps, i.e. available remaining times of the bus cycles which
have not been required for cyclic data exchange.
The main packets for acyclic data transfer are:
Packet Name
Page
129
133
With these packets, you can access data areas within single modules of the slave. These data
areas can be addressed by a slot and index based mechanism:
The ulSlot parameter is used (both for read and write access) to determine the slot in the
destination device. Slot in this context usually simply means a single module of the destination
device. The allowed range for this parameter extends from 0 to 254 as the value 255 is reserved
by the PROFIBUS DP V1 specification.
The ulIndex parameter is used (both for read and write access) to determine the desired data
block in the desired module of the destination device. The allowed range for this parameter
extends from 0 to 254 as the value 255 is reserved by the PROFIBUS DP V1 specification.
The length of the data area to be read can be specified by the ulLength parameter but it may not
exceed the upper limit of 240 bytes. The applied error handling is described below in section DP
V1 Error Processing on page 75.
Hilscher, 2006-2013
Overview
5.3.2.2
75/336
DP V1 Error Processing
The error handling is similar for read and write access. It is described in section 10.3.1 Meaning of
Error_Code_1 and Error_Code_2 at DPV1 mode of the document Technical Guideline,
PROFIBUS DP Extensions to EN 50170 - Version 2.0, published by PNO under order 2.082. This
applies both to DP V1 Class 1 and DP V1 Class 2. In case of error, two Error_Codes are delivered
in the data area. These two Error_Codes represent further detailed error information.
Error_Code_1
D7
D6
D5
Error_Class
Meaning
0 to 9 =
reserved
10 =
application
D4
D3
D2
D1
D0
Error_Code
0 = read error
1= write error
2 = module failure
3 to 7 = reserved
8 = version conflict
9 = feature nor supported
10 to 15 = user specific
11 =
access
0 = invalid index
1 = write length error
2 = invalid slot
3 = type conflict
4 = invalid area
5 = state conflict
6 = access denied
7 = invalid range
8 = invalid parameter
9 = invalid type
10 to 15 = user specific
12 =
resource
13 to 15 =
user specific
Table 45: Explanation of Error Class and Error Code within Error_Code_1
Error_Code_2 is fully user specific and cannot be explained in more detail therefore.
Hilscher, 2006-2013
Overview
76/336
The first packet initializes the state machine for cyclic data processing at the slave and provides
the current configuration data to use from the initialization of cyclic data transfer until the first
request to change the parameter set if one occurs. The configuration data (so called Isconfiguration data or Real-configuration data ) is stored in the slave and heavily influences the
operation of the slave. It is transferred to the slave by the parameter abRealCfgData[] of the
slaves cyclic initialization packet and uses the data format described precisely below.
The second packet allows changing the Is-configuration data stored at the slave after
initialization if necessary. In this case the Is-Configuration data to be set is provided in the
parameter abCfgData[]. The format is exactly the same as during initialization, see below.
The third packet indicates a request from the PROFIBUS DP Master to compare the real
configuration data (i.e. those stored in the slave) with the configuration data which the master
assumes to be correct These are called the assumed configuration data and transmitted from the
master with a check configuration indication in the parameter abCfgData[].
All these packets share the same formats describing the configuration of the modules inputs and
outputs.
5.3.3.1
The rest of this section describes the structure of the parameter block containing the configuration
data for the slave(s), which decides on the number of input and outputs of the slave. This data
block is sent from the PROFIBUS DP master to the PROFIBUS DP slave with the command
'Check_Cfg' to force the slave to compare this configuration with its own internally saved one.
In detail, it is possible to specify here:
An identifier byte (either in the general or in the special identifier format, see below)
A length byte
Hilscher, 2006-2013
Overview
77/336
The length of the complete check configuration data block must not exceed 244 bytes, however, it
is recommended not to exceed an amount of 32 bytes otherwise some restrictions apply, see the
underlying IEC 61158 or EN 50170 specification.
5.3.3.2
The identifier byte can be specified in the general (also called compact) format or the special
format. In the general format, the meaning of the single bits is defined as follows:
General Identifier Format of Identifier Byte
(according to IEC 61158/EN 50170 Specification)
Bit
Name
Value
D7
Consistency
D6
D5
Length format
Output
Length format
0
Byte structure
Word structure
D4
Input
D3
Length of data
Description
D4=0
D4=1
Input
D4=0
Output
D4=1
Input- Output
1 Byte/Word
15
16 Bytes/Words
Note: When transferring data in word mode, the high byte is transferred first by
PROFIBUS DP, then the low-byte. However, the PROFIBUS DP Master has the possibility
to swap this sequence of the bytes within the word, if required by the target system.
Hilscher, 2006-2013
Overview
5.3.3.3
78/336
To allow extended configurations and to increase flexibility, a special extension of the identifier
system described above is also supported by PROFIBUS DP. The main advantages of this format
are:
It is possible to determine the number of input and output bytes associated to the defined
identifier.
This format is called the special identifier format and signified by the combination of byte 4 and 5
both being zero as already described above in the discussion of the general identifier format.
Special Identifier Format of Identifier Byte
(according to IEC 61158/EN 50170 Specification)
Bit
Name
D7.. Consistency/
D6 Length format
(used for
Input/Output)
D5.. Signification
D4
D3
Data Length
Value
Description
Input/Output
D7
D6
Free area
1 length byte for outputs and 1 length byte for inputs follows
D4
1-14
Manufacturer specific data of the length specified in the following byte(s) follow,
these should be equal to those in Real_Cfg_Data.
15
Table 47: Special Identifier Format of Identifier Byte according to IEC 61158/EN 50170 Specification
Hilscher, 2006-2013
Overview
5.3.3.4
79/336
Length Byte
The length bytes following the special identifier format bytes are organized as described in the
table below:
Structure of Length Byte in the Special Identifier Format of the Identifier Byte according to IEC 61158/EN
50170 Specification
Bit
Name
Value
D7
Consistency
D6
Length format
Description
Length format
0
Byte structure
Word structure
1 Byte/Word
2 Bytes/Words
63
64 Bytes/Words
Table 48: Structure of Length Byte in the Special Identifier Format of the Identifier Byte according to IEC 61158/ EN
50170 Specification
Hilscher, 2006-2013
Overview
80/336
Alarms are messages from the slave to the server which are for instance caused by extraordinary
events within a specific module (slot) of the slave and which require processing with high priority
and an explicite acknowledgement. The reception of the alarm message from the slave causes a
PROFIBUS_FSPMM_CMD_ALARM_NOTIFICATION_IND indication at the master.
The aforementioned explicite acknowledgement must be sent from the master to the slave
(PROFIBUS_FSPMM_CMD_ALARM_ACK_REQ) which subsequently will confirm the reception of
the acknowledgement again by either a positive or negative confirmation message
(PROFIBUS_FSPMM_CMD_ALARM_ACK_CNF
or
PROFIBUS_FSPMM_CMD_ALARM_ACK_NEG_CNF).
The importance of this explicite acknowledgement results from the intention to securely avoid
overwriting of alarms: As no unacknowledged alarm may be cleared, overwriting of pending alarms
is prohibited. In addition, the alarm indication is stored within an internal queue at the DP master.
From this queue, it may be removed not earlier as the alarm has been acknowledged.
Technologically alarms work similarly as diagnostic messages where status information and alarmspecific information is stored in the area which otherwise has been reserved for manufacturerspecific data.
Alarms in PROFIBUS DP V1 may only be processed by PROFIBUS DP Class 1 masters.
5.3.4.2
Alarm Types
supervised
Pull_Alarm
Indicates that a specific module has been pulled out.
Plug_Alarm
Indicates that a specific module has been plugged in.
Status_Alarm
Indicates a change of state of a specific module, such as run, stop or ready, for instance.
Update_Alarm
Indicates the value of a parameter in a module has been changed by a local operaton or remote
access.
Furthermore, manufacturer-specific alarms may be defined.
These are denominated as the alarm types (represented by the ulAlarm_Type variable of all
alarm related packets)
Hilscher, 2006-2013
Overview
5.3.4.3
81/336
The following conditions need to be fulfilled in order to cause an alarm indication at the DP master:
The slave must be ready for (cyclic) data exchange (DATA-EXCH mode).
An acyclic connection (MSAC_C1 connection) must have been activated (DPV1_Enable = TRUE).
The corresponding alarm type has been enabled
The maximum number of pending alarms has not been exceeded. This maximum number can be
dined either as a limit of totally allowed alarms independently from the alarm type or there is only one
alarm of each specified type permitted.
5.3.4.4
According to the PROFIBUS DP standard, the content of the alarm message is a diagnostic
message. It can consist by one, multiple or all of the following items:
Alarm PDU
Status-PDU (not discussed here)
Identification-related diagnosis
Channel-related diagnosis
Revision number
Hilscher, 2006-2013
Overview
82/336
5.3.5 Diagnosis
The PROFIBUS DP master firmware offers two functions for making diagnostic information from
the slaves available at the server:
PROFIBUS_FSPMM_CMD_NEW_SLAVE_DIAG_IND - Indicate new Slave Diagnostic
PROFIBUS_FSPMM_CMD_GET_SLAVE_DIAG_REQ/CNF Request a Slave Diagnostic
If a new diagnostic is available, the PROFIBUS_FSPMM_CMD_NEW_SLAVE_DIAG_IND Indicate new Slave Diagnostic indication will inform the master about this fact, and the master can
decide whether and when to request a diagnostic block from the slave from which the indication
originated.
This
is
done
subsequently
with
the
PROFIBUS_FSPMM_CMD_GET_SLAVE_DIAG_REQ/CNF Request a Slave Diagnostic
packet which will be confirmed.
This section discusses the meaning of the diagnostic information delivered by the
PROFIBUS_FSPMM_CMD_GET_SLAVE_DIAG_REQ/CNF Request a Slave Diagnostic
packets.
However, the diagnostic features of PROFIBUS DP depend on the version (V0 or V1). While DP
V0 offers a standard diagnosis, DP V1 provides extended diagnostic capabilities.
Hilscher, 2006-2013
Overview
5.3.5.1
83/336
Description
Meaning
D0
Station_Non_Existent
indicates that the slave does not exist or is not responding. An operating slave
always sets this bit to 0.
D1
Station_Not_Ready
indicates that the slave is not ready for cyclic data transfer.
D2
Cfg_Fault
indicates a configuration fault: the slave has been parameterized wrongly. The
slaves internal configuration data differ from those the master has sent to the
slave.
D3
Ext_Diag
indicates the area Ext_Diag is used for extended diagnostic according to the
PROFIBUS DP
V1 extensions. More than the 6 octets of standard
diagnostic data contain valid
and relevant diagnostic data. For
interpretation, see section 5.3.5.2 Diagnostic model of PROFIBUS DP V1.
D4
Not_Supported
indicates that an unknown command has been detected by the slave. The
requested
command is not supported by the slave.
D5
Invalid_Slave_Response
indicates that the response of the slave was invalid or not plausible. An operating
slave always sets this bit to
0.
D6
Prm_Fault
indicates that the last received parameter telegram was defective or incorrect.
D7
Master_Lock
indicates that the slave has been parameterized by another master, so this
master is
not permitted to control the requested slave. An operating slave
always sets this bit to 0.
Description
Meaning
D0
Prm_Req
indicates that the slave requires new parameterization and configuration As long as a new
parameterization has not been performed this bit remains set to the value 1.
D1
Stat_Diag
indicates that the master needs to fetch diagnostic information from slave, until this bit is
released. If the slave is not able to deliver valid output data, it will set this bit.
D2
Fixed 1
indicates DP V1 operation.
D3
WD_On
indicates that the watchdog timer supervision mechanism for the slaves is activated.
D4
Freeze_Mode
indicates that the slave has received a Freeze command and since then no Unfreeze
command.
D5
Sync_Mode
indicates that the slave has received a Sync command and since then no Unsync
command.
D6
Reserved
D7
Deactivated
The slave has not been projected. A projected slave always sets this bit to 0.
Description
Meaning
D0D6
Reserved
reserved.
D7
ExtDiag_Overflow
indicates that the slave has more diagnostic data available than it can send.
Hilscher, 2006-2013
Overview
84/336
Octet 4: Master_Add
This byte contains the address of the master, which has done the parameterization of the slave. If
a slave has not been parameterized, this value is set to 255.
Octet 5_6: Ident_Number
In these bytes, the slave station reports its identification number, which has been assigned to it by
the manufacturer.
5.3.5.2
The diagnostic model of PROFIBUS DP V1 is an extension to that of DP V0. It provides three kinds
of messages informing the master about the situation of the slaves:
Diagnostic messages
Status messages
Alarm messages
This section discusses diagnostic messages. Alarm messages are discussed in a separate section
due to their importance and their separate handling. Status messages are not relevant in the
context of this manual.
While diagnostic messages and status messages are buffered in the PROFIBUS DP system,
alarms are queued in order to prevent them from being overwritten.
If the Ext_Diag bit has been set within octet 1, there is more than 6 bytes of diagnostic data
available according to the DP V1 standard
The diagnostic data area may contain (additionally to the mandatory 6 octets):
Alarm PDU (see section 5.3.4.4 Contents and Structure of the Alarm Message)
Status-PDU (not discussed here)
Device-related diagnosis
Identification-related diagnosis
Channel-related diagnosis
Revision number
Each of these diagnostic blocks consists of a 1-byte header determining type and length of
the diagnostic block and the data part of the block.
2.
3.
The first byte of each block is the header byte. Its first two most significant bytes code the type of
diagnostic block. The meaning of bits D0 to D5 depends on the type of diagnostic block according
to the following Table 52: Diagnosis Header.
The structure of the diagnosis header is :
D7
D6
D5
D4
D3
D2
D1
D0
Description
Hilscher, 2006-2013
Overview
85/336
Device-related diagnosis
In DP V0, the interpretation of device-related diagnostic information depends on the contents of the
*.GSD file of the device.
In DP V1, device-related diagnostic blocks will be either alarm or status blocks, so they do not
need to be discussed here.
Identification-related diagnosis
For identification-related diagnosis, the structure of the header is explained in Table 52: Diagnosis
Header.The following bytes indicate which module of the slave has a diagnosis. For 8 modules,
one byte is used to indicate this:
D7
D6
D5
D4
D3
D2
D1
D0
Description
D6
D5
D4
D3
D2
D1
D0
Description
Note: The module numbers applied here relate to the order of the modules within the
configuration data telegram.
Hilscher, 2006-2013
Overview
86/336
Channel-related diagnosis
D6
D5
D4
D3
D2
D1
D0
Description
Channel is an input-channel
Channel is an output-channel
The third byte contains the cause of a diagnosis event in the module.
D7
D6
D5
D4
Bit
2 Bits
4 Bits
Byte
Word
2 Words
Short circuit
Connection broken
Error
10-15
Reserved
16-31
Manufacturer-specific
any
D3
D2
D1
D0
Description
Hilscher, 2006-2013
Overview
87/336
Connection must be established explicitly (initiated) before first data transmission can take
place. A communication reference identifies the established connection from that time on.
After that the services Read, Write and Data Transport are available.
A slave may have multiple connections to a master class 2 and one to a master class 1 at a
time.
Class 2 masters are used for commissioning the network and for maintenance and diagnostic
purposes and may be removed after the start-up phase when the system is working correctly.
Class 2 masters acyclically communicate with slaves over a class 2 connection (also called
MSAC_C2 connection relationship). This class 2 connection must explicitly be set up.
MSAC2_Initiate service.
This service is used by the DP master class 2 in order to set up a DP V1-Class 2 connection to the DP
slave. The DP slave then receives a Initiate indication.
MSAC2_Abort service.
This service is used by the DP master class 2 in order to abort a DP V1-Class 2 connection to the DP
slave. The DP slave then receives an abort indication. The DP slave may also request an abort of the
class 2 connection by itself. For instance, this can be accomplished by sending the abort packet.
Hilscher, 2006-2013
Overview
88/336
This service is suited for reading a data block from the specified index of the module specified
by the choice of the slot of the specified API.
DS_Write
This service is suited for writing a data block to the specified index of the module specified by
the choice of the slot of the specified API.
DS_Transport
This service is suited for reading and simultaneously writing a data block from the specified
index of the module specified by the choice of the slot of the specified API.
Only one of these acyclic services can be executed at a time per MSAC_C2 connection
6.2.1
6.2.2
PROFIBUS_FSPMM2_CMD_INITIATE_REQ/CNF Initiate
6.2.3
6.2.4
6.2.5
6.2.6
6.2.7
6.2.8
6.2.9
6.2.10
6.2.11
6.2.12
6.2.13
6.2.14
6.2.15
Hilscher, 2006-2013
Overview
89/336
The range of module numbers must begin with 1 and it must be contiguous in ascending order.
The device itself has slot number 0. But there is an important extension: As an additional layer a
DP master class 2 may contain different instances of applications. Each such application process
instance (APIs) is associated with a security level (SCL, for instance read-only access) and
consists of modules (called slots here) and indexes for which the same rules apply as for the DP
master class 1. Which API is used depends on the choice made during initialization of the
MSAC_C2 connection, so this choice determines the API for the whole lifetime of the connection.
Power-On state
Closed state
Open state
There are also some additional intermediate states defined in which the system waits for some
events.
In Power-On state the system waits for initialization by the state machine manager.
In Closed state the system waits for initialization by the Initiate request
PROFIBUS_FSPMM2_CMD_INITIATE_REQ. The system is then changing into an intermediate
state and waits there for the confirmation. As soon as positive confirmation takes place, the
system changes to the state Opened.
Only in Opened state the main data transfer services Read, Write and Data Transport of DP
V1 Class 2 are available.
However, at one time only one connection may be held by a DP V1 class 2 master, where as one
slave may be connected to several DP V1 class 2 masters and a class 1 master simultaneously.
This is also supervised by the state machine. The Opened state is left if an abort occurs. 3
different situations can lead to an abort. These are:
Abort by the user of the master (In this case, the master sends a
PROFIBUS_FSPMM2_CMD_ABORT_REQ/CNF Request Abort of Connection request to the slave)
Abort by the user of the slave (In this case, the slave sends an abort request and subsequently
the master receives an PROFIBUS_FSPMM2_CMD_ABORT_IND/RES Abort Indication
from the slave)
The MSAC2M state machine also deals with some administrative information such as the service
access points to be used for low-level operations or some internal timers (see S-Timer and RTimer below). A complete description of the MSAC2M state machine with all intermediate states,
transitions and details is given in section 12.7 of the specification document.
Hilscher, 2006-2013
Overview
90/336
Hilscher, 2006-2013
Overview
91/336
Features supported
DP master class 2 and DP slave communicate about the supported functionality of each other.
This gives the slave the opportunity to adjust its functionality to the masters requirement or to reject
the request if it cannot fulfill them.
5.4.9.2
DP master class 2 and DP slave communicate about the supported profile features. The meaning
of the bits of these two bytes depends on the profile or vendor.
5.4.9.3
This number allows the unique identification of a profile. This number is assigned by the PNO All
device using the same profile definition have to use the same Profile Ident No. The value 0
indicates that no profile is supported. The profile ident number is a 16-bit number.
5.4.9.4
The additional address parameter consists of two parts providing information about
the source
For both the following information is stored within the additional address parameter:
The access level of the source/destination is also given by an 8-bit number in the range from 0 to
255.
The optional values network address and MAC address of the source or destination, respectively,
are only present, when the source type or destination type have the value 1.
The network address must be a valid 6-byte network address according to ISO/OSI-rules.
The MAC address is a string according to the rules for MAC addresses.
Hilscher, 2006-2013
Overview
92/336
There are various timers both in the master class 2 and in the slave (U-,F-Timer I-Timer) for
supervision of the various aspects of the connection. The master provides:
S-Timer (send timer)
This timer supervises both the slave and the FDL (OSI model layer 2-parts of the master).
The user response timer monitors the slave application It is started with passing the service
indication to the application and stopped with passing the service response to the application. On
expiration of the U-Timer the slave signals to the master that it is idle.
F-Timer (fetch response timer)
This timer supervises the correct function of the master each timer when a response or a slaveidle signal is sent to the master. On expiration of this timer, the connection is aborted.
I- Timer (indication timer)
This timer supervises the correct function of the master in the following way: When the master
fetches data, this time is started and running until the master either sends the next request or an idle
message. If this timer expires, the connection will be aborted.
Hilscher, 2006-2013
Overview
93/336
Description
"PB_DL_QUE
The returned handle has to be used as value ulDest in all initiator packets the AP-Task intends to
send to the DL-Task. This handle is the same handle that has to be used in conjunction with the
macros like TLR_QUE_SENDPACKET_FIFO/LIFO() for sending a packet to the DL-Task.
A part of the functionality of PROFIBUS DP is situated within layer 2 of the OSI/ISO layer model of
communication in networks. The DL task (DL = Data Link Layer) provides this functionality as an
infrastructure to be used by the higher-level functions on layer 7 and higher.
This functionality concentrates mainly on the following 3 topics
Data transfer services
Management of Services Access Points (SAPs)
Management of the system variables of layer 2
The following services are provided for the management of Service Access Points (SAPs)
SAP Activate
RSAP Activate
SAP Deactivate
Hilscher, 2006-2013
Overview
94/336
SDA Service
The SDA-Service (SDA = Send data with acknowledge) provides acknowledged connectionless
data transfer with immediate response. By the SDA service, a local user gets the possibility to send
data (i.e. the L_sdu) to one single remote user (i.e. remote station).
Hilscher, 2006-2013
Overview
95/336
The end of the data transfer is acknowledged but not confirmed (which would mean waiting for
finishing processing of the data instead of simply receiving the data). This means:
The local user is informed about successful reception or the non-reception of the data by an
explicite acknowledgement. However, the user is not informed about successful execution of the
request.
In case of an error during data transmission the data transfer will be repeated as often as
necessary.
Note: The SDA service is usually not applied in PROFIBUS DP systems (but important for
PROFIBUS FMS systems). Nevertheless, it is implemented due to compatibility reasons.
This service is mainly used for master-to-master-communication.
The following packets provide the SDA functionality in the PROFIBUS DP master firmware:
PROFIBUS_DL_CMD_DATA_ACK_REQ/CNF - Send SDA Service
PROFIBUS_DL_CMD_DATA_ACK_IND - Receive SDA Service
5.5.1.2
SDN Service
The SDN -Service (SDN = Send data with no acknowledge) provides unacknowledged
connectionless data transfer. By the SDN service, a local user gets the possibility to send data (i.e.
the L_sdu) to
one single remote user (i.e. remote station).
many remote users (remote stations/ multi-cast communication)
all remote users/remote stations within the PROFIBUS DP network synchronously
The confirmation of an SDN service only locally confirms that the service has been received for
further transmission at the bus, but it neither confirms successful transmission to the receiver nor
successful processing there.
In case of an error during data transmission the data transfer will be repeated as often as
necessary.
If the remote station receives the link service data unit in an error-free condition, it will be
processed (i.e. handled over to the remote user). The local user, however, is not able to obtain
information whether processing has taken place as originally intended.
The following packets provide the SDN functionality in the PROFIBUS DP master firmware:
PROFIBUS_DL_CMD_DATA_REQ/CNF - Send SDN Service
PROFIBUS_DL_CMD_DATA_IND - Receive SDN Service Indication
5.5.1.3
SRD Service
The SRD-Service (SRD = Send and request data with reply) is designed to provide bidirectional
connectionless data exchanged. By the SRD service, a local user gets the possibility to send and
synchronously request data (i.e. the L_sdu) to one single remote user (i.e. remote station) at the
same time. The requested data must have been stored for fetching there earlier. For the local user,
it is also possible to request data without sending data in parallel (pure request command).
In case of successful execution, the local user will receive the requested data. Otherwise, an
indication will be sent if the requested data are not available. Both cases confirm the correct
reception of the transmitted data at the remote station. However, if the transmitted data have not
been received properly, a negative confirmation will be sent.
Hilscher, 2006-2013
Overview
96/336
In case of an error during data transmission, both the data transfer and the request will be
repeated as often as necessary.
The following packets provide the SRD functionality in the PROFIBUS DP master firmware:
PROFIBUS_DL_CMD_DATA_REPLY_REQ/CNF - Send SRD Service
PROFIBUS_DL_CMD_DATA_REPLY_IND - Receive SRD Service Indication
5.5.1.4
MSRD Service
An MSRD service request is simply an SRD request where the slave answers with a multi-cast
telegram instead of an ordinary telegram for a one-to-one communication relation. This service is
not supported by the current firmware.
Hilscher, 2006-2013
Overview
97/336
A service access point is a means for managing communication between different communication
layers correctly; it is associated with and identified by a non-negative integer numeric value.
Service access points are used to characterize different kinds of services within the network. The
available numeric values range from 0 to 63. Also the value 64 is permitted, but it represents the
NIL SAP.
Note: NIL SAP in this context means that the telegram does not contain any SAP
information. Such telegrams are used by PROFIBUS DP for performing cyclic
communication.
However, some values might be predefined by other services such as the OSI layer 7 services of
PROFIBUS DP. Especially the values 50 (0x32), 51 (0x33), 54 (0x36) and 62 (0x3E) are usually
applied for special purposes at the PROFIBUS DP Master.
You can also imagine SAPs as the entry and exit points of a layer in a multi-layered
communication model. You may separate among the services for which to define SAPs between
PROFIBUS DP-Master | Protocol API
DOC061001API18EN | Revision 18 | English | 2013-10 | Released | Public
Hilscher, 2006-2013
Overview
98/336
user services and management services, so you can introduce a separation between user SAPs
(which might be activated by this packet) and previously activated management SAPs.
Along with the SAPs come automatic checking mechanism for rule conformity of the messages
and the accompanying transmission-related informations stored in the messages. Only if all checks
have been passed successfully, the data transfer for which an SAP has been defined will take
place, otherwise a message will be issued and no data will be transferred.
Generally, the SAPs should be configured during the start-up phase of the PROFIBUS network.
The philosophy of the SAP concept might look unnecessarily sophisticated, but its real aims
justifying this amount of sophistication are:
Precise Control of messages and transmission channels
Avoidance of erroneous connections
5.5.2.2
SAP Activate
The following packet provides the SAP activate functionality in the PROFIBUS DP master
firmware:
PROFIBUS_DL_CMD_DLSAP_ACTIVATE_REQ/CNF - Activate an SAP for Request
5.5.2.3
RSAP Activate
The following packet provides the RSAP activate functionality in the PROFIBUS DP master
firmware:
PROFIBUS_DL_CMD_DLSAP_ACTIVATE_RESPONDER_REQ/CNF - Activate an SAP for
Responder Functionality(i.e. the role in service is responder or both initiator and responder).
This packet provides the possibility to establish a service access point for an SRD or MSRD
service with responder functionality.
5.5.2.4
SAP Deactivate
This service allows the deactivation of a formerly defined service access point, which is not needed
any longer. The following packet provides the SAP deactivate functionality in the PROFIBUS DP
master firmware:
PROFIBUS_DL_CMD_DLSAP_DEACTIVATE_REQ/CNF - Deactivate an SAP for Request
Hilscher, 2006-2013
Overview
99/336
Hilscher, 2006-2013
Overview
100/336
CiR is only supported for configuration with database. If no database is available or the
device is configured with packets the CiR packets are rejected by the error code
TLR_E_DATABASE_ACCESS_FAILED.
Configurations set via the fieldbus system are not considered and the configurations cannot
be adjusted.
5.
6.
The firmware compares the new database which has been downloaded in step 1 with the
previously active old database and sends the result to the host. The items to be compared
comprise bus parameters like e.g. address of the PROFIBUS DP Master, bus speed, and
every slave parameter set.
However, the address of the master and bus speed cannot be changed in the new
configuration. If the bus settings are correct, in the next step every slave parameter set will
also be checked for possible changes. The checked items include the DPM mapping and
other slave parameters. When all slaves have been checked for possible changes the master
sends a verify configuration confirmation packet (RCX_VERIFY_DATABASE_CNF) containing
a complete list of slaves which are
7.
deactivated,
changed,
unchanged and
The
Host
receives
the
confirmation
packet
for
verify
configuration
(RCX_VERIFY_DATABASE_CNF) and has to decide, whether verification was successful, or
not
Hilscher, 2006-2013
Overview
101/336
8.
If the verification has been successful, then the Host sends the command for activating
changes. Otherwise, the remaining steps will not be carried out and an RCX_FILE_DELETE
request packet has to be sent to the stack.
9.
Now, the new configuration is activated by sending the activate database request packet
(RCX_ACTIVATE_DATABASE_REQ).
o
Then the master sends new parameter data to the changed slaves. Parameter data
is send as it is set at the database. The slave has to decide it can handle the new
parameter at runtime or a restart of the slave communication is necessary.
A set parameter packet is sent when the parameter data is changed. This is
done at state dataexchange.
The address mapping is changed when the address table is changed. This is
handled without any influence at the PROFIBUS communication. The host
application has to take care about valid I/O data at the dual port memory.
Afterwards the PROFIBUS DP Master sends the configuration to all new slaves and
sets them to active state regarding to the setting of each slave.
Finally, the firmware saves the new database as current database and sends the
confirmation packet RCX_ACTIVATE_DATABASE_CNF to the host.
10. The Host receives the confirmation packet for activating changes and has to decide, whether
the activation was successfully or not.
Hilscher, 2006-2013
Overview
102/336
Hilscher, 2006-2013
Overview
103/336
The primary master is active on the network while the backup master is passive. This is the
system, which is prepared for the redundancy case.
An active master will behave like a standard master. Both masters are
participating in the PROFIBUS ring and passing the PROFIBUS token
sends the FDL status telegrams
The backup master (passive) will check its LAS (list of active devices) if the primary master exists.
In case the primary master disappears from or appears again in the LAS of the backup master, the
backup master indicates to the host application about the missing primary master. At this state the
host application has to perform a switch over to set the backup master to the active mode.
By performing a switch over the backup master changes the current bus address to the bus
address of the primary master and establishes communication to the slave devices.
Note: The redundancy functionality of the PROFIBUS DP Master firmware can only be
used, when the host application supports this functionality.
Note: In PNO mode, the redundancy functionality can be used with DPV0 slaves only.
DPV1 slaves are currently not supported as they can fall off the bus during the switch
over. There is a special Hilscher mode allowing to use DPV1 slaves as well. This mode is
compatible to the PNO mode concerning its behavior and the request and indication
packets. It can be switched on by setting bit 1 in parameter bOption of packet
PROFIBUS_APM_CMD_REDUNDANT_MODE_REQ to 1.
Note: The host application needs to have access to the dual-port memory of both the
active and the passive master.
Note: In the configuration the setting for 'Start of bus communication' has to be set to
'Controlled by application'.
Note: The switch over has to be finished before the 'watchdog control time' in the slave
device(s) expires otherwise slave(s) can go off the bus.
Hilscher, 2006-2013
Overview
104/336
The following figure shows the basic functionality, the host application has to support.
Note: The host application has to transfer the output data from the dual-port memory of
the primary master into the dual-port memory of the backup master and to perform a
handshake for the output data before performing the final switch over from the primary
master to backup master.
Hilscher, 2006-2013
105/336
Hilscher, 2006-2013
106/336
Description
"FSPMM_QUE
The returned handle has to be used as value ulDest in all initiator packets the AP-Task intends to
send to the FSPMM-Task. This handle is the same handle that has to be used in conjunction with
the macros like TLR_QUE_SENDPACKET_FIFO/LIFO() for sending a packet to the FSPMM-Task.
In
detail,
the
following
functionality
is
provided
by
the
FSPMM-Task:
Packet
Command
code
(REQ/CNF
or
IND/RES)
Page
6.1.1
0x2224/
0x2225
108
6.1.2
0x2200/
0x2201
110
6.1.3
0x2206/
0x2207
113
6.1.4
0x2214
116
6.1.5
PROFIBUS_FSPMM_CMD_GET_SLAVE_DIAG_REQ/CNF Request a
Slave Diagnostic
0x220A/
0x220B
118
6.1.6
0x2216
122
6.1.7
0x220C/
0x220D
123
6.1.8
0x220E/
0x220F
126
6.1.9
0x2210/
0x2211
129
6.1.10
0x2212/
0x2213
133
Hilscher, 2006-2013
107/336
Packet
Command
code
(REQ/CNF
or
IND/RES)
Page
6.1.11
PROFIBUS_FSPMM_CMD_ALARM_NOTIFICATION_IND Alarm
Notification
0x221A
138
6.1.12
PROFIBUS_FSPMM_CMD_ALARM_ACK_REQ/CNF Alarm
Acknowledge
0x221C/
0x221D
141
6.1.13
0x221E/
0x221F
146
6.1.14
PROFIBUS_FSPMM_CMD_GLOBALCONTROL_REQ/CNF Global
Control Message
0x2220/
0x2221
153
6.1.15
PROFIBUS_FSPMM_CMD_SLAVE_ACTIVATE_REQ/CNF
Activate/Deactivate Slaves
0x2226/
0x2227
157
6.1.16
0x2222
160
6.1.17
0x222C/
0x222D
162
6.1.18
0x222E/
0x222F
164
6.1.19
PROFIBUS_MSCY1M_CMD_REDUNDANCY_SWITCH_REQ/CNF
Switch Redundancy
0x2230/
0x2231
167
6.1.20
PROFIBUS_FSPMM_CMD_UPDATE_ICOS_CONFIG_REQ/CNF - Input
Change of Slaves
0x2232/
0x2233
170
6.1.21
0x2234/
0x2235
173
Table 59: Overview over the Packets of the FSPMM-Master -Task of the PROFIBUS DP-Master Protocol Stack
Hilscher, 2006-2013
108/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_APP_REG_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x2224
PROFIBUS_FSPMS_CMD_APP_REG_REQ - Command
ulExt
UINT32
ulRout
UINT32
Packet Status/Error
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
Hilscher, 2006-2013
109/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_APP_REG_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x2225
PROFIBUS_FSPMM_CMD_APP_REG_CNF- Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
Packet Status/Error
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
Hilscher, 2006-2013
110/336
Hilscher, 2006-2013
111/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM_PACKET_INIT_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x2200
PROFIBUS_FSPMS_CMD_GLOBAL_CONTROL_IND Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_INIT_REQ_T
tBusParameter
STRUCT
Hilscher, 2006-2013
112/336
Packet Description
Type: Confirmation
structure PROFIBUS_FSPMM_PACKET_INIT_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x2201
PROFIBUS_FSPMM_CMD_INIT_CNF- Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
Table 65: PROFIBUS_FSPMM_CMD_INIT_CNF - Confirmation Command for Request for Setting of Bus Parameter
Hilscher, 2006-2013
113/336
For a detailed explanation and discussion of these operation modes, see section 5.2 PROFIBUS
DP Operation Modes of this document.
Note: Use this packet only when working with linkable object modules. It has not
been designed for usage in the context of loadable firmware.
USIF_OFFLINE
USIF_STOP
USIF_CLEAR
USIF_OPERATE
0x00
0x40
0x80
0xC0
Hilscher, 2006-2013
114/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_SET_MODE_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
FSPMM_QUE
ulSrc
UINT32
32
0 ... 2 -1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
0 ... 2 -1
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x2206
PROFIBUS_FSPMM_CMD_SET_MODE_REQ_T - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_SET_MODE_REQ_T
ulBusMode
UINT32
0,0x40,0x80,
0xC0
Hilscher, 2006-2013
115/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_SET_MODE_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2207
PROFIBUS_FSPMM_CMD_MODE_CHANGE_CNF_T - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM_MODE_CHANGE_CNF_T
ulBusMode
UINT32
Hilscher, 2006-2013
116/336
Value
State
0x00
USIF_OFFLINE
0x40
USIF_STOP
0x80
USIF_CLEAR
0xC0
USIF_OPERATE
For a detailed explanation and discussion of these operation modes, see section 5.2 PROFIBUS
DP Operation Modes of this document.
Note: Use this packet only when working with linkable object modules. It has not
been designed for usage in the context of loadable firmware.
Hilscher, 2006-2013
117/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_MODE_CHANGE_IND_T
Variable
Type
Value / Range
Type: Indication
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2214
PROFIBUS_FSPMM_CMD_MODE_CHANGE_IND - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_MODE_CHANGE_IND_T
ulBusMode
UINT32
Hilscher, 2006-2013
118/336
Name
D31
Reserved
Value
Description
Reserved, set to zero
D2
D1
D0
QUERY
PEEK
Get diagnostic direct from slave ( has influence to the bus cycle time )
Corresponding Diag Flag in Sl_Diag will be cleared by execution of the get diag
command
Corresponding Diag Flag in Sl_Diag will not be cleared by execution of the get diag
command ( useful diagnostic tools )
Hilscher, 2006-2013
119/336
0x00000001
0x00000002
Packet Description
structure PROFIBUS_FSPMM_PACKET_GET_SLAVE_DIAG_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x220A
PROFIBUS_FSPMM_CMD_GET_SLAVE_DIAG_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_GET_SLAVE_DIAG_REQ_T
ulRemAdd
UINT32
0 126
ulFlag
UINT32
Bit mask
Flag register
Hilscher, 2006-2013
120/336
Hilscher, 2006-2013
121/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_GET_SLAVE_DIAG_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
4+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x220B
PROFIBUS_FSPMM_GET_SLAVE_DIAG_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM_GET_SLAVE_DIAG_CNF_T
ulRemAdd
UINT32
Slave address
tDiagnostic
PROFIBU
S_FSPM
M_DIAGN
ostIC_DA
TA_T
Slave diagnostic
Note: The internal buffer of the PROFIBUS DP device can handle 6 Bytes standard and
238 Bytes Extended Diagnostic data per slave device.
Hilscher, 2006-2013
122/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_NEW_SLAVE_DIAG_IND_T
Variable
Type
Value / Range
Type: Indication
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2216
PROFIBUS_FSPMM_CMD_NEW_SLAVE_DIAG_IND - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_NEW_SLAVE_DIAG_IND_T
ulRemAdd
UINT32
0125
Hilscher, 2006-2013
123/336
Hilscher, 2006-2013
124/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM_PACKET_SET_OUTPUT_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
4+
PROFIBUS_FSPM
_MAX_IO_DATA_
LEN
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x220C
PROFIBUS_FSPMM_CMD_SET_OUTPUT_REQ_T - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM__SET_OUTPUT_REQ_T
ulRemAdd
UINT32
0125
abData
UINT8[]
Hilscher, 2006-2013
125/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_SET_OUTPUT_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x220D
PROFIBUS_FSPMM_CMD_SET_OUTPUT_CNF_T - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM__SET_OUTPUT_CNF_T
ulRemAdd
UINT32
0125
Address of slave
Packet Status/Error
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
TLR_E_PROFIBUS_FSPMM
_INVALID_SLAVE_ADDRE
SS (0xC038001DL)
Hilscher, 2006-2013
126/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_GET_INPUT_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x220E
PROFIBUS_FSPMM_CMD_GET_INPUT_REQ_T - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_GET_INPUT_REQ_T
ulRemAdd
UINT32
0125
Hilscher, 2006-2013
127/336
MSK_INPUT_DATA_STATUS
FLG_INPUT_DATA_STATUS_CLR
FLG_INPUT_DATA_STATUS_NIL
FLG_INPUT_DATA_SYNC_ERR
(0x03000000)
(0x01000000)
(0x02000000)
(0x00000001)
Packet Description
structure PROFIBUS_FSPMM_PACKET_GET_INPUT_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
8+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x220F
PROFIBUS_FSPMM_CMD_GET_INPUT_CNF_T - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM_GET_INPUT_CNF_T
ulRemAdd
UINT32
0125
Slave address
ulSlaveDiag
UINT32
abData
UINT8[]
Input data
Hilscher, 2006-2013
128/336
The variable ulSlaveDiag contains diagnostic information about the quality of the received input
data and diagnostic information about the PROFIBUS slave itself. The first 3 bytes corresponding
the standard diagnostic of a slave according the PROFIBUS specification.
The 4 Byte contains two flags to indicate information about the input data quality. Therefore two
flags are spend.
#define FLG_INPUT_DATA_STATUS_CLR
#define FLG_INPUT_DATA_STATUS_NIL
(0x01000000)
(0x02000000)
If both flags are 0 it means the master is in data exchange with the slave and the input data are
valid and fresh.
If the first bit FLG_INPUT_DATA_STATUS_CLR is set, the input data from the slave are not valid,
the master has set the input data internally to 0. This happens, when the master has no yet
established a connection to the slave.
If the second bit FLG_INPUT_DATA_STATUS_NIL is set, it means the data have the last value that
has been received from the slave, but they are not fresh or up to date. This can happen for
example when the slave is in data exchange and the slave indicates for some cycles static
diagnosis and after that the slave continues the data exchange. In this case the
FLG_INPUT_DATA_STATUS_NIL will be set, and the user can decide what to do with the data. Set
the input data to 0 in its application or consume the received data for a hold the last state
mechanism.
Flag FLG_INPUT_DATA_SYNC_ERR indicates a data synchronization error.
Hilscher, 2006-2013
129/336
Hilscher, 2006-2013
130/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM_PACKET_READ_REQ_T;
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
16
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2210
PROFIBUS_FSPMM_CMD_READ_REQ_T - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_READ_REQ_T
ulRemAdd
UINT32
0 ...125
Slave address
ulSlot
UINT32
0 ...254
Requested slot
ulIndex
UINT32
0 ...254
Requested index
ulLength
UINT32
0 ...240
Hilscher, 2006-2013
131/336
Hilscher, 2006-2013
132/336
Packet Description
Type: Confirmation
structure PROFIBUS_FSPMM_PACKET_READ_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
12 + n
32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2211
PROFIBUS_FSPMM_CMD_READ_CNF_T - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM_READ_CNF_T
ulRemAdd
UINT32
0 ...125
Slave address
ulSlot
UINT32
0 ...254
Slot
ulIndex
UINT32
0 ...254
Index
UINT8[]
Requested data
UINT8
128
bErrorCode1
UINT8
0255
bErrorCode2
UINT8
0255
Hilscher, 2006-2013
133/336
2) The parameter ulSlot = Slot_Number is used in the destination device for addressing
the desired data block slot (typically a module).
3) The parameter ulIndex = Index is used in the destination device for addressing the
desired data block.
4) The parameter ulLength = Length indicates the number of bytes of the data block that
has to be written. If the destination data block length is less than required then the reply will
contain an error message. If the data block length is greater or equal than the required
length, the reply contains the number of bytes, which have been written. The PROFIBUS
DP-Slave may answer with an error response if the data access is not allowed.
The field abData contains the data block, which has to be written and consists of the number of
octets indicated in the length of the request. For more information refer to section 5.3.1 Cyclic
Data Transfer.
Note: The three variables bErrorDecode , bErrorCode1 and bErrorCode2 of the confirmation
packet are only present in case of error TLR_E_PROFIBUS_FSPMM_MSAC1_NRS, otherwise they
are missing.
Hilscher, 2006-2013
134/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM_PACKET_WRITE_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
12 +
PROFIBUS_FSPM
_MAX_IO_DATA_
LEN
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x2212
PROFIBUS_FSPMM_CMD_WRITE_REQ_T - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_WRITE_REQ_T
ulRemAdd
UINT32
0 ... 125
Slave address
ulSlot
UINT32
0 ... 254
Slot
ulIndex
UINT32
0 ... 254
Index
abData
UINT8[]
Write data
Hilscher, 2006-2013
135/336
Hilscher, 2006-2013
136/336
Packet Description
Type: Confirmation
structure PROFIBUS_FSPMM_PACKET_WRITE_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
16
19
0 ... 232-1
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x2213
PROFIBUS_FSPMM_CMD_WRITE_CNF_T - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM_WRITE_CNF_T
ulRemAdd
UINT32
0125
Slave address
ulSlot
UINT32
0254
Slot
ulIndex
UINT32
0254
Index
ulLength
UINT32
0244
Length
(0 only in case of
error)
The following three variables are only present in case of error TLR_E_PROFIBUS_FSPMM_MSAC1_NRS
bErrorDecode
UINT8
128
bErrorCode1
UINT8
0255
bErrorCode2
UINT8
0255
Hilscher, 2006-2013
137/336
Packet Status/Error
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
Error source
Help
Slave
Slave
Slave
Slave
Host,
Slave
Host
Host
Host
Check msg.function or
msg.device_adr parameter of
requested message
configuration
TLR_E_PROFIBUS process
_FSPMM_REJ_PS
(0xC0380019L)
In case of error, the two Error_Codes represent further detailed error information.
See section DP V1 Error Processing of this document for more information.
Hilscher, 2006-2013
138/336
explanation
reserved
Diagnostic_Alarm
Process_Alarm
Pull_Alarm
Plug_Alarm
Status_Alarm
Update_Alarm
7 - 31
reserved
32 - 126
manufacturer-specific
127
reserved
4. ulSlot_Number = Slot_Number indicates the source of the alarm. Here the range extends
from 0 to 254. The value 255 is declared as reserved in the DPV1 norm description.
5. The ulSpecifier = Alarm_Spec_Ack parameter gives additional alarm information, e.g.
an alarm appears, disappears or no further differentiation is not possible or if the alarm
requires an additional user acknowledge. See the table below for further explanations.
Hilscher, 2006-2013
139/336
Alarm_Spec_Ack
D7
D6
D5
D4
D3
Sequence Number
D2
D1
D0
Add_Ack
Alarm_Spe
cifier
D0
No further differentiation
Hilscher, 2006-2013
140/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_ALARM_NOTIFICATION_IND_T
Variable
Type
Value / Range
Type: Indication
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
16 + n
32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x221A
PROFIBUS_FSPMM_CMD_ALARM_NOTIFICATION_IND Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_ALARM_NOTIFICATION_IND_T
ulRem_Adr
UINT32
0 125
ulAlarm_Type
UINT32
1 6 or
32 126
ulSlot_Number
UINT32
0 254
ulSpecifier
UINT32
Bit mask
abDiagnostic_User_ UINT8[]
Data
Hilscher, 2006-2013
141/336
ulSta
Description
Error
source
Help
Device
Device
Error on Device
telegram; Device is
reconfigured
TLR_E_PROFIBUS_FSPMM_REJ_ABORT The slave answers with
Hilscher, 2006-2013
142/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_ALARM_ACK_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
20
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x221C
PROFIBUS_FSPMM_CMD_ALARM_ACK_REQ_T - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_ALARM_ACK_REQ_T
ulRem_adr
UINT32
0 125
ulAlarm_Type
UINT32
1 6 or
32 126
ulSlot_Number
UINT32
0 254
ulSpecifier
UINT32
Bit mask
ulFunction
UINT32
Not used
Hilscher, 2006-2013
143/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_ALARM_ACK_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
20
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x221D
PROFIBUS_FSPMM_CMD_ALARM_ACK_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM_ALARM_ACK_CNF_T
ulRem_adr
UINT32
0 125
ulAlarm_Type
UINT32
1 6 or
32 126
ulSlot_Number
UINT32
0 254
ulSpecifier
UINT32
Bit mask
ulFunction
UINT32
Not used
Hilscher, 2006-2013
144/336
Hilscher, 2006-2013
145/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_ALARM_ACK_NEG_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
at ulSta = TLR_E_PROFIBUS_FSPMM_REJ_ABORT
at ulSta =
TLR_E_PROFIBUS_FSPMM_MSALM_ALARM_ACK_NEG
ulId
UINT32
0 ... 232-1
ulSta
UINT32
!=0
ulCmd
UINT32
0x221D
PROFIBUS_FSPMM_CMD_ALARM_ACK_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM_ALARM_ACK_NEG_CNF_T
ulRem_Adr
UINT32
0 125
ulAlarm_Type
UINT32
1 6 or
32 126
ulSlot_Number
UINT32
0 254
ulSpecifier
UINT32
Bit mask
ulFunction
UINT32
Not used
UINT8
128
bErrorCode1
UINT8
0255
bErrorCode2
UINT8
0255
bReserved
UINT8
Reserved
Hilscher, 2006-2013
146/336
In both cases, special data have to be written into the User_prm_data field (i.e. bits 11 and
following of parameter Prm_Data of the slave parameter set, see 4.2.4.14Prm_Data) which
stores extended user specific data.
For clock synchronization, download for each slave which is planned to participate in
synchronization a parameter set as described in section 4.2.4 with a User_prm_data field
containing these data for the User_prm_data field:
Header:
TLR_UINT8
TLR_UINT8
TLR_UINT8
TLR_UINT8
Structure_Length
Structure_Type
Slot_Number
reserved
Data
TLR_UINT16 Clock_Sync_Interval
TLR_UINT32 NetworkTimeDifferenceValueLo
TLR_UINT32 NetworkTimeDifferenceValueHi
14
Structure_Type
Slot_Number
Reserved
In the data part, specify the clock sync interval in units of 10 ms.
The network time difference means the difference of the current time to a reference time (fix point
IEEE time). NetworkTimeDifferenceValueHi contains the seconds having passed since the
reference time, NetworkTimeDifferenceValueLo the fractional part.
For DXB (Slave-to-slave cross communication), two cases must be considered separately:
1.
2.
Hilscher, 2006-2013
147/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM_PACKET_DOWNLOAD_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
8+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x221E
PROFIBUS_FSPMM_CMD_DOWNLOAD_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_DOWNLOAD_REQ_T
ulRemoteAddress
UINT32
ulAreaCode
UINT32
abData
UINT8[]
0xFF
Local master
0125
0125
Slave address
Slave parameter set, see structure below and detailed
description in section 4.2.4.
Hilscher, 2006-2013
148/336
Type
Value / Range
Description
abSlaveAdr
UINT8
0125
SlaveAddress
065535
usParmeterSetLengt UINT16
h
bSlFlags
UINT8
0255
bSlaveType
UINT8
0255
bMaxDiagDataLen
UINT8
bMaxAlarmLen
UINT8
bMaxChannelDateLen UINT8
4244
bDiagUpdDelay
UINT8
015
bAlarmMode
UINT8
07
bAddSlFlag
UINT8
03
Ignore auto_clear
usC1Timeout
UINT16
065535
bReserved[4]
UINT8
usPrmDataLen
UINT16
abPrmData
UINT8
usCfgDataLen
UINT16
abCfgData
UINT8
usAddTabLen
UINT16
abAddTab
UINT8
usSlaveUserDataLen UINT16
abSlaveUserData
UINT8
3246
265504
265504
Table 92: Structure of the Slave Parameter Set according to IEC 61158 Specification
Hilscher, 2006-2013
149/336
This structure corresponds to the structure described in the chapter 'coding of the slave
parameters' of the PROFIBUS-norm IEC 61158.
The abPrmData field includes the parameter data block, which will be sent to the slave
station during its start-up procedure with the PROFIBUS DP command 'Set_Prm'. This field
includes 7-byte norm specific parameters and a User_prm_data field as extended user
specific data.
The abCfgData field includes the configuration data of the slave, which decides on the
number of input and outputs of the slave. This data is sent to the slave with the PROFIBUS
DP command 'Check_Cfg' to induce the slave to compare this configuration with its own
internally saved one.
The abAddTab field is a Hilscher-specific field, which configures the different offset
addresses of process data within the dual-port memory for modular and simple I/O slaves
in common. See the following structure:
abAddTab Structure
Variable name
Type
Explanation
Input_Count
byte
Output_count
byte
One module entry in the Cfg_list must result in a corresponding entry in the abAddTab, except
modules with a data length of 0. In this table, the offset address within the dual-port memory of
each module is held down. If the upper bit 15 in the IO_Offset[...] value is set to logical '1'
then the address is interpreted by the Device as byte offset address, else it is interpreted as word
offset address.
Hilscher, 2006-2013
150/336
Download example of a slave parameter data set with the address 4, without using the sequenced
download procedure.
command message
Message header
Service Header
Slave parameter
set
variable
type
value
signification
ulDest
UINT32
0x20
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
???
ulId
UINT32
ulSta
UINT32
Status
ulCmd
UINT32
PROFIBUS
_FSPMM_C
MD_DOWNL
OAD_REQ
PROFIBUS_FSPMM_CMD_DOWNLOAD_R
EQ - Command
ulExt
UINT32
ulRout
UINT32
ulRemoteAddress
UINT32
0xFF
Local master
ulAreaCode
UINT32
abData
UINT8[]
abSlaveAdr
UINT8
SlaveAddress
usParmeterSetLength
UINT16
bSlFlags
UINT8
128
Sl_Flag
bSlaveType
UINT8
Slave_Type
bMaxDiagDataLen
UINT8
bMaxAlarmLen
UINT8
464
bMaxChannelDateLen
UINT8
bDiagUpdDelay
UINT8
bAlarmMode
UINT8
bAddSlFlag
UINT8
Ignore auto_clear
usC1Timeout
UINT16
bReserved[4]
UINT8
usPrmDataLen
UINT16
Hilscher, 2006-2013
151/336
abPrmData
UINT8
usCfgDataLen
UINT16
abCfgData
UINT8
usAddTabLen
UINT16
abAddTab
UINT8
usSlaveUserDataLen
UINT16
abSlaveUserData
UINT8
The coding at bSlFlags corresponds to the structure in the chapter 'coding of the slave
parameters' in the PROFIBUS-norm IEC 61158.
Note:
The structure of the slave parameters could not be laid down statically,
because the data in the slave parameter set causes different lengths. Therefore no
obvious addresses can be fixed to the several start addresses of the different parameters.
Hilscher, 2006-2013
152/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_DOWNLOAD_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x221F
PROFIBUS_FSPMM_CMD_DOWNLOAD_CNF- Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM_DOWNLOAD_CNF_T
ulRemoteAddress
UINT32
0xFF
Address of master
ulAreaCode
UINT32
0125
Slave address
Hilscher, 2006-2013
153/336
For more information on freezing or synchronizing inputs or outputs see sections 5.3.1.3 and
5.3.1.4 of this document.
A DP slave accepts a control command only from the DP master, which has parameterized the DP
slave previously.
The parameter ulRemAdd determines the address of the slave to which the packet will be directed. Its
value can range from 0 to 127.
If a value between 0 and 126 is chosen, only one individual slave will be influenced.
The value of 127 represents the special global address. If this address is selected, all slaves will be
influenced simultaneously. This is also called a broadcast.
Description
D0
Reserved: 0
D1
D2
D3
D4
D5
D6
D7
Hilscher, 2006-2013
154/336
bit 3 or 5
signification
no function
Table 97: Explanations of possible Combinations of the Bits 'Unsync'/'Sync' and 'Unfreeze'/'Freeze':
The parameter Group_Select decides which group of the possible eight ones is addressed. The
command will be activated in the slave device, if the AND relation between its internal group
identification parameter (the parameter that was configured by the master in the start-up phase of
the slave) and the desired Group_Select logically represents the value '1'. If Group_Select
contains the value 0, no group selection (AND relation) is performed by the slave device when it
receives the command.
Bit D1 Clear_Data cannot be set by the user. Setting this flag has no effect to global control
command on the network. The stack generates this bit by itself in dependency of its operate mode
(CLEAR/OPRERATE). The user has no influence to this bit. The bit is mentioned here only for
completeness of all global control flags.
Note: The following special aspect should be taken into account concerning the
confirmation:
Hilscher, 2006-2013
155/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_GLOBALCONTROL_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
16
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2220
PROFIBUS_FSPMM_CMD_GLOBALCONTROL_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_GLOBALCONTROL_REQ_T
ulRemAdd
UINT32
0126
127
Slave address
127 represents the global address
ulSyncCommand
UINT32
0,16,32
Sync command
0x00: No Sync
0x10: Unsync
0x20: Sync
ulFreezeCommand
UINT32
0,4,8
Freeze command
0x00: No Freeze
0x04: Unfreeze
0x08: Freeze
ulGroupSelect
UINT32
0-7
Group selection
Hilscher, 2006-2013
156/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_GLOBALCONTROL_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2221
PROFIBUS_FSPMM_CMD_GLOBALCONTROL_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
Hilscher, 2006-2013
157/336
(0x00000001)
(0x00000002)
Hilscher, 2006-2013
158/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_SLAVE_ACTIVATE_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2226
PROFIBUS_FSPMM_CMD_SLAVE_ACTIVATE_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_GLOBALCONTROL_REQ_T
ulRemAdd
UINT32
0125
Slave address
ulActivate
UINT32
1
2
Activate Slave
Deactivate Slave
Hilscher, 2006-2013
159/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_SLAVE_ACTIVATE_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2227
PROFIBUS_FSPMM_CMD_SLAVE_ACTIVATE_CNF - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_SLAVE_ACTIVATE_CNF_T
ulRemAdd
UINT32
0125
Slave address
ulActivate
UINT32
1
2
Activate Slave
Deactivate Slave
Hilscher, 2006-2013
160/336
Hilscher, 2006-2013
161/336
Packet Description
Type: Indication
structure PROFIBUS_FSPMM_PACKET_FAULT_IND_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2222
PROFIBUS_FSPMM_CMD_FAULT_IND - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_FAULT_IND_T
ulRemAdd
UINT32
ulFault
UINT32
0 127
Hilscher, 2006-2013
162/336
Packet Description
structure PROFIBUS_MSCS1M_PACKET_INIT_CS_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x222C
PROFIBUS_MSCS1M_CMD_INIT_CS_REQ - Command
ulExt
UINT32
ulRout
UINT32
Hilscher, 2006-2013
163/336
Packet Description
structure PROFIBUS_MSCS1M_PACKET_INIT_CS_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPMS0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x222D
PROFIBUS_MSCS1M_CMD_INIT_CS_CNF- Command
ulExt
UINT32
ulRout
UINT32
Hilscher, 2006-2013
164/336
The parameter ulTimeValueSec refers to the count of seconds passed since 1.1.1900 or, if the
value is less than 0x9DFF4400, since 7.2.2036 6:28:16 (DD.MM.YYYY)
The parameter lTimeDiffMin must be a multiple of 30 (minutes) in the range from -930 to 930.
The parameter fSummerTime is true if the timezone is in summer time, false if in winter time.
The parameter fSyncActive is true if the ClockSync is synchronized with other clocks, false if
not synchronized.
The parameter fAnnouncementHour is true if a change of winter/summer time will occur within
the next hour.
Hilscher, 2006-2013
165/336
Packet Description
structure PROFIBUS_MSCS1M_PACKET_SET_TIME_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
19 or 27
0 ... 232-1
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x222E
PROFIBUS_MSCS1M_CMD_SET_TIME_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_MSCS1M_SET_TIME_REQ_T;
ulTimeValueSec
UINT32
0 ... 232-1
32
ulTimeValueNSec
UINT32
0 ... 2 -1
lTimeDiffMin
INT32
-930,-900,, 30,0,30,,930
fSummerTime
BOOLEA
N
FALSE, TRUE
ulAccuracyMSec
UINT32
fSyncActive
BOOLEA
N
FALSE, TRUE
Sync active
fAnnouncementHour BOOLEA
N
FALSE, TRUE
Announcement Hour
ulSystimeRefSec
ulSystimeRefNSec
UINT32
UINT32
32
0 ... 2 -1
0 ... 2 -1
Hilscher, 2006-2013
166/336
Packet Description
structure PROFIBUS_MSCS1M_PACKET_SET_TIME_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x222F
PROFIBUS_MSCS1M_CMD_SET_TIME_CNF - Command
ulExt
UINT32
ulRout
UINT32
Hilscher, 2006-2013
167/336
Hilscher, 2006-2013
168/336
Packet Description
structure PROFIBUS_MSCY1M_PACKET_REDUNDANCY_SWITCH_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
Destination Queue-Handle
ulSrc
UINT32
Source Queue-Handle
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
24
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2230
PROFIBUS_MSCY1M_CMD_REDUNDANCY_SWITCH_REQ Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_MSCY1M_REDUNDANCY_SWITCH_REQ_T
tPrmCmd
PROFIBU
S_PRMC
MD_T
PrmCmd structure
abAddress[16]
UINT8[]
Address structure
Hilscher, 2006-2013
169/336
Packet Description
structure PROFIBUS_MSCY1M_PACKET_REDUNDANCY_SWITCH_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
48
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2231
PROFIBUS_MSCY1M_CMD_REDUNDANCY_SWITCH_CNF Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_MSCY1M_REDUNDANCY_SWITCH_CNF_T
abAddress[16]
UINT8[]
Address structure
abExecute[16]
UINT8[]
Execute structure
abError[16]
UINT8[]
Error structure
Hilscher, 2006-2013
170/336
Hilscher, 2006-2013
171/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM_PACKET_ICOS_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
Destination Queue-Handle
ulSrc
UINT32
Source Queue-Handle
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
16
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2232
PROFIBUS_FSPMM_CMD_UPDATE_ICOS_CONFIG_REQ Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_ICOS_REQ_T
fIrqSuppression
BOOLEA
N
abAddress[16]
UINT8[]
0,1
Hilscher, 2006-2013
172/336
Packet Description
Type: Confirmation
structure PROFIBUS_FSPMM_PACKET_ICOS_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2233
PROFIBUS_FSPMM_CMD_UPDATE_ICOS_CONFIG_CNF Command
ulExt
UINT32
ulRout
UINT32
Hilscher, 2006-2013
173/336
set
is
selected,
Hilscher, 2006-2013
see
174/336
Packet Description
structure PROFIBUS_FSPMM_PACKET_UPLOAD_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
Destination Queue-Handle
ulSrc
UINT32
Source Queue-Handle
ulDestId
UINT32
ulFSPMM0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2234
PROFIBUS_FSPMM_CMD_UPLOAD_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_UPLOAD_REQ_T
ulRemoteAddress
UINT32
0xFF
Remote Address
ulAreaCode
UINT32
0125,
127
Area Code
127: Bus parameter set is transferred instead of slave
parameter set
ulOffset
UINT32
ulLength
UINT32
Hilscher, 2006-2013
175/336
Packet Description
Type: Confirmation
structure PROFIBUS_FSPMM_PACKET_UPLOAD_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulFSPMM0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2235
PROFIBUS_FSPMM_CMD_UPLOAD_CNF - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM_UPLOAD_CNF_T
ulRemoteAddress
UINT32
0xFF
Remote Address
ulAreaCode
UINT32
0125,
127
Area Code
ulOffset
UINT32
ulLength
UINT32
abData[PROFIBUS_ UINT8[]
FSPM_MAX_PCKT
_LEN]
Hilscher, 2006-2013
176/336
Description
"FSPMM2_QUE
The returned handle has to be used as value ulDest in all initiator packets the AP-Task intends to
send to the FSPMM2-Task. This handle is the same handle that has to be used in conjunction with
the macros like TLR_QUE_SENDPACKET_FIFO/LIFO() for sending a packet to the FSPMM-Task.
Hilscher, 2006-2013
177/336
Packet
Command
code
(REQ/CNF
or
IND/RES)
Page
6.2.1
0x4400/
0x4401
178
6.2.2
0x4404/
0x4405
180
6.2.3
0x4406/
0x4407
189
6.2.4
0x4408/
0x4409
194
6.2.5
PROFIBUS_FSPMM2_CMD_DATA_TRANSPORT_REQ/CNF Combined
V1 Class 2 Read and Write Request
0x440A/
0x440B
201
6.2.6
0x440C/
0x440D
208
6.2.7
PROFIBUS_FSPMM2_CMD_READ_SLAVE_DIAG_REQ/CNF Read
Slave Diagnostics (DP V1 Class 2)
0x440E/
0x440F
213
6.2.8
0x4410/
0x4411
216
6.2.9
0x4412/
0x4413
219
6.2.10
0x4414/
0x4415
221
6.2.11
0x4416/
0x4417
224
6.2.12
PROFIBUS_FSPMM2_CMD_GET_MASTER_DIAG_REQ/CNF Get
Master Diagnosis
0x4418/
0x4419
227
6.2.13
0x4430/
0x4431
230
6.2.14
0x4426/
0x4427
233
6.2.15
0x4428/
0x4429
237
6.2.16
PROFIBUS_FSPMM2_CMD_RESET_CONN_REQ/CNF Reset
Connection Command
0x4432/
0x4433
239
Table 114: Overview over the Packets of the FSPMM-Master -Task of the PROFIBUS DP-Master Protocol Stack
Hilscher, 2006-2013
178/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM2_PACKET_INIT_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x4400
PROFIBUS_FSPMM2_CMD_INIT_REQ - Command
ulExt
UINT32
ulRout
UINT32
Hilscher, 2006-2013
179/336
Packet Description
Type: Confirmation
structure PROFIBUS_FSPMM2_PACKET_INIT_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4401
PROFIBUS_FSPMM2_CMD_INIT_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
Hilscher, 2006-2013
180/336
The parameter ulRem_Add is used for storing the station address in order to provide access
protection.
The time-out usSend_Timeout specifies the control time interval for the supervision of the DPV1
Class 2 connection (MSAC_C2 connection) which the DP V1 Master Class 2 requests from the
slave. The supervision based on this period is performed as long as the DPV1 class 2 connection
is active. The time out values are specified in units of 10 milliseconds.
According to the PROFIBUS specification, PROFIBUS DP V1 Master Class 2 and PROFIBUS DP
V1 Slave inform each other about their supported service functionality using the variables
bFeaturesSupported1 and bFeaturesSupported2. This process gives both the slave and
the AP-Task the opportunity to adjust its functionality to the current requirements or to reject the
request if it cannot fulfill them.
This process works as follows:
The 'Initiate' service sends the parameter directly to the slave which immediately checks this
parameter. If a slave does not support a requested service or a defined profile, it will deny the
'Initiate' request. The connection state will change into the 'Closed' state then. If the initiate request
is confirmed positively then the connection state go to 'Opened' and the master will now request
Idle telegrams to the slave cyclically to supervise it, until the connection is aborted or interrupted
physically. In the last case the master will automatically abort and close the connection. In a
Class2 relationship only one open connection can exist at the same time, connections established
in parallel are forbidden. The device will deny further 'Initiate' requests as long as a Class2
connection to a slave is in 'Opened' state.
To initialize a connection to another slave device this already established connection must be
aborted before with the PROFIBUS_FSPMM2_CMD_ABORT_REQ request. A connection is in
'Opened' state as long as the device has not send an PROFIBUS_FSPMM2_CMD_CLOSED_IND
indication
message
to
the
host.
That
means
between
this
PROFIBUS_FSPMM2_CMD_INITIATE_REQ
request
message
and
the
PROFIBUS_FSPMM2_CMD_CLOSED_IND
indication
message
all
messages
like
the
PROFIBUS_FSPMM2_CMD_ABORT_IND indication or PROFIBUS_FSPMM2_CMD_XXX_CNF_NEG
messages have to be collected by the host program too. Only when the
PROFIBUS_FSPMM2_CMD_CLOSED_IND messages was received, no further messages must be
awaited by the host for this previously established Class2 connection.
PROFIBUS DP-Master | Protocol API
DOC061001API18EN | Revision 18 | English | 2013-10 | Released | Public
Hilscher, 2006-2013
181/336
Bit 0: Must be set in order to indicate support for services MSAC2_Read and MSAC2_Write
which is mandatory for all DP V1 slaves.
The access level of the source/destination is also given by an 8-bit number in the range from 0 to
255.
The optional values network address and MAC address of the source or destination, respectively,
are only present, when the source type or destination type have the value 1.
The network address must be a valid 6-byte network address according to ISO/OSI-rules.
The MAC address is a string according to the rules for MAC addresses.
Hilscher, 2006-2013
182/336
Depending on whether the connection could successfully be opened or not, the confirmation
packet will have a nearly completely different data part. However, the header part will be the same.
Successful execution is signified by a value of ulSta (within the head of the confirmation packet)
equal to 0, while all non-zero values at this location indicate an error during connection
establishment.
For more information also see section 5.3.5.2Diagnostic model of PROFIBUS DP V1 on page 84.
Hilscher, 2006-2013
183/336
Hilscher, 2006-2013
184/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM2_PACKET_INITIATE_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
12+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4404
PROFIBUS_FSPMM2_CMD_INITIATE_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_INITIATE_REQ_T
ulRemAdd
UINT32
0...126
Remote Address
usSendTimeout
UINT16
165535
bFeaturesSupported UINT8
1
0255
bFeaturesSupported UINT8
2
0255
bProfileFeaturesSup UINT8
ported1
0255
bProfileFeaturesSup UINT8
ported2
0255
usProfileIdentNumb
er
UINT16
065535
tAddAddrParam
PROFIBU
S_FSPM
M2_ADD_
ADDR_P
ARAM
Hilscher, 2006-2013
185/336
Packet Description
Hilscher, 2006-2013
186/336
Hilscher, 2006-2013
187/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_INITIATE_CNF_POS_T
Type: Positive Confirmation
Area
Variable
Type
Value / Range
Description
tData
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
15+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4405
PROFIBUS_FSPMM2_CMD_INITIATE_CNF Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_INITIATE_CNF_POS_T
ulRemAdd
UINT32
0...126
Remote Address
ulCRef
UINT32
065535
bMaxLenDataUni
t
UINT8
0255
bFeaturesSuppor
ted1
UINT8
0255
bFeaturesSuppor
ted2
UINT8
0255
bProfileFeatures
Supported1
UINT8
0255
bProfileFeatures
Supported2
UINT8
0255
usProfileIdentNu
mber
UINT16
065535
tAddAddrParam
PROFIB
US_FSP
MM2_A
DD_AD
DR_PA
RAM
Hilscher, 2006-2013
188/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_INITIATE_CNF_T
Type: Negative Confirmation
Area
Variable
Type
Value / Range
Description
tData
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
12
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4405
PROFIBUS_FSPMM2_CMD_INITIATE_CNF Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_INITIATE_CNF_NEG_T
ulRemAdd
UINT32
0...126
Remote Address
bErrorDecode
UINT8
128
bErrorCode1
UINT8
0255
bErrorCode2
UINT8
0255
bReserved
UINT8
0255
Reserved
usDetail
UINT16
065535
usReserved
UINT16
065535
Reserved
Hilscher, 2006-2013
189/336
The positive confirmation packet contains the same parameters plus additionally the following one:
1. The field abData contains the data block, which has been read and consists of the number
of octets indicated in the length parameter ulLength of the request.
Hilscher, 2006-2013
190/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM2_PACKET_READ_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
16
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4406
PROFIBUS_FSPMM2_CMD_READ_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_READ_REQ_T
ulCRef
UINT32
Connection Reference
ulSlot
UINT32
0 ... 254
Slot
ulIndex
UINT32
0 ... 254
Index
ulLength
UINT32
0 ... 240
Hilscher, 2006-2013
191/336
Packet Description
Hilscher, 2006-2013
192/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_READ_CNF_POS_T
Type: Positive Confirmation
Area
Variable
Type
Value / Range
Description
tData
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
16+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4407
PROFIBUS_FSPMM2_CMD_READ_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_READ_CNF_POS_T
ulCRef
UINT32
Connection Reference
ulSlot
UINT32
0 ... 254
Slot
ulIndex
UINT32
0 ... 254
Index
ulLength
UINT32
0 ... 240
abData
UINT8[]
Data area containing the data that have been read. The
length of this area corresponds to the value specified in
variable ulLength.
Packet Status/Error
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
Hilscher, 2006-2013
193/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_READ_CNF_NEG_T
Type: Negative Confirmation
Area
Variable
Type
Value / Range
Description
tData
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
20
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4407
PROFIBUS_FSPMM2_CMD_READ_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_READ_CNF_NEG_T
ulCRef
UINT32
Connection Reference
ulSlot
UINT32
0 ... 254
Slot
ulIndex
UINT32
0 ... 254
Index
ulLength
UINT32
0 ... 240
bErrorDecode
UINT8
0 ... 255
bErrorCode1
UINT8
0 ... 255
bErrorCode2
UINT8
0 ... 255
bReserved
UINT8
Hilscher, 2006-2013
194/336
Hilscher, 2006-2013
195/336
Hilscher, 2006-2013
196/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM_PACKET_INIT_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
16+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4408
PROFIBUS_FSPMM2_CMD_WRITE_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_WRITE_REQ_T
ulCRef
UINT32
Connection Reference
ulSlot
UINT32
0 ... 254
Slot
ulIndex
UINT32
0 ... 254
Index
ulLength
UINT32
0 ... 240
abData
UINT8[]
Hilscher, 2006-2013
197/336
Packet Description
Hilscher, 2006-2013
198/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_WRITE_CNF_POS_T
Type: Positive Confirmation
Area
Variable
Type
Value / Range
Description
tData
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
16
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4409
PROFIBUS_FSPMM2_CMD_WRITE_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_WRITE_CNF_POS_T
ulCRef
UINT32
Connection Reference
ulSlot
UINT32
0 ... 254
Slot
ulIndex
UINT32
0 ... 254
Index
ulLength
UINT32
0 ... 240
Hilscher, 2006-2013
199/336
Hilscher, 2006-2013
200/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_WRITE_CNF_T
Type: Negative Confirmation
Area
Variable
Type
Value / Range
Description
tData
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
20
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4409
PROFIBUS_FSPMM2_CMD_WRITE_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_WRITE_CNF_NEG_T
ulCRef
UINT32
Connection Reference
ulSlot
UINT32
0 ... 254
Slot
ulIndex
UINT32
0 ... 254
Index
ulLength
UINT32
0 ... 240
bErrorDecode
UINT8
0 ... 255
bErrorCode1
UINT8
0 ... 255
bErrorCode2
UINT8
0 ... 255
bReserved
UINT8
Reserved
Hilscher, 2006-2013
201/336
Hilscher, 2006-2013
202/336
Hilscher, 2006-2013
203/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_DATA_TRANSPORT_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
16+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x440A
PROFIBUS_FSPMM2_CMD_DATA_TRANSPORT_REQ Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_DATA_TRANSPORT_REQ_T
ulCRef
UINT32
Connection Reference
ulSlot
UINT32
0 ... 254
Slot
ulIndex
UINT32
0 ... 254
Index
ulLength
UINT32
0 ... 240
abData
UINT8[]
Hilscher, 2006-2013
204/336
Packet Description
Hilscher, 2006-2013
205/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_DATA_TRANSPORT_CNF_T
Type: Positive Confirmation
Area
Variable
Type
Value / Range
Description
tData
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
16+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x440B
PROFIBUS_FSPMM2_CMD_DATA_TRANSPORT_CNF Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_DATA_TRANSPORT_CNF_POS_T
ulCRef
UINT32
Connection Reference
ulSlot
UINT32
0 ... 254
Slot
ulIndex
UINT32
0 ... 254
Index
ulLength
UINT32
0 ... 240
abData
UINT8[]
Hilscher, 2006-2013
206/336
Hilscher, 2006-2013
207/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_DATA_TRANSPORT_CNF_T
Type: Negative Confirmation
Area
Variable
Type
Value / Range
Description
tData
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
20
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x440B
PROFIBUS_FSPMM2_CMD_DATA_TRANSPORT_CN
F - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_DATA_TRANSPORT_CNF_NEG_T
ulCRef
UINT32
Connection Reference
ulSlot
UINT32
0 ... 254
Slot
ulIndex
UINT32
0 ... 254
Index
ulLength
UINT32
0 ... 240
bErrorDecode
UINT8
0 ... 255
bErrorCode1
UINT8
0 ... 255
bErrorCode2
UINT8
0 ... 255
bReserved
UINT8
Hilscher, 2006-2013
208/336
ulCRef
This is the communication reference identifying the connection which has been delivered by
the positive confirmation packet (PROFIBUS_FSPMM2_INITIATE_CNF_POS) from the
initiate command.
bSubnet
This variable indicates the source of the abort, i.e.. whether it originates from the local or a
remote subnet or no specific source information should be given. The coding is as follows:
Subnet Variable
Value
Meaning
NO
SUBNET-LOCAL
SUBNET-REMOTE
3-255
Reserved
bInstance
The protocol instance causing the abort is specified here. Possible values are FDL, USER,
MSAC_C2. The coding is as follows:
Instance Codes and their Meaning
D7
D6
D5
D4
FDL
MSAC_C2
USER
Hilscher, 2006-2013
209/336
bReasonCode
The reason code is a 4 bit value (between 0 and 15) whose meaning depends from the
instance and indicates the reason for the abort according to the table below:
D6
D5
D4
D3 D0
Instance
Reason
Code
Description
FDL
UE
User Error
RR
No FDL resource
RS
NR
10
DH
11
LR
12
RDL
13
RDH
14
DS
15
NA
ABT_SE
Sequence Error
ABT_FE
ABT_TO
ABT_RE
ABT_IV
ABT_STO
ABT_IA
ABT_OC
Always 0
Always 0
DDLM
User
User-caused abort
abReserved
Hilscher, 2006-2013
210/336
Hilscher, 2006-2013
211/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_ABORT_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x440C
PROFIBUS_FSPMM2_CMD_ABORT_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_ABORT_REQ_T
ulCRef
UINT32
See above
Connection Reference
bSubnet
UINT8
02
Subnet
bInstance
UINT8
015
bReasonCode
UINT8
015
abReserved[1]
UINT8
Reserved field
Hilscher, 2006-2013
212/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_ABORT_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x440D
PROFIBUS_FSPMM2_CMD_ABORT_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_ABORT_CNF_T
ulCRef
UINT32
Connection Reference
Hilscher, 2006-2013
213/336
#define PROFIBUS_FSPMM2_READ_SLAVE_DIAG_REQ_SIZE
(sizeof(PROFIBUS_FSPMM2_READ_SLAVE_DIAG_REQ_T))
Hilscher, 2006-2013
214/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_READ_SLAVE_DIAG_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x440E
PROFIBUS_FSPMM2_CMD_READ_SLAVE_DIAG_REQ Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_READ_SLAVE_DIAG_REQ_T
ulRemAdd
UINT32
0 126
Hilscher, 2006-2013
215/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_READ_SLAVE_DIAG_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
4+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x440F
PROFIBUS_FSPMM2_CMD_READ_SLAVE_DIAG_CNF Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_READ_SLAVE_DIAG_CNF_T
ulRemAdd
UINT32
tDiagnostic
PROFIBU
S_FSPM
M_DIAGN
OSTIC_D
ATA_T
0 126
Hilscher, 2006-2013
216/336
Hilscher, 2006-2013
217/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_READ_INPUT_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4410
PROFIBUS_FSPMM2_CMD_READ_INPUT_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_READ_INPUT_REQ_T
ulRemAdd
UINT32
0...126
Hilscher, 2006-2013
218/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_READ_INPUT_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
4+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4411
PROFIBUS_FSPMM2_CMD_READ_INPUT_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_READ_INPUT_CNF_T
ulRemAdd
UINT32
abData
UINT8[]
Hilscher, 2006-2013
219/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_READ_OUTPUT_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4412
PROFIBUS_FSPMM2_CMD_READ_OUTPUT_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_READ_OUTPUT_REQ_T
ulRemAdd
UINT32
0...126
Hilscher, 2006-2013
220/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_READ_OUTPUT_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
4+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4413
PROFIBUS_FSPMM2_CMD_READ_OUTPUT_CNF Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_READ_OUTPUT_CNF_T
ulRemAdd
UINT32
abData
UINT8[]
0...126
Hilscher, 2006-2013
221/336
Hilscher, 2006-2013
222/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM_PACKET_INIT_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4414
PROFIBUS_FSPMM2_CMD_GET_CFG_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_GET_CFG_REQ_T
ulRemAdd
UINT32
0...126
Hilscher, 2006-2013
223/336
Packet Description
Type: Confirmation
structure PROFIBUS_FSPMM_PACKET_INIT_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
4+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4415
PROFIBUS_FSPMM2_CMD_GET_CFG_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_GET_CFG_CNF_T
ulRemAdd
UINT32
abData[]
UINT8[PR
OFIBUS_
FSPM_M
AX_IO_D
ATA_LEN
]
0...126
Hilscher, 2006-2013
224/336
Hilscher, 2006-2013
225/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_SET_SLAVE_ADD_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
8+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4416
PROFIBUS_FSPMM2_CMD_SET_SLAVE_ADD_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_SET_SLAVE_ADD_REQ_T
ulRemAdd
UINT32
0...126
bNewSlaveAdd
UINT8
0...125
The value of the new address the slave should have in future.
usIdentNumber
UINT16
Depends on slave
bNoAddChg
UINT8
0,1
abRemSlaveData
UINT8[]
Hilscher, 2006-2013
226/336
Packet Description
Type: Confirmation
structure PROFIBUS_FSPMM2_PACKET_SET_SLAVE_ADD_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4417
PROFIBUS_FSPMM2_CMD_SET_SLAVE_ADD_CNF Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_SET_SLAVE_ADD_CNF_T
ulRemAdd
UINT32
0...126
bNewSlaveAdd
UINT8
The value of the new address the slave will have in future.
usIdentNumber
UINT16
bNoAddChg
UINT8
Hilscher, 2006-2013
227/336
Hilscher, 2006-2013
228/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM_PACKET_INIT_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4418
PROFIBUS_FSPMM2_CMD_GET_MASTER_DIAG_REQ Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_GET_MASTER_DIAG_REQ_T
ulRemAdd
UINT32
0...125
bIdentifier
UINT8
0255
Identifier
abReserved[3]
UINT8 []
Reserved
Hilscher, 2006-2013
229/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_GET_MASTER_DIAG_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
8+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4419
PROFIBUS_FSPMM2_CMD_GET_MASTER_DIAG_CNF Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_GET_MASTER_DIAG_CNF_T
ulRemAdd
UINT32
0...125
Remote address
bIdentifier
UINT8
0255
Identifier
abReserved[3]
UINT8[]
Reserved
abData
UINT8[]
Diagnostic data
Hilscher, 2006-2013
230/336
Meaning
Master (active)
Slave (passive)
Not present
The contents of the abLiveList[] field is of course only valid if the ulSta parameter is equal to
0.
Packet Structure Reference
#define PROFIBUS_FSPMM2_LIVE_LIST_SIZE 128
typedef struct PROFIBUS_FSPMM2_PACKET_LIVE_LIST_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead;
} PROFIBUS_FSPMM2_PACKET_LIVE_LIST_REQ_T;
#define PROFIBUS_FSPMM2_LIVE_LIST_REQ_SIZE
(0)
Hilscher, 2006-2013
231/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_LIVE_LIST_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4430
PROFIBUS_FSPMM2_CMD_LIVE_LIST_REQ - Command
ulExt
UINT32
ulRout
UINT32
Hilscher, 2006-2013
232/336
Packet Description
Type: Confirmation
structure PROFIBUS_FSPMM_PACKET_INIT_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
128
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4431
PROFIBUS_FSPMM2_CMD_LIVE_LIST_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_LIVE_LIST_CNF_T
abLiveList
UINT8[]
Hilscher, 2006-2013
233/336
The bLocallyGenerated parameter indicates whether the abort has been caused locally or remotely as
described above.
3. The bSubnet parameter indicates the source of the abort, i.e.. whether it originates from the
local or a remote subnet or no specific source information should be given. For the coding see
Table 130: Allowed Values of Subnet Variable.
4. The bInstance parameter specifies the protocol instance causing the abort. Possible values
are FDL, USER, MSAC_C2. For the coding see Table 131: Instance Codes and their Meaning.
5. The bReasonCode parameter is a 4 bit value (i.e. between 0 and 15) whose meaning
depends from the instance and indicates the reason for the abort. For the coding see Table
132: Possible Reason Codes and their Meaning.
6. The usAbortDetail parameter contains additional information about the reason of the abort
if available if not equal to 0. In case of a too small value for the send timeout (bInstance =
MSAC_C2 and bReasonCode = ABT_STO) this parameter should contain the Send_Timeout
value of the connection to be aborted according to the IEC 61158 Part 3/EN 50170
specification.
Hilscher, 2006-2013
234/336
Hilscher, 2006-2013
235/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_ABORT_IND_T
Variable
Type
Value / Range
Type: Indication
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
12
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4426
PROFIBUS_FSPMM2_CMD_ABORT_IND - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_ABORT_IND_T
ulCRef
UINT32
Connection reference
bLocallyGenerated
UINT8
0,1
bSubnet
UINT8
0...2,
Subnet
3...255 are
reserved
bInstance
UINT8
0...255
Instance
bReasonCode
UINT8
0...255
usAbortDetail
UINT16
0...65535
abReserved[2]
UINT8[]
Reserved area
Hilscher, 2006-2013
236/336
Packet Description
Type: Response
structure PROFIBUS_FSPMM2_CMD_ABORT_RES
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4427
PROFIBUS_FSPMM2_CMD_ABORT_RES - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_ABORT_RES_T
ulCRef
UINT32
Connection reference
Hilscher, 2006-2013
237/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_CLOSED_IND_T
Variable
Type
Value / Range
Type: Indication
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x4428
PROFIBUS_FSPMM2_CMD_CLOSED_IND - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_CLOSED_IND_T
ulCRef
UINT32
Hilscher, 2006-2013
238/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_CLOSED_RES_T
Variable
Type
Value / Range
Type: Response
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4429
PROFIBUS_FSPMM2_CMD_CLOSED_RES - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_FSPMM2_CLOSED_RES_T
ulCRef
UINT32
Connection reference
Hilscher, 2006-2013
239/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM2_PACKET_RESET_CONN_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
FSPMM2_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulFSPMM2Id
ulSrcId
UINT32
ulAPMS2Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4432
PROFIBUS_FSPMM2_CMD_RESET_CONN_REQ- Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_FSPMM2_RESET_CONN_REQ_T
ulRemAddr
UINT32
0...126
Hilscher, 2006-2013
240/336
Packet Description
structure PROFIBUS_FSPMM2_PACKET_RESET_CONN_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM2Id
ulSrcId
UINT32
ulFSPMM2d
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x4433
PROFIBUS_FSPMM2_CMD_RESET_CONN_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
Hilscher, 2006-2013
241/336
Description
"PB_DL_QUE
The returned handle has to be used as value ulDest in all initiator packets the AP-Task intends to
send to the DL-Task. This handle is the same handle that has to be used in conjunction with the
macros like TLR_QUE_SENDPACKET_FIFO/LIFO() for sending a packet to the DL-Task.
Hilscher, 2006-2013
242/336
Packet
Command code
(REQ/CNF or
IND/RES)
Page
6.3.1
0x102/
0x103
243
6.3.2
0x104/
0x105
245
6.3.3
0x106/
0x107
247
6.3.4
0x108
253
6.3.5
0x10A/
0x10B
256
6.3.6
0x10C
262
6.3.7
0x10E/
0x10F
265
6.3.8
0x110
271
6.3.9
PROFIBUS_DL_CMD_DATA_REPLY_UPDATE_REQ/CNF - Reply
Update Service
0x112/
0x113
274
6.3.10
0x120/
0x121
278
6.3.11
0x122/
0x123
283
6.3.12
PROFIBUS_DL_CMD_DLSAP_DEACTIVATE_REQ/CNF - Deactivate an
SAP for Request
0x128/
0x129
288
6.3.13
PROFIBUS_DL_CMD_SET_VALUE_BUS_PARAMETER_SET_REQ/CNF
- Load the Bus Parameter Set
0x126/
0x127
290
6.3.14
0x12A/
0x12B
295
6.3.15
0x132/
0x133
298
6.3.16
0x0134/
0x0135
300
6.3.17
PROFIBUS_DL_CMD_REGISTER_LMS_REQ/CNF - Register an
Application to receive LMS Change Indications
0x0136/
0x0137
303
6.3.18
0x0138
306
6.3.19
0x0130/
0x0131
308
Table 157: Overview over the Packets of the PROFIBUS DL -Task of the PROFIBUS DP-Master Protocol Stack
Hilscher, 2006-2013
243/336
Packet Description
structure PROFIBUS_DL_PACKET_CMD_START_DLE_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
PB_DL_QUE
ulSrc
UINT32
32
0 ... 2 -1
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
0 ... 2 -1
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x102
PROFIBUS_DL_CMD_START_DLE_REQ - Command
ulExt
UINT32
ulRout
UINT32
Hilscher, 2006-2013
244/336
Packet Description
structure PROFIBUS_DL_PACKET_CMD_START_DLE_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x103
PROFIBUS_DL_CMD_START_DLE_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
Hilscher, 2006-2013
245/336
Packet Description
structure PROFIBUS_DL_PACKET_CMD_STOP_DLE_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
PB_DL_QUE
ulSrc
UINT32
32
0 ... 2 -1
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
0 ... 2 -1
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x104
PROFIBUS_DL_CMD_STOP_DLE_REQ - Command
ulExt
UINT32
ulRout
UINT32
Hilscher, 2006-2013
246/336
Packet Description
structure PROFIBUS_DL_PACKET_CMD_STOP_DLE_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x105
PROFIBUS_DL_CMD_STOP_DLE_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
Hilscher, 2006-2013
247/336
Hilscher, 2006-2013
248/336
Packet Description
Type: Request
structure PROFIBUS_DL_PACKET_DATA_ACK_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
8+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x106
PROFIBUS_DL_CMD_DATA_ACK_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_DATA_ACK_REQ_T
bSrvCls
UINT8
0,1
bDstAddr
UINT8
0-126
UINT8
0-62,
64 (= NIL SAP)
bSrcSAPIdx
UINT8
0-62,
64 (= NIL SAP)
abPad
UINT8[4]
abSDU
UINT8[]
Padding bytes
Service Data Unit
Hilscher, 2006-2013
249/336
Additional explanations:
1) The parameter bSrvCls defines the FDL priority for the data transfer. Two priorities are
possible in this context:
PROFIBUS_DL_SERVICE_CLASS_LOW = 0
PROFIBUS_DL_SERVICE_CLASS_HIGH = 1
2) The parameter bDstAddr defines the FDL address of the remote station. For this
parameter, the value 127 is not permissible as remote address because it signifies the
global address used for broadcasts.
3) The parameter bDsap defines the service access point of the remote user. The value 64
represents the NIL SAP.
4) The parameter bSsap defines the service access point of the local user. The value 64
again represents the NIL SAP.
Hilscher, 2006-2013
250/336
Packet Description
Type: Confirmation
structure PROFIBUS_DL_PACKET_DATA_ACK_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x107
PROFIBUS_DL_CMD_DATA_ACK_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_DL_DATA_ACK_CNF_T
bSrvCls
UINT8
0,1
Service Class
bDstAddr
UINT8
0-126
Destination address
Note: Mask out the highest bit when working with bDstAddr in
order to avoid disturbances as this bit stores a separate
information.
bDstSAPIdx
UINT8
0-62,
64 = NIL SAP
bSrcSAPIdx
UINT8
0-62,
64 = NIL SAP
Table 163: PROFIBUS_DL_CMD_DATA_ACK_CNF Confirmation of Send SDA Service
Hilscher, 2006-2013
251/336
Packet Status/Error
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
TLR_E_PROFIBUS_DL_A
CK_UE (0xC0060080L)
The remote station the service has been sent to indicates a User Error as
service acknowledgement.
TLR_E_PROFIBUS_DL_ACK
_RR (0xC0060081L)
TLR_E_PROFIBUS_DL_A
CK_RS (0xC0060082L
The remote station the service has been sent to indicates a Service Access
Point Error as service acknowledgement.
TLR_E_PROFIBUS_DL_A
CK_NR (0xC0060083L)
The remote station the service has been sent to confirms its positive
reception but has no data to confirm.
TLR_E_PROFIBUS_DL_A
CK_RDH
(0xC0060084L)
The remote station the service has been sent to, confirms its reception
negatively but has returned low priority data in the response.
TLR_E_PROFIBUS_DL_A
CK_RDL
(0xC0060085L)
The remote station the service has been sent to, confirms its reception
negatively but has returned high priority data in the response.
TLR_E_PROFIBUS_DL_A
CK_DH (0xC0060086L)
The remote station the service has been sent to, confirms its reception
positively and has returned low priority data in the response.
TLR_E_PROFIBUS_DL_A
CK_DL (0xC0060087L)
The remote station the service has been sent to, confirms its reception
positively and has returned high priority data in the response.
TLR_E_PROFIBUS_DL_A
CK_NA (0xC0060088L)
The remote station the service has been sent to shows no or no plausible
reaction at all.
TLR_E_PROFIBUS_DL_A
CK_UNKNOWN
(0xC0060089L)
The remote station the service has been sent has returned an unknown
acknowledgement code.
Hilscher, 2006-2013
252/336
Error source
TLR_E_PROFIBUS_DL_ACK_LR
(0xC006008BL)
Slave
TLR_E_PROFIBUS_DL_ACK_LS
(0xC006008AL)
Slave
TLR_E_PROFIBUS_DL_ACK_NR
(0xC0060083L)
Slave
TLR_E_PROFIBUS_DL_ACK_NA
(0xC0060088L)
Slave
Network in
general
Hilscher, 2006-2013
253/336
Hilscher, 2006-2013
254/336
Packet Description
Type: Indication
structure PROFIBUS_DL_PACKET_DATA_ACK_IND_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
8+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x108
PROFIBUS_DL_CMD_DATA_ACK_IND - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_DATA_ACK_IND_T
bSrvCls
UINT8
0,1
Service Class
bDstAddr
UINT8
0-126
Destination address
Note: Mask out the highest bit when working with bDstAddr in
order to avoid disturbances as this bit stores a separate
information.
bDstSAPIdx
UINT8
0-62,
64 (= NIL SAP)
bSrcAddr
UINT8
0-126
Source address
Note: Mask out the highest bit when working with bSrcAddr in
order to avoid disturbances as this bit stores a separate
information.
bSrcSAPIdx
UINT8
0-62,
64 (= NIL SAP)
abPad
UINT8[3]
abSDU
UINT8[]
Padding bytes
Service Data Unit
Hilscher, 2006-2013
255/336
Additional explanations:
1. The parameter bSrcSAPIdx and bDstSAPIdx specify the source and destination Service
Access Points of the received SDA frame.
2. The parameter bDstAddr defines the FDL address of the remote station, to which this
service has been sent.
3. The parameter bSrcAddr defines the FDL address of the remote station, from which this
service has been sent.
4. The parameter bSrvCls specifies the FDL priority of the received SDA frame. Two
priorities are possible in this context:
PROFIBUS_DL_SERVICE_CLASS_LOW = 0
PROFIBUS_DL_SERVICE_CLASS_HIGH = 1
Hilscher, 2006-2013
256/336
Hilscher, 2006-2013
257/336
Packet Description
Type: Request
structure PROFIBUS_DL_PACKET_DATA_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/
PB_DL_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
8+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x10A
PROFIBUS_DL_CMD_DATA_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_DATA_REQ_T
bSrvCls
UINT8
0,1
bDstAddr
UINT8
0-126,
127 (= Broadcast) Note: Mask out the highest bit when working with bDstAddr in
order to avoid disturbances as this bit stores a separate
information.
bDstSAPIdx
UINT8
0-63,
64 = NIL SAP
bSrcSAPIdx
UINT8
0-62,
64 = NIL SAP
abPad
UINT8[4]
abSDU
UINT8[]
Padding bytes
Service Data Unit
Hilscher, 2006-2013
258/336
Additional explanations:
1. The parameter bSrvCls defines the FDL priority for the data transfer. Two priorities are
possible in this context:
PROFIBUS_DL_SERVICE_CLASS_LOW = 0
PROFIBUS_DL_SERVICE_CLASS_HIGH = 1
2. The parameter bDstAddr defines the FDL address of the remote station. The allowed
range for this parameter extends from 0 to 126.
3. The parameter bDstSAPIdx defines the service access point of the remote user. The
value 64 represents the NIL SAP.
4. The parameter bSrcSAPIdx defines the service access point of the local user. The
allowed range for this parameter extends from 0 to 62. A value bSrcSAPIdx of 63 is not
permitted in this command. The value 64 again represents the NIL SAP.
Hilscher, 2006-2013
259/336
Packet Description
Type: Confirmation
structure PROFIBUS_DL_PACKET_DATA_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x10B
PROFIBUS_DL_CMD_DATA_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_DL_DATA_CNF_T
bSrcCls
UINT8
0,1
Service Class
bDstAddr
UINT8
0-126,
Destination address
127 (= Broadcast)
Note: Mask out the highest bit when working with bDstAddr in
order to avoid disturbances as this bit stores a separate
information.
0-63,
bDstSAPIdx
UINT8
64 = NIL SAP
bSrcSAPIdx
UINT8
0-62,
64 = NIL SAP
Table 168: PROFIBUS_DL_CMD_DATA_CNF Confirmation of Send SDN Service Request
Hilscher, 2006-2013
260/336
Packet Status/Error
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
TLR_E_PROFIBUS_DL_AC
K_RR (0xC0060081L)
TLR_E_PROFIBUS_DL_AC
K_NA (0xC0060088L)
TLR_E_PROFIBUS_DL_AC
K_LS
(0xC006008AL)
TLR_E_PROFIBUS_DL_AC
K_LR
(0xC006008BL)
TLR_E_PROFIBUS_DL_AC
K_DS
(0xC006008CL)
Hilscher, 2006-2013
261/336
Error source
TLR_E_PROFIBUS_DL_ACK_RR
(0xC0060081L)
Slave
Network in
general
Hilscher, 2006-2013
262/336
Hilscher, 2006-2013
263/336
Packet Description
Type: Indication
structure PROFIBUS_DL_PACKET_DATA_IND_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
8+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x10C
PROFIBUS_DL_CMD_DATA_IND - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_DATA_IND_T
bSrcCls
UINT8
0,1
Service Class
bDstAddr
UINT8
0-126,
Destination address
127 (= Broadcast)
Note: Mask out the highest bit when working with bDstAddr in
order to avoid disturbances as this bit stores a separate
information.
0-63,
bDstSAPIdx
UINT8
64 (= NIL SAP)
bSrcAddr
UINT8
0-126
Source address
Note: Mask out the highest bit when working with bSrcAddr in
order to avoid disturbances as this bit stores a separate
information.
bSrcSAPIdx
UINT8
0-62,
64 (= NIL SAP)
abPad
UINT8[3]
abSDU
UINT8[]
Padding bytes
Service Data Unit
Hilscher, 2006-2013
264/336
Additional explanations:
1. The parameter bSrcSAPIdx and bDstSAPIdx specify the source and destination service
access points of the received SDN frame. The allowed range for this parameter extends
from 0 to 62. The value 64 is also allowed. It represents the NIL SAP. A value
bSrcSAPIdx of 63 is not permissible in this command because it represents the global
access.
2. The parameter bSrcAddr defines the FDL address of the local station. Values between 0
and 126 are allowed.
3. The parameter bDstAddr defines the FDL address of the remote station, which has sent
this service. Values between 0 and 126 are allowed. 127 signifies a broadcast.
4. The parameter bSrvCls defines the FDL priority for the data transfer. Two priorities are
possible in this context:
PROFIBUS_DL_SERVICE_CLASS_LOW = 0
PROFIBUS_DL_SERVICE_CLASS_HIGH = 1
Hilscher, 2006-2013
265/336
Hilscher, 2006-2013
266/336
Packet Description
Type: Request
structure PROFIBUS_DL_PACKET_DATA_REPLY_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
8+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x10E
PROFIBUS_DL_CMD_DATA_REPLY_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_DATA_REPLY_REQ_T
bSrvCls
UINT8
0,1
bDstAddr
UINT8
0-126
bDstSAPIdx
UINT8
0-62,
64 = NIL SAP
bSrcSAPIdx
UINT8
0-62,
64 = NIL SAP
abPad
UINT8[4]
abSDU
UINT8[]
Padding bytes
Service Data Unit
Additional explanations:
1. The parameter bDstSAPIdx defines the service access point of the remote user. It is not
recommended to use the value 63 in this context. The value 64 represents the NIL SAP.
2. The parameter bSrcSAPIdx defines the service access point of the local user. It is not
recommended to use the value 63 in this context. The value 64 represents the NIL SAP.
3. The parameter bDstAddr defines the FDL address of the remote station. The allowed
range for this parameter extends from 0 to 126.
4. The parameter bSrvCls defines the FDL priority for the data transfer. Two priorities are
possible in this context:
PROFIBUS_DL_SERVICE_CLASS_LOW = 0
PROFIBUS_DL_SERVICE_CLASS_HIGH = 1
Hilscher, 2006-2013
267/336
Hilscher, 2006-2013
268/336
Packet Description
structure PROFIBUS_DL_PACKET_DATA_REPLY_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
8+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x10F
PROFIBUS_DL_CMD_DATA_REPLY_CNF- Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_DL_DATA_REPLY_CNF_T
bSrvCls
UINT8
0,1
Service Class
bDstAddr
UINT8
0-126
Destination address
Note: Mask out the highest bit when working with bDstAddr in
order to avoid disturbances as this bit stores a separate
information.
bDstSAPIdx
UINT8
0-62,
64 (= NIL SAP)
bSrcSAPIdx
UINT8
0-62,
64 (= NIL SAP)
abPad
UINT8[4]
abSDU
UINT8[]
Padding bytes
Service Data Unit
Hilscher, 2006-2013
269/336
Packet Status/Error
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
TLR_E_PROFIBUS_DL_AC
K_DL (0xC0060087L)
The remote station the service has been sent to, confirms its
reception positively and has returned low priority data in the
response.
TLR_E_PROFIBUS_DL_AC
K_RR (0xC0060081L)
TLR_E_PROFIBUS_DL_AC
K_NA (0xC0060088L)
TLR_E_PROFIBUS_DL_AC
K_LS
(0xC006008AL)
TLR_E_PROFIBUS_DL_AC
K_LR
(0xC006008BL)
TLR_E_PROFIBUS_DL_AC
K_DS
(0xC006008CL)
TLR_E_PROFIBUS_DL_AC
K_IV
(0xC006008DL)
Hilscher, 2006-2013
270/336
For the following possible causes of failures some hints can be given:
Error source
TLR_E_PROFIBUS_DL_ACK_RR
(0xC0060081L)
Slave
TLR_E_PROFIBUS_DL_ACK_LR
(0xC006008BL)
Slave
TLR_E_PROFIBUS_DL_ACK_LS
(0xC006008AL)
Slave
TLR_E_PROFIBUS_DL_ACK_DH
(0xC0060086L)
No error
TLR_E_PROFIBUS_DL_ACK_NR
(0xC0060083L)
Slave
TLR_E_PROFIBUS_DL_ACK_NA
(0xC0060088L)
Slave
Network in
general
Hilscher, 2006-2013
271/336
Hilscher, 2006-2013
272/336
Packet Description
structure PROFIBUS_DL_PACKET_DATA_REPLY_IND_T
Variable
Type
Value / Range
Type: Indication
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
8+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x110
PROFIBUS_DL_CMD_DATA_REPLY_IND - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_DATA_REPLY_IND_T
bSrvCls
UINT8
0,1
Service Class
bDstAddr
UINT8
0-126
Destination Address
Note: Mask out the highest bit when working with bDstAddr in
order to avoid disturbances as this bit stores a separate
information.
bDstSAPIdx
UINT8
0-62,
64 (= NIL SAP)
bSrcAddr
UINT8
0-126
Source address
Note: Mask out the highest bit when working with bDstAddr in
order to avoid disturbances as this bit stores a separate
information.
bSrcSAPIdx
UINT8
0-62,
64 (= NIL SAP)
bUpdateStatus
UINT8
0,1
abPad
UINT8[2]
Padding bytes
abSDU
UINT8[]
Hilscher, 2006-2013
273/336
Additional explanations:
1. The parameters bSrcSAPIdx and bDstSAPIdx specify the source and destination service
access points of the received SRD frame. The allowed range for these parameters extends
from 0 to 62. The value 64 is also allowed. It represents the NIL SAP. However, a value
bSrcSAPIdx of 63 is not permitted in this command because it represents the global
access.
2. The parameter bSrcAddr defines the FDL address of the local station. Values between 0
and 126 are allowed.
3. The parameter bDstAddr defines the FDL address of the remote station, which has sent
this service. Values between 0 and 126 are allowed.
4. The parameter bSrvCls specifies the FDL priority of the received SRD frame. Two
priorities are possible in this context:
PROFIBUS_DL_SERVICE_CLASS_LOW = 0
PROFIBUS_DL_SERVICE_CLASS_HIGH =1
5. The parameter bUpdateStatus indicates whether or not the response data have been
passed to the local FDL controller. The response data can be set up to with the reply
update service (PROFIBUS_DL_CMD_DATA_REPLY_UPDATE_REQ).
The following table shows the allowed values of the parameter bUpdateStatus and their
meanings:
Name
Value
Meaning
PROFIBUS_DL_UPDATE_STATUS_NO
0x00
PROFIBUS_DL_UPDATE_STATUS_LO
0x01
PROFIBUS_DL_UPDATE_STATUS_HI
0x02
Table 177: Allowed Values and their Meanings for Variable bUpdateStatus
Hilscher, 2006-2013
274/336
Hilscher, 2006-2013
275/336
Packet Description
structure PROFIBUS_DL_PACKET_REPLY_UPDATE_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
4+n
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x112
PROFIBUS_DL_CMD_DATA_REPLY_UPDATE_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_DATA_REPLY_UPDATE_REQ_T
bSrcSAPIdx
UINT8
0-62,
64 (= NIL SAP)
bSrvCls
UINT8
0,1
Service Class
bTransmitStrategy
UINT8
0,1
abPad
UINT8[1]
Padding bytes
abSDU
UINT8[]
Hilscher, 2006-2013
276/336
Additional explanations:
1. The parameter bSrcSAPIdx specifies the service access point of the remote user that
carries out this request and which data area should be updated by the abSDU. A
bSrcSAPIdx value of 63 is not permitted. A value of 64 represents the NIL SAP.
2. The parameter bSrvCls defines the FDL priority for the data transfer. Two priorities are
possible:
PROFIBUS_DL_SERVICE_CLASS_LOW = 0 and
PROFIBUS_DL_SERVICE_CLASS_HIGH = 1.
PROFIBUS_DL_REPLY_UPDATE_SINGLE = 0 and
PROFIBUS_DL_REPLY_UPDATE_MULTIPLE = 1
Hilscher, 2006-2013
277/336
Packet Description
structure PROFIBUS_DL_PACKET_REPLY_UPDATE_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x113
PROFIBUS_DL_CMD_DATA_REPLY_UPDATE_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_DL_REPLY_UPDATE_CNF_T
bSrcSAPIdx
UINT8
0-62,
64 = NIL SAP
bSrvCls
UINT8
0,1
Service Class
Hilscher, 2006-2013
278/336
Hilscher, 2006-2013
279/336
Packet Description
structure PROFIBUS_DL_PACKET_DLSAP_ACTIVATE_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x120
PROFIBUS_DL_CMD_DLSAP_ACTIVATE_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_DLSAP_ACTIVATE_REQ_T
bSrcSAPIdx
UINT8
0-63,
64=NIL SAP
bAcc
UINT8
0-126,255
bParallelServices
UINT8
1-4
bServiceActivate
UINT8
0-31
bRoleInService
UINT8
1-3
Service configuration
INITIATOR, RESPONDER, BOTH
bMaxDLSDULenRe
qLow
UINT8
1-246
bMaxDLSDULenRe
qHigh
UINT8
1-246
bMaxDLSDULenInd
CnfLow
UINT8
1-246
bMaxDLSDULenInd
CnfHigh
UINT8
1-246
Hilscher, 2006-2013
280/336
Additional explanations:
1) The parameter bSrcSAPIdx specifies the source service access point of the received SRD
frame. The allowed range for this parameter extends from 0 to 62. The value 64 is also
allowed. It represents the NIL SAP. A value bSrcSAPIdx of 63 is not permitted in this
command because it represents the global access.
2) The parameter bAcc is used for specifying the access protection for responder functions. It has
the allowed values ALL = 255 or 0 to 126 and specifies whether all remote stations (ALL) or
only an individual remote station identified by its station number ( 0 to 126) may have access to
the LSAP. This parameter is only valid for responder functions, i.e. bRoleInService =
RESPONDER, BOTH. If the access value is ALL, the device automatically sets the buffer length
to the maximum value 244 and the services to all supported and the role in service to both
independent what the rest command message parameter are.
3) The parameter bParallelServices specifies the upper limit for the number of parallel
services that can be activated at the same time. Up to 4 parallel services are possible.
4) The parameter bServiceActivate contains the FDL service that shall be activated for this
service according to the following table:
bServiceActivate parameter
Name
Value
Service
PROFIBUS_DL_SERVICE_SDA
0x01
SDA Service.
PROFIBUS_DL_SERVICE_SDN
0x02
SDN Service.
PROFIBUS_DL_SERVICE_SRD
0x04
SRD Service
PROFIBUS_DL_SERVICE_MSRD
0x08
MSRD Service
PROFIBUS_DL_SERVICE_CS
0x10
CS Service
5) The parameter bRoleInService specifies the configuration for the service to be activated.
The following values are specified:
bRoleInService parameter
Name
Value
Operation
PROFIBUS_DL_SERVICE_ROLE_INITIATOR
PROFIBUS_DL_SERVICE_ROLE_RESPONDER
PROFIBUS_DL_SERVICE_ROLE_BOTH
Hilscher, 2006-2013
281/336
6) The
parameters
bMaxDLSDULenReqLow,
bMaxDLSDULenReqHigh,
bMaxDLSDULenIndCnfLow and bMaxDLSDULenIndCnfHigh specify the maximum length of
the SDU for transparent data transfer depending on
whether low (bMaxDLSDULenXXXLow) or high priority (bMaxDLSDULenXXXHigh) is intended to be
applied.
whether data are sent (in case of a request, bMaxDLSDULenReqYYY) or received (in case of either a
confirmation or an indication, bMaxDLSDULenIndCnfYYY)
Additional rules apply for all of these parameters whether they must be equal to 0 or must not
be equal to 0 depending on :
the chosen service
the role in service (Initiator, responder or both))
These rules can be expressed as tables. For each parameter and role in service intended to
use in conjunction with this parameter there are a few allowed combinations whether to set the
parameter to a zero- or non-zero-value which are represented by columns. If for a parameter the
value 0 can be found it should be set to 0 otherwise (value x) it should be set to a non-zero value
not exceeding 242:
bMaxDLSDULenReqLow, bMaxDLSDULenReqHigh, bMaxDLSDULenIndCnfLow and
bMaxDLSDULenIndCnfHigh parameters for services SDA and SDN
Services SDA and SDN
Name
Role in service
Initiator
Responder
Both
bMaxDLSDULenReqLow
bMaxDLSDULenReqHigh
bMaxDLSDULenIndCnfLow
bMaxDLSDULenIndCnfHigh
Role in service
Initiator
bMaxDLSDULenReqLow
bMaxDLSDULenReqHigh
bMaxDLSDULenIndCnfLow
bMaxDLSDULenIndCnfHigh
For the roles in service Responder and Both no values are given as this packet is not applicable
for the reply services SRD and MSRD, there is a special packet, please see the next section
Hilscher, 2006-2013
282/336
Packet Description
structure PROFIBUS_DL_PACKET_DLSAP_ACTIVATE_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x121
PROFIBUS_DL_CMD_DLSAP_ACTIVATE_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_DL_DLSAP_ACTIVATE_CNF_T
bSrcSAPIdx
UINT8
0-63, 64
bAcc
UINT8
0-126, 255
Hilscher, 2006-2013
283/336
Hilscher, 2006-2013
284/336
Packet Description
structure PROFIBUS_DL_PACKET_DLSAP_ACTIVATE_RESPONDER_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x122
PROFIBUS_DL_CMD_DLSAP_ACTIVATE_RESPONDER_REQ Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_DLSAP_ACTIVATE_RESPONDER_REQ_T
bSrcSAPIdx
UINT8
0-63,
64 (=NIL SAP)
bAcc
UINT8
0-126,255
bParallelServices
UINT8
1-4
bMaxDLSDULenRe
qLow
UINT8
1-246
bMaxDLSDULenRe
qHigh
UINT8
1-246
bMaxDLSDULen
IndLow
UINT8
1-246
bMaxDLSDULen
IndHigh
UINT8
1-246
bIndicationMode
UINT8
0-2
Indication mode
fPublisherEnabled
BOOLEA
N
0,1
Hilscher, 2006-2013
285/336
Additional explanations:
1. The parameter bSrcSAPIdx specifies the local LSAP for the data area and the user that
receives the indication primitive if a SRD is received on this "DSAP". The value can have a
range from 0 to 63 and NIL is represented by 64.
2. The parameter bAcc with the values ALL = 255 or 0 to 126 is used for access protection
and specifies whether all remote stations (all) or only an individual remote station ( 0 to
126) may have access to the LSAP. This parameter is only valid for responder functions,
i.e. bRoleInService = RESPONDER or BOTH.
3. The parameter bParallelServices specifies the upper limit for the number of parallel
services that can be activated at the same time. Up to 4 parallel services are possible.
4. The parameters bMaxDLSDULenReqLow, bMaxDLSDULenReqHigh, bMaxDLSDULenIndLow and
bMaxDLSDULenIndHigh specify the maximum length of the SDU for transparent data transfer
depending on
whether data are sent (in case of a request, bMaxDLSDULenReqYYY) or received (in case of
either a confirmation or an indication, bMaxDLSDULenIndYYY)
Additional rules apply for all of these parameters whether they must be equal to 0 or must not
be equal to 0. These rules can be expressed as tables. For each parameter and role in service
intended to use in conjunction with this parameter there are a few allowed combinations
whether to set the parameter to a zero- or non-zero-value which are represented by columns. If
for a parameter the value 0 can be found it should be set to 0 otherwise (value x) it should be
set to a non-zero value not exceeding 242:
Role in service
Responder or both
bMaxDLSDULenReqLow
bMaxDLSDULenReqHigh
bMaxDLSDULenIndLow
bMaxDLSDULenIndHigh
Hilscher, 2006-2013
286/336
5. The parameter bIndicationMode specifies when to create an indication at the receiver of the
packet. The following table shows the allowed values of the parameter bUpdateStatus and their
meanings:
Name
Value
Meaning
PROFIBUS_DL_INDICATION_MODE_ALL
0x00
PROFIBUS_DL_INDICATION_MODE_DATA
0x01
PROFIBUS_DL_INDICATION_MODE_UNCHANGED
0x02
Table 188: Allowed Values and their Meanings for Variable bUpdateStatus
The parameter fPublisherEnabled specifies the reply update mode, i.e. whether or not
the service using the RSAP may act as publisher or not. The possible values in this context
are TRUE(1) or FALSE.(0). However, this parameter is currently not supported.
Hilscher, 2006-2013
287/336
Packet Description
structure PROFIBUS_DL_PACKET_DLSAP_ACTIVATE_RESPONDER_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x123
PROFIBUS_DL_CMD_DLSAP_ACTIVATE_RESPONDER_CNF Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_DL_DLSAP_ACTIVATE_RESPONDER_CNF_T
bSrcSAPIdx
UINT8
0-63.
64 = NIL SAP
bAcc
UINT8
0-126,255
Hilscher, 2006-2013
288/336
Only the numerical value assigned with the SAP or the RSAP to be deactivated needs to be
specified.
Packet Structure Reference
/* Request-Packet for SAP deactivation */
typedef struct PROFIBUS_DL_DLSAP_DEACTIVATE_REQ_Ttag {
TLR_UINT8 bSrcSAPIdx; /* Source Service Access Point to be activated */
} PROFIBUS_DL_DLSAP_DEACTIVATE_REQ_T;
typedef struct PROFIBUS_DL_PACKET_DLSAP_DEACTIVATE_REQ_Ttag {
TLR_PACKET_HEADER_T tHead;
PROFIBUS_DL_DLSAP_DEACTIVATE_REQ_T tData;
} PROFIBUS_DL_PACKET_DLSAP_DEACTIVATE_REQ_T;
Packet Description
structure PROFIBUS_DL_PACKET_DLSAP_DEACTIVATE_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x128
PROFIBUS_DL_CMD_DLSAP_DEACTIVATE_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_DLSAP_DEACTIVATE_REQ_T
bSrcSAPIdx
UINT8
0-63, 64
Hilscher, 2006-2013
289/336
Packet Description
structure PROFIBUS_DL_PACKET_DLSAP_DEACTIVATE_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x129
PROFIBUS_DL_CMD_DLSAP_DEACTIVATE_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_DL_DLSAP_DEACTIVATE_CNF_T
bSrcSAPIdx
UINT8
0-63, 64
Hilscher, 2006-2013
290/336
Application
Register
described in section 6.1.1 of this document.
Note: The former parameter bAlarm_Max is no longer supported. It has been replaced
by the new parameter bMasterSetting.
Hilscher, 2006-2013
291/336
Packet Description
structure PROFIBUS_DL_PACKET_SET_BUS_PARAMETER_SET_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
PB_DL_QUE
ulSrc
UINT32
32
0 ... 2 -1
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
>=19
0 ... 2 -1
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x126
PROFIBUS_DL_CMD_SET_BUS_PARAMETER_SET_REQ Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_DL_BUS_PARAMETER_SET_T
usBus_Para_Len
UINT16
UINT8
0-126
bData_rate
UINT8
usTSL
UINT16
Slot-time
usMin_TSDR
UINT16
usMax_TSDR
UINT16
bTQUI
UINT8
Quiet time
bTSET
UINT8
Setup time
ulTTR
UINT32
bG
UINT8
1-100
bHSA
UINT8
0-126
bMax_Retry_Limit
UINT8
1-15
bBp_Flag
UINT8
Bp flag
usMin_Slave_Interv
al
UINT16
usPoll_Timeout
UINT16
usData_Control_Tim UINT16
e
bMasterSetting
UINT8
Master Setting
Hilscher, 2006-2013
292/336
0: Big Endian/Motorola format
1: Little Endian/Intel format
bMax_User_Global_ UINT8
Control
abReserved
UINT8[4]
4 reserved Octets
usMaster_User_Dat
a_Len
UINT16
abMaster_Class2_N UINT8[32]
ame[32]
abMaster_User_Dat
a[32];
UINT8[32]
ulTCL
UINT32
bMax_TSH
UINT8
Hilscher, 2006-2013
293/336
Packet Description
structure PROFIBUS_DL_PACKET_SET_VALUE_BUS_PARAMETER_SET_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
103
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x127
PROFIBUS_DL_CMD_SET_VALUE_BUS_PARAMETER_SET_CNF
- Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_BUS_PARAMETER_SET_T
usBus_Para_Len
UINT16
Hilscher, 2006-2013
294/336
bDL_Add
UINT8
bData_rate
UINT8
usTSL
UINT16
slot-time
usMin_TSDR
UINT16
usMax_TSDR
UINT16
bTQUI
UINT8
quiet time
bTSET
UINT8
setup time
ulTTR
UINT32
bG
UINT8
bHSA
UINT8
bMax_Retry_Limit
UINT8
bBp_Flag
UINT8
usMin_Slave_Interv
al
UINT16
usPoll_Timeout
UINT16
usData_Control_Tim UINT16
e
bAlarm_Max
Maximum Alarms
UINT8
bMax_User_Global_ UINT8
Control
abReserved
UINT8[4]
4 reserved Octets
usMaster_User_Dat
a_Len
UINT16
abMaster_Class2_N UINT8[32]
ame[32]
abMaster_User_Dat
a[32];
UINT8[32]
ulTCL
UINT32
bMax_TSH
UINT8
Hilscher, 2006-2013
295/336
minTSDR
Indicates the smallest station delay response time. See section 4.2.3.5 Min TSDR for
detailed information. Allowed values range from 1 to 65535 ( = 216-1).
2. Own Address
o
DL_ADDR
Indicates the own address of the PROFIBUS DP master that can be changed only by
this method. Allowed values range from 0 to 126.
Note: Use this packet only when working with linkable object modules. It has not
been designed for usage in the context of loadable firmware.
Hilscher, 2006-2013
296/336
Packet Description
structure PROFIBUS_DL_PACKET_SET_VALUE_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
PB_DL_QUE
ulSrc
UINT32
32
0 ... 2 -1
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
0 ... 232-1
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x12A
PROFIBUS_DL_CMD_SET_VALUE_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_SET_VALUE_REQ_T
bVlu
UINT8
0,1
Value to be set:
0: MINTDSR
1: DLADDR
un
UINT16
165535
UINT8
0126
Hilscher, 2006-2013
297/336
Packet Description
structure PROFIBUS_DL_PACKET_SET_VALUE_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
ulId
UINT32
0 ... 232-1
ulSta
UINT32
ulCmd
UINT32
0x12B
PROFIBUS_DL_CMD_SET_VALUE_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
Hilscher, 2006-2013
298/336
Packet Description
structure PROFIBUS_DL_PACKET_SEND_FDL_STATUS_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
Source Queue-Handle
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x132
PROFIBUS_DL_CMD_SEND_FDL_STATUS_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_SEND_FDL_STATUS_REQ_T
bDstAddr
UINT8
Hilscher, 2006-2013
299/336
Packet Description
structure PROFIBUS_DL_PACKET_SEND_FDL_STATUS_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
Destination Queue-Handle
ulSrc
UINT32
Source Queue-Handle
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x133
PROFIBUS_DL_CMD_SEND_FDL_STATUS_CNF - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_SEND_FDL_STATUS_CNF_T
bStatus
UINT8
Hilscher, 2006-2013
300/336
If there is either no active station present at this station address or if there is a PROFIBUS
Slave at this station address, the corresponding array element will contain the value 255
(0xFF).
If there is a PROFIBUS DP Master at this station address, the corresponding array element
will contain the FDL address of the PROFIBUS Master to which this Master will pass the
token next.
Note: A valid station address is defined in PROFIBUS to be a value in the range
between 0 and 126 (including both limiting values).
The request packet does not have any parameters. The confirmation packet has one parameter,
the returned array abLms[128] containing the list of master stations.
Packet Structure Reference
/* Get List of active stations */
typedef struct PROFIBUS_DL_PACKET_GET_LMS_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead;
}
PROFIBUS_DL_PACKET_GET_LMS_REQ_T;
#define PROFIBUS_DL_GET_LMS_REQ_SIZE (0)
Hilscher, 2006-2013
301/336
Packet Description
Type: Request
structure PROFIBUS_DL_PACKET_GET_LMS_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x0134
PROFIBUS_DL_CMD_GET_LMS_REQ - Command
ulExt
UINT32
ulRout
UINT32
Hilscher, 2006-2013
302/336
Packet Description
Type: Confirmation
structure PROFIBUS_DL_PACKET_GET_LMS_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
128
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x0135
PROFIBUS_DL_CMD_GET_LMS_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure PROFIBUS_DL_GET_LMS_CNF_T
abLms[128]
UINT8[]
0126,255
Hilscher, 2006-2013
303/336
Hilscher, 2006-2013
304/336
Packet Description
structure PROFIBUS_DL_PACKET_REGISTER_LMS_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x0136
PROFIBUS_DL_CMD_REGISTER_LMS_REQ - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_REGISTER_LMS_REQ_T
bEnable
BOOLEA
N8
0,1
Value to be set
0: Indications are switched off
1: Indications are switched on
Hilscher, 2006-2013
305/336
Packet Description
structure PROFIBUS_DL_PACKET_REGISTER_LMS_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x0137
PROFIBUS_DL_CMD_REGISTER_LMS_CNF- Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
Hilscher, 2006-2013
306/336
Hilscher, 2006-2013
307/336
Packet Description
structure PROFIBUS_DL_PACKET_LMS_CHANGED_IND_T
Variable
Type
Value / Range
Type: Indication
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
128
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x0138
PROFIBUS_DL_CMD_LMS_CHANGED_IND - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_DATA_REPLY_REQ_T
abLms[128]
UINT8[]
0126,255
Hilscher, 2006-2013
308/336
Symbolic name
Meaning
PROFIBUS_DL_STATION_TYPE_NOT_EXISTANT
PROFIBUS_DL_STATION_TYPE_PASSIVE
PROFIBUS_DL_STATION_TYPE_READY_NO_TOKEN
PROFIBUS_DL_STATION_TYPE_ACTIVE
Active station
Hilscher, 2006-2013
309/336
Packet Description
Type: Request
structure PROFIBUS_FSPMM_PACKET_INIT_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
Destination Queue-Handle
ulSrc
UINT32
Source Queue-Handle
ulDestId
UINT32
ulDL0Id
ulSrcId
UINT32
ulAPMS0Id
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x0130
PROFIBUS_DL_CMD_GET_LL_REQ - Command
ulExt
UINT32
ulRout
UINT32
Hilscher, 2006-2013
310/336
Packet Description
Type: Confirmation
structure PROFIBUS_DL_PACKET_GET_LL_CNF_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
Destination Queue-Handle
ulSrc
UINT32
Source Queue-Handle
ulDestId
UINT32
ulAPM0Id
ulSrcId
UINT32
ulDL0Id
ulLen
UINT32
128
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x0131
PROFIBUS_DL_CMD_GET_LL_CNF - Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_DL_GET_LL_CNF_T
abLL[128]
UINT8[]
0..3
Hilscher, 2006-2013
311/336
To get the handle of the process queue of the APM -Task the Macro TLR_QUE_IDENTIFY() has
to be used in conjunction with the following ASCII-queue name
Description
"APM_QUE
The diagnostic and error messages which can be issued by the APM-Task are described in section
7.4 of this document.
In detail, the following functionality is provided by the APM -Task:
Overview over Packets of the APM-Task
No. of
section
Packet
Command
code
(REQ/CNF
or
IND/RES)
Page
6.4.1
0x3000/
0x3001
312
6.4.2
0x3002
315
Table 207: Overview over the Packets of the APM-Task of the PROFIBUS DP Protocol Stack
Hilscher, 2006-2013
312/336
Hilscher, 2006-2013
313/336
Packet Description
structure PROFIBUS_APM_PACKET_REDUNDANT_MODE_REQ_T
Variable
Type
Value / Range
Type: Request
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/ APM_QUE
32
ulSrc
UINT32
0 ... 2 -1
ulDestId
UINT32
ulSrcId
UINT32
Freely eligible
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x3000
PROFIBUS_APM_CMD_REDUNDANT_MODE_REQ Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_APM_REDUNDANT_MODE_REQ_T
bRedundantAddr
bOption
UINT8
UINT8
0...126
255
Bit 0: 0 = active
1 = passive
Bit 1: : 0 = PNO
Mode
1 = Hilscher
Mode
Hilscher, 2006-2013
314/336
Packet Description
structure PROFIBUS_APM_PACKET_REDUNDANT_MODE_CNF_T
Variable
Type
Value / Range
Type: Confirmation
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
Value of
preceding request
packet is returned
ulSrcId
UINT32
Value of
preceding request
packet is returned
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x3001
PROFIBUS_APM_CMD_REDUNDANT_MODE_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
Hilscher, 2006-2013
315/336
Packet Description
structure PROFIBUS_APM_PACKET_REDUNDANT_MODE_IND_T
Variable
Type
Value / Range
Type: Indication
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
0x20/ APM_QUE
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
Value of preceding
request packet is
returned
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x3002
PROFIBUS_APM_CMD_REDUNDANT_MODE_IND Command
ulExt
UINT32
ulRout
UINT32
structure PROFIBUS_APM_REDUNDANT_MODE_IND_T
fActiveMasterExist
UINT8
TRUE
FALSE
Hilscher, 2006-2013
316/336
Packet
Command
code
(REQ/CNF
or
IND/RES)
Page
6.5.1
0x2F82/
317
0x2F83
6.5.2
0x2F84/
320
0x2F85
Table 211: Overview over Packets required for Configuration on the run
Hilscher, 2006-2013
317/336
/* packet header */
Packet Description
Type: Request
structure RCX_VERIFY_DATABASE_REQ_T
Variable
Type
Value / Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
0 ... 232-1
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
0 ... 2 -1
UINT32
0x2F82
RCX_VERIFY_DATABASE_REQ - Command
ulExt
UINT32
ulRout
UINT32
Hilscher, 2006-2013
318/336
typedef RCX_VERIFY_DATABASE_CNF_Ttag
{
TLR_PACKET_HEADER_T
RCX_VERIFY_DATABASE_CNF_DATA_T
} RCX_VERIFY_DATABASE_CNF_T;
tHead;
tData;
/* packet header */
/* packet data */
Hilscher, 2006-2013
319/336
Packet Description
Type: Confirmation
structure RCX_VERIFY_DATABASE_CNF_T
Variable
Type
Value /
Range
Description
structure TLR_PACKET_HEADER_T
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
0 ... 2 -1
UINT32
0x2F83
RCX_VERIFY_DATABASE_CNF - Command
ulExt
UINT32
Extension, unchanged
ulRout
UINT32
structure RCX_VERIFY_DATABASE_CNF_DATA_T
tNewSlaves
STRUCT
tDeactivatedSlaves
STRUCT
tChangedSlaves
STRUCT
tUnchangedSlaves
STRUCT
tImpossibleSlaveCh
anges
STRUCT
Hilscher, 2006-2013
320/336
Packet Description
structure RCX_ACTIVATE_DATABASE_REQ
Type: Request
Area
Variable
Type
Value / Range
Description
ulSrc
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32 0
ulId
UINT32 0 ... 2 -1
ulSta
UINT32 0
ulCmd
UINT32 0x2F84
RCX_ACTIVATE_DATABASE_REQ - Command
ulExt
UINT32 0
ulRout
UINT32 x
Hilscher, 2006-2013
321/336
/* packet header */
/* packet data */
Packet Description
structure RCX_ACTIVATE_DATABASE_CNF
Type: Request
Area
Variable
Type
Value /
Range
Description
tData
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x2F85
RCX_ACTIVATE_DATABASE_CNF - Command
ulExt
UINT32
ulRout
UINT32
structure
abSlvSt[16]
UINT8
Hilscher, 2006-2013
322/336
Definition
Description
0x00000000
TLR_S_OK
Status ok
0xC0000001
TLR_E_FAIL
Common error, detailed error information optionally present in the data area of packet
0xC0000007
TLR_E_INVALID_PACKET_LEN
Invalid packet length.
0xC000001A
TLR_E_REQUEST_RUNNING
0xC0000101
TLR_E_DATABASE_ACCESS_FAILED
TLR_E_CIR_MASTER_PARAMETER_FAILED
Parameters of the master were changed, which is not allowed.
0xC0000103
TLR_E_CIR_SLAVE_PARAMETER_FAILED
Result of the verification: One or more slave parameter set have an error.
0xC0380002
TLR_E_PROFIBUS_FSPMM_INV_BUSMODE
Invalid bus mode for this command.
0xC0380003
TLR_E_PROFIBUS_FSPMM_RESET
FSPMM task is reset.
0xC0380004
TLR_E_PROFIBUS_FSPMM_ACLR
PROFIBUS Master is at auto clear state.
0xC0380005
TLR_E_PROFIBUS_FSPMM_CONTROL_TIMER_EXPIRED
Data Control Timer expired. No bus access for sending global control.
0xC0380006
TLR_E_PROFIBUS_FSPMM_ALARM_OVERFLOW
Alarm buffer overflow.
0xC0380007
TLR_E_PROFIBUS_FSPMM_ALARM_NOT_INIT
Alarm handler is not initialized.
0xC0380008
TLR_E_PROFIBUS_FSPMM_ALARM_NOT_STARTED
Alarm handler is not started.
0xC0380009
TLR_E_PROFIBUS_FSPMM_ALARM_NOT_ENABLED
Alarms are disabled.
0xC038000A
TLR_E_PROFIBUS_FSPMM_ALARM_NOT_PENDING
Alarm is not at a pending state.
0xC038000B
TLR_E_PROFIBUS_FSPMM_ALARM_STATE_ERROR
Invalid Alarm state.
0xC038000C
TLR_E_PROFIBUS_FSPMM_ALARM_SEQ_ERROR
Alarm sequence error occurred.
0xC038000D
TLR_E_PROFIBUS_FSPMM_MSAC1_STATE_ERROR
Alarm handler is not at the proper state.
0xC038000E
TLR_E_PROFIBUS_FSPMM_MSAC1_FAULT
Get an alarm acknowledge without an alarm.
0xC038000F
TLR_E_PROFIBUS_FSPMM_INVALID_AREA_CODE
Invalid area code or slave address received.
Hilscher, 2006-2013
323/336
Definition
Description
0xC0380012
TLR_E_PROFIBUS_FSPMM_IV_BUS_PRM
Invalid bus parameter received.
0xC0380013
TLR_E_PROFIBUS_FSPMM_IV_SLAVE_PRM
Invalid slave parameter received.
0xC0380014
TLR_E_PROFIBUS_FSPMM_ACK_NO
Command cannot be executed at the actual bus state.
0xC0380015
TLR_E_PROFIBUS_FSPMM_ACK_GE
Error while sending global control.
0xC0380016
TLR_E_PROFIBUS_FSPMM_MSAL1_FAULT
Failure at alarm handler. Alarm handler is stopped.
0xC0380017
TLR_E_PROFIBUS_FSPMM_MSAC2_FAULT
Failure at MSAC2 handler.
0xC0380018
TLR_E_PROFIBUS_FSPMM_REJ_SE
Device is stopping the communication or not in OPEN state.
0xC0380019
TLR_E_PROFIBUS_FSPMM_REJ_PS
A previous service is still in process.
0xC038001A
TLR_E_PROFIBUS_FSPMM_REJ_LE
Message has an invalid length.
0xC038001B
TLR_E_PROFIBUS_FSPMM_REJ_IV
Invalid parameter at request.
0xC038001C
TLR_E_PROFIBUS_FSPMM_REJ_ABORT
Device aborts DP V1 communication.
0xC038001D
TLR_E_PROFIBUS_FSPMM_INVALID_SLAVE_ADDRESS
Invalid slave address.
0xC038001E
TLR_E_PROFIBUS_FSPMM_ALREADY_INITIALZED
FSPMM Already initialized.
0xC038001F
TLR_E_PROFIBUS_FSPMM_INVALID_APPLICATION
Command from not registered application.
0xC0380020
TLR_E_PROFIBUS_FSPMM_DMPMM_IV_STATE
Command not allowed in current state.
0xC0380021
TLR_E_PROFIBUS_FSPMM_PB_FLAG_ERROR_ACTION_FLAG
Function 'AUTO CLEAR' not supported.
0xC0380022
TLR_E_PROFIBUS_FSPMM_PB_FLAG_ISO_MODE_MSK
Function 'ISO_MODE' not supported.
0xC0380023
TLR_E_PROFIBUS_FSPMM_DL_PB_FLAG_ISOM_SYNC
Function 'ISO_MODE_SYNC' not supported.
0xC0380024
TLR_E_PROFIBUS_FSPMM_DL_PB_FLAG_ISOM_FREEZE
Function 'ISO_MODE_FREEZE' not supported.
0xC0380025
TLR_E_PROFIBUS_FSPMM_MSAC1_NRS
Negative response received.
0xC0380026
TLR_E_PROFIBUS_FSPMM_MSALM_ALARM_ACK_NEG
Negative alarm acknowledge response received.
Hilscher, 2006-2013
324/336
Definition
Description
0xC0380001L
0xC0380002L
TLR_DIAG_E_PROFIBUS_FSPMM_DMPMM_BUS_PARAMETER_REJECTED
Command for setting the bus parameter is rejected.
0xC0380003L
TLR_DIAG_E_PROFIBUS_FSPMM_DMPMM_SSAP_ACTIVATE_FAIL
Activating the source SAP failed.
0xC0380004L
TLR_DIAG_E_PROFIBUS_FSPMM_DMPMM_STATE_ERROR
DMPMM state machine is at an invalid state.
0xC0380005L
TLR_DIAG_E_PROFIBUS_FSPMM_FSPMM_STATE_ERROR
FSPMM state machine is at an invalid state.
0xC0380006L
TLR_DIAG_E_PROFIBUS_FSPMM_MSCY1M_STATE_ERROR
MSCY1M state machine is at an invalid state.
0xC0380007L
TLR_DIAG_E_PROFIBUS_FSPMM_DMPMM_SSAP_ACTIVATE_RESPONDER_FAIL
Activate RSAP failed.
0xC0380008L
TLR_DIAG_E_PROFIBUS_FSPMM_DMPMM_NO_GLBCNTRL_PACKET
Getting a packet from the pool to send global control failed.
0xC0380009L
TLR_DIAG_E_PROFIBUS_FSPMM_NOT_SUPPORTED
Function is not supported at the current version of the stack.
0xC038000AL
TLR_DIAG_E_PROFIBUS_FSPMM_NO_DATABASE
No database found.
0xC038000BL
TLR_DIAG_E_PROFIBUS_FSPMM_INVALID_DATABASE
Getting a packet from the pool to initialize the Master state machine failed.
0xC038000CL
TLR_DIAG_E_PROFIBUS_FSPMM_UNKNOWN_TELEGRAM
Telegram with an unknown SAP was received.
0xC038000EL
TLR_DIAG_E_PROFIBUS_FSPMM_UNKNOWN_DPV1_CMD
Answer of an invalid DP V1 service received.
0xC0380010L
TLR_DIAG_E_PROFIBUS_FSPMM_TASK_PRM_VERSION_INVALID
Invalid version of Task Parameters.
Hilscher, 2006-2013
325/336
Definition
Description
0x00000000
TLR_S_OK
Status ok
0xC0000001
TLR_E_FAIL
Common error, detailed error information optionally present in the data area of packet
0xC0690001L
TLR_E_PROFIBUS_FSPMM2_LENGTH_INVALID
Invalid data length.
0xC0690002L
TLR_E_PROFIBUS_FSPMM2_NOT_IMPLEMENTED
Service not implemented.
0xC0690003L
TLR_E_PROFIBUS_FSPMM2_ADD_INVALID
Invalid address.
0xC0690004L
TLR_E_PROFIBUS_FSPMM2_SERVICE_IN_REQUEST
Previous service already in request.
0xC0690005L
TLR_E_PROFIBUS_FSPMM2_NOT_IN_OPEN_STATE
Connection is not in state open.
0xC0690006L
TLR_E_PROFIBUS_FSPMM2_OUT_OF_RESOURCES
Out of resources for new connections.
0xC0690007L
TLR_E_PROFIBUS_FSPMM2_IN_USE
Connection to this slave already in use.
0xC0690008L
TLR_E_PROFIBUS_FSPMM2_ALREADY_INIT
Stack is already initialized.
0xC0690009L
TLR_E_PROFIBUS_FSPMM2_COM_REFERENCE_INVALID
Invalid communication reference.
0xC069000AL
TLR_E_PROFIBUS_FSPMM2_TIMEOUT
Timeout error.
0xC069000BL
TLR_E_PROFIBUS_FSPMM2_INITIATE_ABT_STO
Parameter Send Timeout to small.
0xC069000CL
TLR_E_PROFIBUS_FSPMM2_INITIATE_ABT_FE
Telegram format error.
0xC069000DL
TLR_E_PROFIBUS_FSPMM2_NRS
Negative response.
0xC069000EL
TLR_E_PROFIBUS_FSPMM2_ABORT
Service Aborted.
0xC0690100L
TLR_E_PROFIBUS_FSPMM2_CON_XX
Service confirmation negative.
Hilscher, 2006-2013
326/336
Definition
Description
TLR_E_PROFIBUS_DL_COMMAND_INVALID
Invalid command received.
0xC0060040L
TLR_E_PROFIBUS_DL_XC_INVALID
The assigned XC-Data Link Layer is not installed or has a pending error.
0xC0060041L
TLR_E_PROFIBUS_DL_BAUDRATE_INVALID
The specified baudrate option is not supported and is out of range.
0xC0060042L
TLR_E_PROFIBUS_DL_GAP_UPDATE_INVALID
The specified GAP update factor option is not supported and is out of range 1-100.
0xC0060043L
TLR_E_PROFIBUS_DL_DL_ADDR_INVALID
The specified local PROFIBUS address option is not supported and is out of range 0-125.
0xC0060044L
TLR_E_PROFIBUS_DL_RETRY_LIMIT
The specified retry limit option is not supported and is zero.
0xC0060045L
TLR_E_PROFIBUS_DL_HSA_INVALID
The specified highest station address option is not supported and is out of range 0-126.
0xC0060046L
TLR_E_PROFIBUS_DL_NO_BUS_PARAMETER_SET
The service cannot be executed, there are no bus parameters specified yet.
0xC0060047L
TLR_E_PROFIBUS_DL_DLE_NOT_RESPONDING
The service has detected a timeout at the connected XC-Data Link Layer entity.
0xC0060048L
TLR_E_PROFIBUS_DL_NO_DL_RESOURCE
There are no further resource blocks available to execute the service within the connected XCData Link Layer entity.
0xC0060049L
TLR_E_PROFIBUS_DL_FATAL_DL_RESOURCE
There are no further resource blocks available to execute the service within the connected XCData Link Layer entity.
0xC0060050L
TLR_E_PROFIBUS_DL_STOPPED
PROFIBUS is stopped command cannot be handled.
0xC0060051L
TLR_E_PROFIBUS_DL_PENDING_PACKET
Previous pending packet is returned. It could not be handled.
0xC0060052L
TLR_E_PROFIBUS_DL_SLAVE_MODE
Command could not be executed, DL-task is running at slave mode.
0xC0060080L
TLR_E_PROFIBUS_DL_ACK_UE
The remote station the service has been sent to indicates a User Error as service
acknowledgement.
0xC0060081L
TLR_E_PROFIBUS_DL_ACK_RR
The remote station the service has been sent to indicates a Resource Error as service
acknowledgement.
0xC0060082L
TLR_E_PROFIBUS_DL_ACK_RS
The remote station the service has been sent to indicates a Service Access Point Error as service
acknowledgement.
0xC0060083L
TLR_E_PROFIBUS_DL_ACK_NR
The remote station the service has been sent to confirms its positive reception but has no data to
confirm.
0xC0060084L
TLR_E_PROFIBUS_DL_ACK_RDH
The remote station the service has been sent to, confirms its reception negatively but has returned
low priority data in the response.
0xC0060085L
TLR_E_PROFIBUS_DL_ACK_RDL
The remote station the service has been sent to, confirms its reception negatively but has returned
Hilscher, 2006-2013
327/336
Definition
Description
high priority data in the response.
0xC0060086L
TLR_E_PROFIBUS_DL_ACK_DH
The remote station the service has been sent to, confirms its reception positively and has returned
low priority data in the response.
0xC0060087L
TLR_E_PROFIBUS_DL_ACK_DL
The remote station the service has been sent to, confirms its reception positively and has returned
high priority data in the response.
0xC0060088L
TLR_E_PROFIBUS_DL_ACK_NA
The remote station the service has been sent to shows no or no plausible reaction at all.
0xC0060089L
TLR_E_PROFIBUS_DL_ACK_UNKNOWN
The remote station the service has been sent has returned an unknown acknowledgement code.
0xC006008AL
TLR_E_PROFIBUS_DL_ACK_LS
The requested service is not activated within the local SAP configuration.
0xC006008BL
TLR_E_PROFIBUS_DL_ACK_LR
The local resources needed to execute the requested service are not available or not sufficient.
0xC006008CL
TLR_E_PROFIBUS_DL_ACK_DS
The local data link layer is not in the logical token ring or disconnected from the network.
0xC006008DL
TLR_E_PROFIBUS_DL_ACK_IV
Invalid parameter detected in the requested service.
0xC006008EL
TLR_E_PROFIBUS_DL_ACK_NO
The local SAP is not activated because it has been activated already or resources are not
sufficient.
0xC006008FL
TLR_E_PROFIBUS_DL_ACK_NO_SET
The variable to be set does not exist.
0xC0060090L
TLR_E_PROFIBUS_DL_ACK_RE
Format error of the telegram.
0xC0060091L
TLR_E_PROFIBUS_DL_TSET_INVALID
The specified parameter TSET is out of range 1-255.
Hilscher, 2006-2013
328/336
Definition
Description
0xC0060001L
TLR_DIAG_E_PROFIBUS_DL_DATA_ACK_RES
Invalid "Data Ack (SDA)" response packet received. Response does not match to internally
reserved communication block
0xC0060002L
TLR_DIAG_E_PROFIBUS_DL_DATA_RES
Invalid "Data (SDN)" response packet received. Response does not match to internally
reserved communication block
0xC0060003L
TLR_DIAG_E_PROFIBUS_DL_DATA_REPLY_RES
Invalid "Data Reply (SRD)" response packet received. Response does not match to internally
reserved communication block
Hilscher, 2006-2013
329/336
Definition
Description
0xC0390001L
TLR_E_PROFIBUS_APM_COMMAND_INVALID
Invalid command received.
0xC0390002L
TLR_E_PROFIBUS_APM_COMMAND_ALREADY_IN_RQUEST
Command already in request.
0xC0390003L
TLR_E_PROFIBUS_APM_TIO_RESET_W_MODE_STOP
0xC0390004L
TLR_E_PROFIBUS_APM_TIO_RESET_W_INIT_FSPMM
TLR_E_PROFIBUS_APM_NON_EXCHANGE_SLAVE
No data exchange with at least one slave.
0xC0390006L
TLR_E_PROFIBUS_APM_NON_EXCHANGE_ALL
No slave in data exchange.
0xC0390007L
TLR_E_PROFIBUS_APM_CONFIG_LOCK
Configuration locked.
0xC0390008L
TLR_E_PROFIBUS_APM_CONFIG_VIA_DBM
Already configured via data base.
0xC0390009L
TLR_E_PROFIBUS_APM_ALREADY_CONFIGURED
Already configured.
0xC039000AL
TLR_E_PROFIBUS_APM_CHANNEL_INIT_IN_PROGRESS
Channel initialization in progress.
0xC039000BL
TLR_E_PROFIBUS_APM_CHANNEL_INIT_FAILED
Channel initialization failed.
Hilscher, 2006-2013
330/336
Definition
Description
0xC0390032L
TLR_DIAG_E_PROFIBUS_APM_NO_FSPMM
No FSPMM-Task or -queue found to communicate.
0xC039003AL
TLR_DIAG_E_PROFIBUS_ADR_DOUBLE
Double station address detected.
0xC039003BL
TLR_DIAG_E_PROFIBUS_MAX_OUTPUT_OFFSET
Maximum output offset reached.
0xC039003CL
TLR_DIAG_E_PROFIBUS_MAX_INPUT_OFFSET
Maximum input offset reached
0xC039003DL
TLR_DIAG_E_PROFIBUS_OUTPUT_OVERLAP
Overlap in output data.
0xC039003EL
TLR_DIAG_E_PROFIBUS_INPUT_OVERLAP
Overlap in input data.
0xC03900DEL
TLR_DIAG_E_PROFIBUS_APM_AUTOCLEAR_ERROR
Auto-clear activated.
0xC03900E1L
TLR_DIAG_E_PROFIBUS_APM_OUT_OF_PACKET
No packet left to communicate.
0xC0390100L
TLR_DIAG_E_PROFIBUS_APM_NO_INIT_PACKET
Getting a packet from the pool to initialize the Master state machine failed.
0xC0390101L
TLR_DIAG_E_PROFIBUS_APM_NO_SET_MODE_PACKET
Getting a packet from the pool to set the Master mode failed.
0xC0390102L
TLR_DIAG_E_PROFIBUS_APM_NO_SET_OUTPUT_PACKET
Getting a packet from the pool to set output date fail.
0xC0390103L
TLR_DIAG_E_PROFIBUS_APM_NO_GET_INPUT_PACKET
Getting a packet from the pool to request input data failed.
0xC0390104L
TLR_DIAG_E_PROFIBUS_APM_GET_INPUT_FAIL
Getting input data fail.
0xC0390105L
TLR_DIAG_E_PROFIBUS_APM_SET_OUTPUT_FAIL
Write Slave output data failed.
Hilscher, 2006-2013
Appendix
331/336
8 Appendix
8.1 List of Figures
Figure 1: The 3 different Ways to access a Protocol Stack running on a netX System..................................................... 13
Figure 2: Use of ulDest in Channel and System Mailbox................................................................................................ 16
Figure 3: Using ulSrc and ulSrcId ............................................................................................................................... 17
Figure 4: Transition Chart Application as Client ................................................................................................................ 21
Figure 5: Transition Chart Application as Server............................................................................................................... 22
Figure 6: Arrangement of Input and Output Data .............................................................................................................. 65
Figure 7: Internal Structure of PROFIBUS DP-Master Firmware ...................................................................................... 66
Figure 8: PROFIBUS in the OSI/ISO Layer Model ............................................................................................................ 70
Figure 9: Initialization Sequence of DP V1 Class 2-Connection........................................................................................ 90
Figure 10: SDA Service with Acknowledgement ............................................................................................................... 94
Figure 11: Service Access Points...................................................................................................................................... 97
Figure 12: Configuration during Network State OPERATE ............................................................................................. 102
Figure 13: Redundancy Functionality Host Application ................................................................................................ 104
Hilscher, 2006-2013
Appendix
332/336
Hilscher, 2006-2013
Appendix
333/336
Hilscher, 2006-2013
Appendix
334/336
Hilscher, 2006-2013
Appendix
335/336
Hilscher, 2006-2013
Contacts
336/336
9 Contacts
Headquarters
Germany
Hilscher Gesellschaft fr
Systemautomation mbH
Rheinstrasse 15
65795 Hattersheim
Phone: +49 (0) 6190 9907-0
Fax: +49 (0) 6190 9907-50
E-Mail: info@hilscher.com
Support
Phone: +49 (0) 6190 9907-99
E-Mail: de.support@hilscher.com
Subsidiaries
China
Hilscher Systemautomation (Shanghai) Co. Ltd.
200010 Shanghai
Phone: +86 (0) 21-6355-5161
E-Mail: info@hilscher.cn
Support
Phone: +86 (0) 21-6355-5161
E-Mail: cn.support@hilscher.com
Japan
Hilscher Japan KK
Tokyo, 160-0022
Phone: +81 (0) 3-5362-0521
E-Mail: info@hilscher.jp
Support
Phone: +81 (0) 3-5362-0521
E-Mail: jp.support@hilscher.com
France
Hilscher France S.a.r.l.
69500 Bron
Phone: +33 (0) 4 72 37 98 40
E-Mail: info@hilscher.fr
Support
Phone: +33 (0) 4 72 37 98 40
E-Mail: fr.support@hilscher.com
Korea
Hilscher Korea Inc.
Seongnam, Gyeonggi, 463-400
Phone: +82 (0) 31-789-3715
E-Mail: info@hilscher.kr
India
Hilscher India Pvt. Ltd.
New Delhi - 110 065
Phone: +91 11 26915430
E-Mail: info@hilscher.in
Switzerland
Hilscher Swiss GmbH
4500 Solothurn
Phone: +41 (0) 32 623 6633
E-Mail: info@hilscher.ch
Support
Phone: +49 (0) 6190 9907-99
E-Mail: ch.support@hilscher.com
Italy
Hilscher Italia S.r.l.
20090 Vimodrone (MI)
Phone: +39 02 25007068
E-Mail: info@hilscher.it
Support
Phone: +39 02 25007068
E-Mail: it.support@hilscher.com
USA
Hilscher North America, Inc.
Lisle, IL 60532
Phone: +1 630-505-5301
E-Mail: info@hilscher.us
Support
Phone: +1 630-505-5301
E-Mail: us.support@hilscher.com
Hilscher, 2006-2013