PMAC Product Guide 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. 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. Examples: 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 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. 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).
If the condition is false, it will not execute those statements; it will only execute any statements on a false condition if the line immediately following begins with ELSE . If the next line does not begin with ELSE , there is an implied ENDIF at the end of the line. Note: When there is an ELSE statement on the motion-program line immediately following an IF statement with actions on the same line, that ELSE statement is matched automatically to this IF statement, not to any preceding IF statements under which this IF statement may be nested. 220 Buffer Commands