PROFIBUS Mode: Basic+

The Basic+ mode is one of the Basic/Enhanced PROFIBUS Modes available only on the RMC75P. Most users will prefer the I/O Modes instead.

Features

This mode has the following features:

RMC75 Register Addresses for PROFIBUS

When communicating over PROFIBUS, the RMC75 registers addresses use the same file:element addresses as the RMC75 IEC-61131 addresses.

For example, to read the Axis 0 Actual Position via PROFIBUS, notice that its address is %MD8.8. Therefore, the address via PROFIBUS is file 8, element 8.

Parameterization

Basic+ mode requires the PROFIBUS configuration and parameterization listed below. The GSD file does direct the PROFIBUS master setup software to automatically set up these values, but Delta has found several cases where it is not supported correctly or manual setup is otherwise required.

Configuration: FF DF

Parameters:

Prm_Data (bytes 1-7): See the PROFIBUS DP specification for details.

User_Prm_Data (bytes 8-14): 00 00 00 xx* 00 10

* The xx parameter can be 00 or 01 and selects whether the least-significant word comes first (00) or most-significant word comes first (01).

Data Blocks

The Basic+ mode uses two fixed-length blocks of data: the Command Block and the Response Block.

ClosedCommand Block

The Command block is a block of 8 contiguous 32-bit output registers. These registers are sent from the PLC or PC to the RMC.

 

The Command Block has the following structure:

 

Register

Number

Data

Type

 

Description

Command Area:
Registers 0 - 5 are used for issuing commands to the RMC75. See Issue a Single Command and Issue Simultaneous Commands below for details on using these registers.

0

Integer

Command Register

Bit

Bit Description

31

Command Request

30

Deferred Command

29

Deferred Command

20-28

Reserved

19

Axis 3 Select

18

Axis 2 Select

17

Axis 1 Select

16

Axis 0 Select

8-15

Reserved

7-0

Command Number

 

1

Float

Command Parameter 1

2

Float

Command Parameter 2

3

Float

Command Parameter 3

4

Float

Command Parameter 4

5

Float

Command Parameter 5

Data Channel 0:
Registers 6 and 7 are used for reading and writing to any register in the RMC75.  See Read from the RMC75 and Write to the RMC75 for details on using these registers.

6

Integer

Read/Write Register

Bit

Bit Description

31

Read/Write

30

Read/Write Request

16-29

Reserved

15-8

R/W Address File

7-0

R/W Address Element

 

7

Float*

Explicit Write Value

 

*These registers are typically REAL data type (floating point), but in some cases may be DINT or DWORD  integers, such as variables declared as such.

 

ClosedResponse Block

The Response Block is a block of 16 contiguous 32-bit input registers (cyclic read registers), corresponding to the Indirect Data Map registers 0 to 15 in the RMC75. These registers are continuously sent from the RMC75 to the PLC or PC. See Configuring the Data below for details on setting up this data.

Each of the 16 contiguous input registers always reads from the same Indirect Data Map register in the RMC75, as listed in the Description column below. However, one of the registers in the Response Block can be set up to return the value of a read from any single register in the RMC75. This allows you to read the value of any single register at any time. See Read from the RMC75 below.

The Response Block has the following structure:

Register

Number

Data

Type

 

Description

0

Integer

Indirect Data 0 - must be Axis 0 Status bits!

Bit

Bit Description

31

Command Acknowledge

30

Read/Write Acknowledge

0-29

Axis 0 Status Bits

 

1

Float*

Indirect Data 1

2

Float*

Indirect Data 2

3

Float*

Indirect Data 3

4

Float*

Indirect Data 4

5

Float*

Indirect Data 5

6

Float*

Indirect Data 6

7

Float*

Indirect Data 7

Note:
Registers 8-15 are not consistentClosed A block of PROFIBUS data is called 'consistent' if it is consistent over the length of the block, rather than just over a single 8- or 16-bit data item. Consistent blocks of data will stay together through the communication, from the time it was captured in the slave device until it is delivered to the master application, whereas data from different consistent blocks could have been sampled at different times. with registers 0-7. See explanation below.

8

Float*

Indirect Data 8

9

Float*

Indirect Data 9

10

Float*

Indirect Data 10

11

Float*

Indirect Data 11

12

Float*

Indirect Data 12

13

Float*

Indirect Data 13

14

Float*

Indirect Data 14

15

Float*

Indirect Data 15

*These registers are typically REAL data type (floating point), but in some cases may be DINT or DWORD  integers, such as variables declared as such.

A Note about PROFIBUS Consistency

Registers within a consistent block are all updated at the same time.  Notice that the Response Block area is divided into two consistent blocks.  Therefore, the first eight (8) registers may have been updated at a different time than the last eight (8) registers.  This is important because command and read/write synchronization use the first register, and therefore only the following seven (7) registers are guaranteed to have been updated at the same time as this synchronization register.

For example, suppose a PLC issues a command to axis 1 and then needs to wait for it to get in position.  To do this, the PLC must issue the command, wait for the command to be received, and finally check the axis's In Position status bit.  However, if the Axis 1 Status Bits register is placed in the second block of registers, then even after the Command Acknowledge bit matches the Command Request bit, indicating that the command was received, we have no way of knowing whether the Axis 1 Status Bits register was read from the controller before or after the command was issued, and thus could provide the In Position bit from before the command was issued.

In short, do not put any registers that depend on a command being issued—such as axis Status Bits, Error Bits, or Command Position—or the Read Response—which is tightly coupled to the Read/Write Acknowledge bit in register 0—in the second block of registers.

 

Configuring the Data

ClosedSetting up the Indirect Data Map

The Response Block continuously returns the values from the RMC75 Indirect Data registers 0-15. These registers, in turn, can be mapped to any registers in the RMC75. Thereby, the values from the selected registers in the RMC75 can be read from and written to by writing to  and reading from the Indirect Data registers.

To set up the Indirect Data Map:

  1. In the Project pane, double-click Address Maps, then click Indirect Data Map.

  2. In the Register column of the first Indirect Data Map entry, type "%MD8.0" and press Enter. This will map Axis 0 Status Bits register to the first item in the Indirect Data Map. Basic mode requires that the first item in the Indirect Data Map contains the Axis 0 Status Bits register.

  3. For each of the remaining Indirect Data Map entries 1-15, enter the desired register to map to each. To do this, click the cell in the Register column, click the ellipsis button (), then browse to the desired register.

    Note:
    Response Block registers 8-15 are not consistent with registers 0-7. Because of this, registers 8-15 should not be used for tight synchronization with registers 0-7. The following registers should not be placed in Indirect Data Map registers 8 to 15:
    - Read Response - this is tightly coupled with the Read/Write Acknowledge bit in register 0.
    - Status and Error bits, Actual Position, Command Position - these depend on the command being issued.

  4. If you wish to add additional read capability, one of the Indirect Data Map registers should be mapped to the Read Response register. Then, the corresponding register in the Response Block will return the value of a read from any single register in the RMC75 at any time. See Read from the RMC75 below.

 

Registers within a consistent block are all updated at the same time.  Notice that the Response Block area is divided into two consistent blocks.  Therefore, the first eight (8) registers may have been updated at a different time than the last eight (8) registers.  This is important because command and read/write synchronization use the first register, and therefore only the following seven (7) registers are guaranteed to have been updated at the same time as this synchronization register.

For example, suppose a PLC issues a command to axis 1 and then needs to wait for it to get in position.  To do this, the PLC must issue the command, wait for the command to be received, and finally check the axis's In Position status bit.  However, if the Axis 1 Status Bits register is placed in the second block of registers, then even after the Command Acknowledge bit matches the Command Request bit, indicating that the command was received, we have no way of knowing whether the Axis 1 Status Bits register was read from the controller before or after the command was issued, and thus could provide the In Position bit from before the command was issued.

In short, do not put any registers that depend on a command being issued—such as axis Status Bits, Error Bits, or Command Position—or the Read Response—which is tightly coupled to the Read/Write Acknowledge bit in register 0—in the second block of registers.

 

Example

Requirements

First, the user lists the desired registers to read from the RMC75:

In addition, the user would like to read some other registers occasionally.

Implementation

The user chose to set up the Indirect Data Map like this:

 

Using the Data Blocks

ClosedIssue a Single Command

To issue a command, set up the contents of the first six registers of the Command Block, and when complete, toggle the Command Request bit in the first Command Block register.

Notice that commands with more than 5 command parameters cannot be issued via PROFIBUS. To issue such commands, include them in a user program and issue a command via PROFIBUS to start the user program.

To issue a single command to the RMC75, use the following steps:

  1. Wait until the Command Request bit in the Command Register (0) of the Command Block is equal to the Command Acknowledge bit in register 0 of the Response Block.  If they are not equal, the RMC is currently processing a command request.

  2. Enter the command number in bits 0-7 of the Command Register (0) of the Command Block.

  3. If the command has any parameters, put them in registers 1-5 of the Command Block.

  4. Clear the Deferred Command bits.

  5. Set the desired Axis Select bit in the Command Register. The command will be sent simultaneously to each axis you select.

Note:
Using this method, you can send a single command to multiple axes simultaneously. You cannot send different commands to multiple axes simultaneously. To send different commands to multiple axes simultaneously, see the Issue Simultaneous Commands section below.


  1. Toggle the Command Request bit.

  2. Wait until the Command Request bit is equal to the Command Acknowledge bit.  When they are equal, the RMC75 has received the command.

 

NOTE:
Until the Command Acknowledge bit matches the Command Request bit, the Input Data registers, including the Status Bits registers, do not reflect having received the command.

Example


A Move Absolute (20) command is issued using the PROFIBUS Command Block.  Until the
Command Request bit matches the Command Acknowledge bit after the Command Request bit has been toggled, the In Position bit should not be checked as it may still be set for the previously requested move.  Once the Acknowledge toggles to match, the In Position bit will have been cleared and when it is set, it is due to the new command being complete.  Similar synchronization issues are resolved in the same way with other status bits and registers.

 

 

ClosedIssue Simultaneous Commands

Although only one command may be sent at a time to the RMC75P via PROFIBUS, it is possible to simultaneously issue different commands to several axes by using deferred commands. Deferred commands are stored in the PROFIBUS command buffer until all deferred commands are received. They are then executed simultaneously. Bits 30 and 29 in the Command Data Register of the Command Block define the deferred status of each command issued. The bits are used as follows:

 

Bit

30

Bit

29

 

Action

0

0

Single Command: When both bits are zero, the command is not deferred. The command is executed normally. If the PROFIBUS command buffer contains any commands, an error is logged in the Event Log and the commands are removed from the command buffer without being executed.  The new command is still issued.

0

1

Last Deferred: This command and any deferred commands in the PROFIBUS command buffer are executed simultaneously.

1

0

First Deferred: This command is placed as a deferred command in the PROFIBUS command buffer, but is not otherwise processed.  If the command buffer already contains commands, an error is logged in the Event Log and the commands are removed from the command buffer without being executed.  The new deferred command is still placed in the command buffer.

1

1

Middle Deferred: This command is placed as a deferred command in the PROFIBUS command buffer, but is not otherwise processed.  This deferred command type allows other deferred commands to be in the command buffer, although they are not required to be there.  Note that for a 2-axis controller, this deferred setting will not be used because there can only be a first and last deferred command.

 

Multiple deferred commands cannot be issued to the same axis. That is, if a deferred command is issued to an axis that already has a deferred command, an error is logged in the Event Log and the previous command is overwritten without being executed.

 

ClosedRead from the RMC75

The Response Block only returns the values from 16 registers, which must be determined when setting up the communications. However, it is possible to set up one of the registers in the Response Block to return the value of a read from any single register in the RMC75.

When a read is requested from any single register in the RMC75, the response from this single-register read will be placed in the Axis 0 Read Response register. In order to see the response from the PROFIBUS, you must map the Axis 0 Read Register into one of the Indirect Data Map registers.

Notice that the copy from the requested register into the Axis 0 Read Response register only occurs once, and therefore you will not see the value continuously updating like the other Response Block registers.

To read any single register from the RMC75, use the following steps:

 

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

 

ClosedWrite to the RMC75

To write to the RMC75, use the following steps:

 

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

Note:
The RMC75 sets the Read/Write Acknowledge bit equal to the Read/Write Request to acknowledge that the write was processed. In addition, the RMC75 also places the write value in the Read Response register. This provides a simple method of verifying that the write was completed.

 

Debugging

ClosedUsing the Event Log for PROFIBUS

The Event Log can record every change in the PROFIBUS data received by the RMC75P. This is the data in the Command Block. It does not record the data in the Response Block, which is sent by the RMC75P. The Event log displays the received data in hexadecimal format.

 

The Event Log can log an entry when any of the following occurs:

Tip:
In some cases, a request can be made, but nothing happens. This is probably caused by one of the following:
- A command was requested, but no Selected Axis bit was set.
- A read or write of multiple registers was requested, but the Count was set to 0.

 

The Event Log labels the logged entries in the following manner:

Debugging the Command Area Data

The Event Log displays the Command Area data in the following order:

Cmd Register, Cmd Parameter 1, Cmd Parameter 2, Cmd Parameter 3, Cmd Parameter 4, Cmd Parameter 5

ClosedExample:

Assume a Move Absolute command has been issued to the RMC75 via PROFIBUS. The Event Log may look like this:

Steps 28-31 show how the command parameters are changing. The command word shows the command that will be issued, (hexadecimal 14 is 20 in decimal), and the command select bit ( the 1 in the middle of the word).

In step 33, bit 31 of the Command Register changed, which then issued the move command.

 

Debugging Data Channel 0

The Event Log displays the Data Channel 0 data in the following order:

Read/Write Register (register 6), Explicit Write Value (register 7)

ClosedExample:

Assume a value of 46.2 was written to %MD56.0 via PROFIBUS. The Event Log may look like this:

Step 38 shows that the File is 56 (38 in hexadecimal), bit 31 is set to 1 for a write. The Explicit Write register contains the write value 46.2, but it is very difficult to decipher a float value from its hexadecimal representation.

Step 39 shows that the Read/Writer Request bit changed, which  requested the write.

 

 

 

 

 

See Also

Basic/Enhanced PROFIBUS Modes | PROFIBUS Configuration | PROFIBUS-DP Overview


Send comments on this topic.

Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion