Reference Manual

PMAC 2 Software Reference
PMAC Program Command Specification 323
See Also
How PMAC Executes a Motion Program (Writing a Motion Program)
On-line command I{constant}={expression}
Program commands M{constant}={expression),
P{constant}={expression}, Q{constant}={expression},
M{constant}=={expression}
IDIS{constant}
Function
Incremental displacement of X, Y, and Z axes
Type
Motion program (PROG and ROT)
Syntax
IDIS{constant
where:
{constant} is an integer representing the number of the first of three consecutive
Q-variables to be used in the displacement vector.
Remarks
This command adds to the offset values of the currently selected (with TSEL)
transformation matrix for the coordinate system the values contained in the three Q-
variables starting with the specified one.
This has the effect of renaming the current commanded X, Y, and Z axis positions (from
the latest programmed move) by adding the values of these variables
(Xnew=Xold+Q{constant}, Ynew=Yold+Q({constant}+1),
Znew=Zold+Q({constant}+2)). This command does not cause any movement of any
axes. It simply renames the present positions.
This command is similar to a PSET command, except that IDIS is incremental and does
not force a stop between moves, as PSET does.
Example
X0 Y0 Z0
Q20=7.5
Q21=12.5
Q22=20
IDIS 20 ; This makes the current position X7.5, Y12.5, Z20
IDIS 20 ; This makes the current position X15 Y25 Z40
See Also
Axis Matrix Transformations (Writing a Motion Program)
On-line command DEFINE TBUF
Program commands TSEL, ADIS, AROT, IROT, TINIT
IF ({condition})
Function
Conditional branch
Type
Motion and PLC program
Syntax
IF ({condition}) (Valid in fixed motion (PROG) or PLC program only)
IF ({condition}) {action} [{action}...] (Valid in rotary or fixed
motion program only)
where:
{condition} consists of one or more sets of {expression} {comparator}
{expression}, joined by logical operators AND or OR.
{action} is a program command.
Remarks
This command allows conditional branching in the program.
With an action statement or statements following on that line, it will execute those
statements provided the condition is true (this syntax is valid in motion programs only).