Messages
Section 6-4
77
Example
An example of the use of the IORD instruction is shown below.
IR 112.13
IORD (-)
#0000
114
DM0000
255.06
EQ_FLAG
ERROR
In the example above the Unit number setting is assumed to be ‘1’.
The IORD instruction is only executed when the ‘Reply in input mailbox’ flag is
set. IR 114 contains the correct source information. The IORD instruction
transfers the oldest reply from the Input mailbox to the PLC, starting at
DM0000.
The ERROR output bit is set when the IORD transfer was not successful.
This could be because of a syntax error in the IORD instruction or because
there was no reply in the Input mailbox anymore.
6-4
Messages
Fixed format
Messages to be sent to the Output mailbox and received from the Input
mailbox have a fixed format. The command and the response are according
the following format.
Type
Size
(words)
Description
Message header
4
Defines the sender, receiver, command type and
the total length of the telegram. It is also possible to
give a unique number to each message.
Telegram header
0 ~ 4
Detailed definition of the command message
Telegram data
0 ~ 124
Message data
Max. length
Command types
The overall length of the message is limited to 128 words (limitation of the
IOWR / IORD instruction). Every message has a message header, but not all
messages have a telegram header or telegram data. In messages without a
telegram header, the length of the telegram data can be up to 124 words.
With a telegram header, the length can only be up to 120 words.
The two types of command message presently supported are:
1.
Control command
2.
Slave diagnostics
These commands are described in more detail in the next two sub-sections.
Summary of Contents for C200HW-PRM21
Page 1: ...C200HW PRM21 PROFIBUS DP Master Unit OPERATION MANUAL Cat No W349 E2 2...
Page 2: ......
Page 3: ......
Page 4: ......
Page 5: ...C200HW PRM21 PROFIBUS DP Master Unit Operation Manual Produced May 2000...
Page 6: ...iv...
Page 8: ...vi...
Page 12: ...x...
Page 66: ...Debug mode Section 4 4 50...
Page 98: ...Messages Section 6 4 82...
Page 108: ...Maintenance Section 7 3 92...
Page 110: ...94...
Page 112: ...96...
Page 116: ...100...
Page 120: ...104...
Page 124: ......