Delta RMC101 User Manual
Page 657
Appendix A: Command Reference
A-5
Suppose that Axis1 needs to go to a position that is 90% of Axis0's Actual Position. This can be done
using two Event Steps. The first will calculate 90% of the Axis0 Actual Position and store it in the
second step's Command Value. The second step will issue a Go (G) command to the newly-
calculated position. A step sequence that accomplishes this is shown below:
Step 18
Step
19
Mode
0x0012
0x0081
Accel
(2)
100
Decel
900
100
Speed
1000
10000
Command
Value
(412)
0
Command
'
G
Commanded
Axes
Default
1
Link Type
MathERR
BitsON
Link Value
0
0x0001
Link Next
40
20
Step 18:
We use a MulDiv command to compute 90% of the Axis0 Actual Position and store it in Step 19
Command Value. We first need to find the source and destination register addresses. We
recommend using the Address Tool to bookmark the Axis0 Actual Position and Step 19 Command
Value on screen, although the RMC Register Map (PROFIBUS-DP Message Mode) help topic can be
used to manually look up the addresses. Both methods show that address 2 (Axis0 Actual Position)
should be entered in the Accel field, and address 412 (Step 19 Command Value) should be entered
in the Command Value field.
Note:
If these steps were moved around in the Event Step table (say to steps 20 and 21), the
address that pointed to Step 19 Command Value (#412) would be automatically adjusted to point to
Step 21 Command Value (#428).
The constants in the Decel and Speed fields are used to give 90%. That is 900/1000 is 0.9 or 90%.
We could also have used 90 and 100 or 9 and 10. Because Mode bit 0 is zero, these values are
signed, although for positive values under 32,767, this makes no difference.
Finally, notice that the range of the register values has been selected by Mode bits 0-1 and 4-6 to be
the position range for Axis1. Therefore, if the result of the multiply and divide does not fall in the
position range for Axis1, then the Math Error bit will be set. Notice that the value read from the Axis0
Actual Position is also treated as being in the Axis1 position range. Therefore, these axes must have
similar position ranges.
As you can see, the MathERR link type is used to detect an overflow and jump to step 40 if there is
such an error. If there is no error, then the MathERR link type links to the next step (step 19).