Link Type - Loop

Link Type:

LoopStart (#, hex 0x23, dec 35)
LoopEnd (-, hex 0x2D, dec 45)

Link Value:

Number of loop iterations

Range:

0 to 65,535

 

Note: This feature is available only in RMC100 CPU firmware version 19980811 and later.

 

Note: This link type cannot be used with the Poll (?) command.

 

The LoopStart (#) and LoopEnd (-) link types are used together to create loops in the Event Step table. The Link Value of the LoopStart link type indicates how many iterations you want through the loop. The LoopStart link type jumps immediately to the step indicated by the Link Next. This should typically indicate the step of the LinkEnd link type.

The LoopEnd link type tests the loop counter to see if it zero. If it is zero then the next step—not the step specified in the Link Next field—will be executed. If the loop counter is not zero then it is decremented by one and the step specified in the Link Next field is jumped to. The Link Value on the LoopEnd link type is ignored and should be set to zero (0).

Example:

The following example executes steps 2 though 5 three times. After the third loop step 7 is executed.

 

Step 1

Step 2

Step 3

Step 4

Step 5

Step 6

Mode

0x0081

0x0081

0x0081

0x0081

0x0081

0x0081

Accel

100

100

100

100

100

100

Decel

100

100

100

100

100

100

Speed

10000

10000

10000

10000

10000

10000

Command Value

4000

10000

10000

4000

4000

4000

Command

 

G

 

G

 

 

Commanded Axes

Default

Default

Default

Default

Default

Default

Link Type

LoopStart

BitsON

DelayMS

BitsON

DelayMS

LoopEnd

Link Value

3

1

1000

1

1000

0

Link Next

6

3

4

5

6

2

 

Using with the Link Type and Link Value Dialog Box

  1. Under Link Type Category, select System-wide (Basic, non-axis).

  2. Under Link Type, select Loop.

  3. Under Link Condition, select Start a Loop or End a Loop.

  4. If you selected Start a Loop, enter the number of iterations you want to use.

 

Using without the Link Type and Link Value Dialog Box

  1. To start a loop, enter '#' for the Link Type. To end a loop, enter '-' for the Link Type.

  2. If you started a loop, enter the number of iterations in the Link Value. Otherwise enter 0 in the Link Value.

 


Copyright (c) 1997-2015 by Delta Computer Systems, Inc.