The commands are the building blocks of RMC programming. Commands tell the RMC what to do. For a list of commands, see the Command List topic. There are several methods of sending commands to the RMC:
Issuing Commands from RMCTools
When you are setting up, tuning, programming and troubleshooting the RMC, use the Command Tool in RMCTools to issue commands to the RMC. See the Command Tool topic for details on issuing commands from RMCTools.
For Shortcut commands, see the Shortcut Commands topic.
Issuing Commands from within a User Program
User Programs carry out complex sequences of commands on the RMC without requiring intervention from a PLC or other controller.
See the User Programs topic for details on how to create and run user programs to issue to commands to the RMC.
Issuing Commands from a Host Controller, such as a PLC or HMI
You can issue commands directly to the RMC from a host controller, such as a PLC or HMI. It is possible to issue commands to multiple axes simultaneously.
Via PROFIBUS
See the PROFIBUS Overview topic and read the topic of the mode you are using.
Via PROFINET IO
See the Using a PROFINET I/O Connection topic.
Via EtherNet/IP I/O
See the Using an EtherNet/IP I/O Connection topic.
Via Ethernet (Modbus/TCP, FINS/UDP,
CSP or DF1 over Ethernet, Mitsubishi Procedure Exist)
or Serial RS-232/485 (Modbus
RTU, DF1,Mitsubishi Bidirectional Protocol)
Use the following procedure to issue a command:
Determine which Axes
Determine which axis or axes you are going to issue the command to.
Find the Address
Use the following topics to locate the addresses of the Command Registers for the communication protocol and RMC you are using:
DF1 Addressing
Modbus Addressing
FINS Addressing
Write to the Command Registers
Write values to the Command Registers of the axis or axes you wish to issue the command to. You need only write to as many Command Parameters as are used by the command you will issue.
Note:
The RMC will process the command as soon as a write is made to the Command register. Most PLCs or HMIs can write to the these in one write, such as a block write.
If your host controller can only write to one register at a time, it is important that you write to the Command register last. If your system can write to multiple registers at a time, you can write to all the Command Area registers at once.
Note:
If you are using a 16-bit addressing protocol, such as Modbus, you must write 2 words for each register you wish to write to in the RMC. All command registers are 32-bit floating-point values.
Caution: For each command you wish to issue, write it only once so that it is issued only once. If you issue the same motion command multiple times, it can cause the target position to overshoot the requested position.
Optional: Use the Command Request and Acknowledge Bits
If your system requires tight synchronization, you should use the Command Request and Acknowledge bits. These bits indicate that the RMC has received the command. Typically, these bits are only needed when using a PLC or other highly capable host controller. See the Command Request and Acknowledge bits topic for details.
For example, if you issue a Move command and then wait for the In Position Status bit to be set, it is important that you do not start checking the In Position status bit until the RMC has received the command. The Command Request and Acknowledge bits tell you when there RMC has received command.
Examples
Command Format
Each RMC command consists of a command number and command parameters.
Command Number
Each RMC command has a number associated with it. You must use this number when you issue a command to the RMC. The number is typically included in parentheses whenever the command is mentioned. For example, the Move Absolute Command (20) has a number of 20.
Command Parameters
Some commands have command parameters. For example, the Move Absolute Command (20) has 5 command parameters: Position, Velocity, Accel rate, Decel Rate, and Direction. When you issue a command, you must include any command parameters.
Notice that the Command Number and Command Parameters are all floating point numbers, as seen from the PLC or HMI issuing the command. However, the command number must be a whole number (e.g. 20, or 20.0, not 20.1)), and certain command parameters must be integers or are limited to a certain range, depending on the command.
For more details on commands, see the Commands Overview topic.
Advanced Details
Immediate Commands
Certain commands in the RMC are immediate commands. There is no limit to the number of immediate commands that can be issued to an axis per loop time, whereas a maximum of one non-immediate command per loop time can be issued to each axis.
Immediate commands are usually not motion commands. The ability to issue multiple immediate commands in one loop time affects primarily the user programs, since it is difficult to issue many simultaneous commands via the external communications.
Commands Issued Simultaneously
Commands sent simultaneously to the RMC in the same communication block will always be issued simultaneously. For all communications methods, the RMC waits until the entire communication block is received before issuing any of the commands in the block. The commands received in this block are referred to as a command set. Such a command set can contain at most one command per axis, with the exception of immediate commands in user programs, which are unlimited.
Command Queue
As command sets are received from various sources, they are placed in a command queue. Each control loop, the controller processes command sets from the queue on a first-in first-out basis, stopping when it reaches a command set that would issue a non-immediate command to an axis that has already processed a non-immediate command this control loop. Command sets remaining in the command queue will be processed in subsequent control loops. Notice that commands issued as part of the same command set will never be split between different control loops. That is, either all of the commands in the command set will be processed in the control loop, or none of them will be and the entire command set will be deferred to the next control loop.
The command queue has a finite length. The RMC75 command queue allows up to 6 command sets, each set with up to one command per axis. The RMC150 allows up to 12 command sets. If the command queue is full when a new command set is received, the command set will be discarded, and Runtime Error 201 (Command block dropped) will be logged in the Event Log. This condition can only practically occur in cases where non-immediate commands are being issued continuously from a user program. Notice that Expression commands are immediate commands and are therefore safe to issue continuously from user programs.
See Also
Command Request and Acknowledge Bits | Communications Overview
Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion