LASTLOOP=ANGLE - (LOOPCNT*32000)

ANGLE=32000

#MOVE

CNT=0

#LOOP

VMXY

CR RADIUS,0,ANGLE

VE

BGS

AMS

CNT=CNT+1

JP#LOOP,CNT<LOOPCNT

ANGLE=LASTLOOP

JP#LOOP,(CNT<(LOOPCNT+1)) & (LASTLOOP > 0)

EN

In the above example, a circle is created using the X and Y axes of the controller. The Z

axis is geared to the coordinated motion of the X and Y axes to create the helix. The

gear RATIO is determined by the PITCH of the helix and the circumference of the

circle.

One unavoidable limitation of the circle (CR) command is that the maximum swept

ANGLE of a circle must be less than 32,000 degrees. As a result, the program executes

multiple passes of #LOOP for any calculated angle greater than 32,000 degrees.

**Method to Increase Accuracy of Helical Motion**

For the highest possible accuracy, it is recommended that the gear ratio be calculated

using the formula **ratio=pitch/(2*pi*radius) **on a** **standard calculator. The resolution of

the controller is limited to approximately four decimal places so the ratio you enter

should be the gear ratio you calculate truncated to four decimal places. You will now

need to calculate the amount of error you accumulate during the helical motion due to

rounding so that the #CORRECT routine can compensate for it. For more information

about Gearing Resolution, See Application Note 3010.

First, you need to determine the value of the gear ratio as internally represented by the

controller. The controller stores decimal values as fractions with a resolution of

1/65,536. To determine the internal value of the gear ratio, multiply the entered gear

ratio by 65,536, truncate any fractional part of the result, and divide by 65,536. You can

also determine this directly by typing in a gear ratio (ex. GR ,,.0114) and then

multiplying the _GRn operand by 10,000 and displaying the result (ex. MG

_GRZ*10000). This result divided by 10,000 should give you the same result as the

calculation method.

Next, determine the amount of error that results from the rounding of the gear ratio. To

do this, you must calculate the distance which the geared axis will travel and compare it

to the distance you specified using DIST. The actual distance traveled is equal to the