Using the PROFIBUS-DP Message Mode

Message Mode is one of two modes that can be used with the RMC PROFIBUS-DP module. The other mode is called Compact Mode, which is described in Using the PROFIBUS-DP Compact Mode. Be sure to read both topics and consider each carefully before choosing the mode you will use.

 

Message Mode is so called because it imposes a messaging type interface on PROFIBUS-DP. That is, PROFIBUS-DP only supports cyclic data transfer between a master and a slave. However, the RMC has nearly 64K registers, all of which cannot possibly be sent over PROFIBUS every PROFIBUS scan. Therefore, blocks of these registers can be written to and read from the RMC by using a messaging mechanism: the request is placed in one block of registers, and a response is received in the other block of registers.

In addition to the Command and Response blocks of data, there is also a third block of data—the Status Block—that includes status information that is constantly available. A summary of the Message Mode register blocks follows:

Note: Users of Compact Mode should be aware that commands issued over Message Mode are always handled. Specifically this means that if you send a command multiple times it will be processed every time it is received. Under Compact Mode duplicate commands are ignored. This means that Compact Mode users who want to re-issue a command (for example, an ’E’ command to start an event sequence) need to toggle the case of the command (for example, toggle between ’E’ and ’e’).

 

 

Therefore, Message Mode requires 96 input words and 64 output words on the PROFIBUS master. Not all PROFIBUS masters support this; if your master does not support this many registers, you will need to use Compact Mode.

Messaging in Greater Detail

The Command Block has the following structure:

Register

Description

0-58

Write Data

59

Write address (0-65,535). See the RMC Register Map (PROFIBUS-DP Message Mode) topic for a description of all RMC registers and their addresses.

60

Write length (in words; 0-59)

61

Read address (0-65,535). See the RMC Register Map (PROFIBUS-DP Message Mode) topic for a description of all RMC registers and their addresses.

62

Read length (in words; 0-63)

63

Output Synchronization Register:

Bit 15 - Read Request 

Bit 14 - Write Request 

 

The Response Block has the following structure:

Register

Description

0-62

Read Data

63

Input Synchronization Register

Bit 15 - Read Acknowledge 

Bit 14 - Write Acknowledge 

 

To request a read from the RMC, use the following steps:

 

To request a write to the RMC, use the following steps:

 

The RMC processes reads and writes separately. That is, it is not necessary for a write to complete before starting a read, and in fact, you can simultaneously request both a read and a write; the write to the RMC will occur first, and the read from the RMC will occur after the write has completed. When both are done, both acknowledge bits will be toggled simultaneously.

 

To further clarify the ordering, keep these basic rules in mind in Message Mode:

Using Splines with PROFIBUS

Wait bit 7 is used by the Profibus DP communications so the user can tell when spline downloads are finished. The Profibus DP spline processing routine sets wait bit 7 when a download to the spline area is detected. The user can then use the step table and the Check Wait Bits link to be sure the spline is ready before executing the spline.

 


Copyright (c) 1997-2015 by Delta Computer Systems, Inc.