beautypg.com

Delta RMC151 User Manual

Page 472

background image

RMC70/150 and RMCTools User Manual

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. 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).

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 Trigger 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 you have created the Program Triggers and User Programs, 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. One method is to add one and then MOD it with some large

number, such as 10,000. 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.

When the Sync In Register has changed, you know the data has been applied to the

RMC. 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).

After the Sync registers match, you can look at the Task Status and Current Program

registers to determine if the task is running the program, and when it stops. These

registers should be included in the Input Data.

Without a Sync Register

452

Delta Computer Systems, Inc.

This manual is related to the following products: