beautypg.com

Delta RMC101 User Manual

Page 914

background image

RMC100 and RMCWin User Manual

E-24

Step 13 immediately links back to step 11 to restart the polling loop. Notice that this extra step
does take one control loop to process and therefore increases the time taken to process the
entire polling loop by one control loop (1 or 2 ms).

Step 14 handles the timeout condition by turning on discrete output 0.

Now, compare this method of implementing a timeout with the one used in the next example,
which is a little more difficult to follow but removes the need for the extra do-nothing step in the
polling loop (step 13 above).

Example 3:

This example offers an alternative approach to the same problem as Example 2: the user wants
to make a move and wait for the move to complete or a timeout to occur. It is a little more difficult
to follow, but removes one step from the polling loop, therefore reducing the amount of time taken
to catch any condition. Keep in mind that for many applications, this slight gain in performance
will not justify the reduction in clarity.

Step 10

Step

11

Step 12

Step 13

&

Mode

0x0081

0x0081

0x0081

0x0000

Accel

100

100

100

0

Decel

100

100

100

0

Speed

10000

10000

10000

0

Command

Value

4000

0

0

0x0001

Command

G

?

?

[

Commanded

Axes

Default

Default

Default

Default

Link Type

TimerSt/Exp

BitsON

TimerNExp

DelayMS

Link Value

0

0x0001

5000

0

Link Next

11

14

11

14

Step 10 initiates the move to 4000, starts the timer, and links immediately to step 11.

Step 11 checks the In Position bit of the Status Word using the BitsON (b) link type. Therefore, if
the axis is in position, then the link is taken to step 14. Otherwise, control passes to step 12.

Step 12 checks if 5000 ms (five seconds) have expired since the timer was started in step 10.
Notice that, this time, the Timer Not Expired (t) link type is used. Therefore, if the timeout has not
occurred, then control jumps back to step 11. If the timeout has occurred, then control passes to
step 13.

Step 13 handles the timeout condition by turning on discrete output 0.

Here is a summary of the advantages and disadvantages of doing a polled loop using this method
versus the method shown in Example 2:

• The advantage of this method is that the timeout and the In Position bit will be checked every two

control loops since there are only two steps in the polling loop (steps 11 and 12).

This manual is related to the following products: