Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC Program Command Specification 437
If {data} is a constant, the path to the label will have been linked before program run time, so the jump
is very quick. If {data} is a variable expression, it must be evaluated at run time, and the appropriate
label then searched for. The search starts downward in the program to the end, and then continues (if
necessary) from the top of the program down.
A variable GOTO command permits the equivalent structure to the CASE statement found in many high-
level languages (see Examples, below).
If the specified line label is not found, the program will stop, and the coordinate system’s Run-Time-Error
bit will be set.
Note:
Modern philosophies of the proper structuring of computer code strongly
discourage the use of GOTO, because of its tendency to make code undecipherable.
Examples:
GOTO750
GOTO35000
GOTO1
GOTO(50+P1)
N51 P10=50*SIN(P11)
GOTO60
N52 P10=50*COS(P11)
GOTO60
N53 P10=50*TAN(P11)
N60 X(P10)
See Also:
Writing and Executing Motion Programs;
Program commands CALL, GOSUB, N, O.
HOME
Function: Programmed Homing
Type: Motion program
Syntax: HOME {constant} [,{constant}...]
HOME {constant}..{constant} [,{constant}..{constant}...]
HM {constant} [,{constant}...]
HM {constant}..{constant} [,{constant}..{constant}...]
where:
{constant} is an integer from 1 to 32 representing a motor number.
This causes the specified motors to go through their homing search cycles. Note that the motors must be
specified directly by number, not the matching axis letters. Specify which motors are to be homed. All
motors specified in a single HOME command (e.g. HOME1,2) will start their homing cycles
simultaneously; to home some motors sequentially, specify them in consecutive commands (e.g. HOME1
HOME2), even if on the same line.
Any previous moves will come to a stop before the home moves start. No other program statement will
be executed until all specified motors have finished homing. Homing direction, speed, acceleration, etc.
are determined by motor I-variables. If a motor is specified that is not in the coordinate system running
the program, the command or portion of the command will be ignored, but an error will not be generated.
The speed of the home search move is determined by Ixx23. If Ixx23=0 then the programmed home
command for that axis is ignored.