PMAC Product Guide With no statement following on that line, if the condition is true, PMAC will execute all subsequent statements on following lines down to the next ENDIF or ELSE statement (this syntax is valid in motion and PLC programs). If the condition is false, it will skip to the ENDIF or ELSE statement and continue execution there. In a rotary motion program, only the single-line version of the IF statement is permitted. No ELSE or ENDIF statements are allowed. In a PLC program, compound conditions can be extended onto multiple program lines with subsequent AND and OR statements.
There is no limit on nesting of IF conditions and WHILE loops (other than total buffer size) in fixed motion and PLC programs. No nesting is allowed in rotary motion programs. Examples: IF (P1>10) M1=1 IF (M11=0 AND M12!=0) M2=1 M3=1 IF (M1=0) P1=P1-1 ELSE P1=P1+1 IF (M11=0) P1=1000*SIN(P5) X(P1) ENDIF IF (P1 AND (P50=1) X(P1) DWELL 1000 ELSE X(P1*2) DWELL 2000 ENDIF INC Function : Incremental move mode Type : Motion program Syntax : INC [({axis}[,{axis}...])] where {axis} is a letter specifying a motion axis (X, Y, Z, A, B, C, U, V, W), or the letter R specifying the arc center radial vector.
The INC command without arguments causes all subsequent command positions in motion commands for all axes in the coordinate system running the motion program to be treated as incremental distances from the latest command point. This is known as incremental mode, as opposed to the default absolute mode. An INC statement with arguments causes the specified axes to be in incremental mode, and all others stay the way they were. If R is specified as one of the axes, the I, J, and K terms of the circular move radius vector specification will be specified in incremental form (i.e. as a vector from the move start point, not from the origin).
An INC command without any arguments does not affect this vector specification. The default radial vector specification is incremental. If no motion program buffer is open when this command is sent to PMAC, it will be executed as an on- line coordinate system command. Buffer Commands 221