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:
Sixteen (16) user-selectable cyclic read registers are continuously read for instant access by the PLC or PC.
See Response Block and Setting Up the Indirect Data Map below.
One (1) register anywhere in the RMC75 can be explicitly written or read.
See Read from the RMC75 and Write to the RMC75 below.
Commands can be issued to any number of axes simultaneously.
See Command Block, Issue a Single Command, and Issue Simultaneous Commands below.
PROFIBUS bandwidth used: 16 consistent 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. I/O words (16 bits each), plus 16 consistent 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. Input words (16 bits each).
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.
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:
|
||||||||||||||||||||||||
0 |
Integer |
Command Register
|
||||||||||||||||||||||
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:
|
||||||||||||||||||||||||
6 |
Integer |
Read/Write Register
|
||||||||||||||||||||||
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.
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!
|
||||||||
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:
|
||||||||||
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
Setting 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:
In the Project pane, double-click Address Maps, then click Indirect Data Map.
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.
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.
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:
Axis 0 Status Bits
Axis 0 Actual Position
Axis 1 Status Bits
Axis 1 Actual Position
Task 0 Current Step
Task 1 Current Step
The first 8 registers of the Variable Table.
In addition, the user would like to read some other registers occasionally.
Implementation
First, PROFIBUS communications requires that Axis 0 Status Bits register must be in the first Response Block register, which is entry 0 in the Indirect Data Map.
Second, the Read Response register is needed in order to read other registers occasionally.
Third, the user determines which registers must be in registers 0-7 to preserve consistency. The rest of the registers can then be placed in the remaining registers.
The user chose to set up the Indirect Data Map like this:
Using the Data Blocks
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:
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.
Enter the command number in bits 0-7 of the Command Register (0) of the Command Block.
If the command has any parameters, put them in registers 1-5 of the Command Block.
Clear the Deferred Command bits.
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.
Toggle the Command Request bit.
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.
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.
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:
Wait until the Read/Write Request bit is equal to the Read/Write Acknowledge bit. If they are not equal, the RMC75 is currently processing a read or write request.
Clear the Read/Write bit.
Set the Read/Write Address File and Read/Write Address Element. For example, for address %MD8.12, the file is 8, and the element is 12. See the RMC75 Register Map topic for a description of all RMC75 registers and their addresses.
Toggle the Read/Write Request bit.
Wait until the Read Request bit is equal to the Read/Write Acknowledge bit. When they are equal, the RMC75 will have updated the Axis 0 Read Response register with the requested data, and the corresponding Response Block register.
To further clarify the ordering, keep these basic rules in mind:
Do change the read address and Read/Write bit before toggling the Read/Write Request bit.
Do not change the Read/Write Request bit after a read request until you have processed the data in the Read Response register.
Do not change the read address or Read/Write bit when the Read/Write Request bit does not match the Read/Write Acknowledge bit.
To write to the RMC75, use the following steps:
Wait until the Read/Write Request bit is equal to the Read/Write Acknowledge bit. If they are not equal, the RMC75 is currently processing a read or write request.
Copy the value you wish to write to the RMC75 into the Write Value register (7) of the Command Block.
Enter the Read/Write Address file and element. For example, for address %MD56.0, the file is 56, and the element is 0. See the RMC75 Register Map topic for a description of all RMC75 registers and their addresses.
Set the Read/Write bit.
Toggle the Read/Write Request bit.
Wait until the Read/Write Request bit is equal to the Read/Write Acknowledge bit. When they are equal, the RMC75 has received the data written to it.
To further clarify the ordering, keep these basic rules in mind:
Do change the Read/Write bit, write address, and write value before toggling the Read/Write Request bit.
Do not change the Read/Write bit, write address, or write value when the Read/Write Request bit does not match the Read/Write Acknowledge bit.
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
Using 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:
Data is Initialized
(the Configuration Information box must be checked in the Event Log filter for PROFIBUS)
This typically occurs when the RMC75 is restarted. The Event Log entry will be labeled initial data. It provides the user with a reference of what the initial data is.
For example, assume a user wrote a 1 to the Command Request bit to issue a command immediately after starting the PROFIBUS communications, but the command was not issued. The user then looked in the Event Log and found out that the initial data showed that the Command Request bit already was 1, which explains why the command was not issued. The bit must be toggled to send a command, so he should have written a 0.
Data Changes
(the Command Channel Logging and Data Channel Logging boxes must be set to All in the Event Log filter for PROFIBUS)
Each time the data in the Command Block changes, the data will be logged with an entry labeled changed. The entry will also specify which data changed, as described below.
A Request is Made
(the Command Channel Logging and Data Channel Logging boxes must be set to All or Requests in the Event Log filter for PROFIBUS)
Each time a Command Request bit or Read/Write Request bit is toggled, the entry will be labeled request made. This indicates a command was requested to be issued, or a read or write was made.
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:
Command Area
These 6 registers are the data used to issue commands to the RMC75.
Data Channel 0
These 2 registers contain the data for reading or writing a single RMC75 register. Data Channel 1 is not used with Basic+ Mode.
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
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)
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
Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion