Delta RMC151 User Manual
Page 493
6 Communication
used if the PLC will be writing commands to the Command Area. The following sequence
is recommended:
1. Wait Until the Sync In and Sync Out Registers Match
If they do not match, then this means that another command or set of commands is in
progress.
2. Clear Old Commands from the Command Registers
Clear old commands from the command registers for each axis. Otherwise, when the
Sync Out register is changed, the commands would be re-issued. One method of
clearing the old commands is to fill the Output Data array with zeroes.
3. Write to the Command Registers
Write the Command registers and all required command parameters to the Output
Data for all commands you want to issue. You can issue up to one command per axis.
Leave the Command register set to 0 for each axis that will not receive a command.
4. Change the Sync Out Register
The easiest way to do this is to add one to it. However, you must take care to handle
overflowing this register (the Sync register is a REAL). One method is to add one and
then MOD it with some large number, such as 10000. This will make the register count
from 0 to 9,999, and then wrap back down to 0 without an error. Take care to ensure
that you only update the Sync Out register once so that the commands do not get re-
issued.
5. Wait Until the Sync In and Sync Out Registers Match
It is important to wait until this occurs before using the status bits in the Input Data (if
the Input Data includes any status bits). See the example above for how problems can
occur if this step is ignored.
Triggering Commands through the Variable Table
If you have set the Output Data to write to Variable Table registers directly or via the
Indirect Data Map, you can use them together with the Program Triggers to start User
Programs that issue commands. For advanced applications that require issuing commands
and writing to variables, this can be a very efficient method of communication.
To issue a command with this method, you will first need to do the following:
1. Create a user program that contains the commands you need.
2. Define a variable in the Variable Table that will be used to start the program. Name it
StartProgram, for example.
3. Create a Program Triggers condition that looks at the value of StartProgram. When the
StartProgram variable becomes a certain value, it will start the specified user program.
This StartProgram variable can be used to start different programs based on its value.
4. The user programs should always reset the StartProgram variable to some starting
value (such as 0). This is so the Program Triggers will always see the number change
when the PLC writes to it. If the number already was 6, and the PLC writes 6, the
value doesn't change, and the Program Triggers do not know to start a user program.
Typically, the first step in a program should reset the value of the variable.
Once the Program Triggers and User Programs have been made, make sure the RMC is in
RUN Mode, and use one of the procedures below to start a User Program:
With a Sync Register:
1. Wait until the Sync In and Sync Out Registers match.
2. Write a number to the StartProgram variable. The number will specify which user
program to run.
3. If you need to write to other variables (e.g. for defining speeds, setpoints, etc.), do so.
4. Change the Sync Out Register.
The easiest way to do this is to add one to it. However, you must take care to handle
overflowing this register (the Sync register is a REAL). One method is to add one and
then MOD it with some large number, such as 10,000. This will make the register
deltamotion.com
473