omron — PSET

PMAC Product Guide In motion programs, there can be compound conditions within one program line, but not across multiple program lines, so this statement is not permitted in motion programs. This logical OR , which acts on conditions , should not be confused with the bit-by-bit | (vertical bar) or- operator, which operates on values. Examples: IF (M11=1) ; This branch increments P1 every cycle that AND (M12=0) ; inputs M11 and M12 are different, and decrements OR (M11=0) ; them every cycle that they are the same. AND (M12=1) P1=P1+1 ELSE P1=P1-1 ENDIF IF (M11=1 AND M12=0) ; This does the same as above OR (M11=0 AND M12=1) P1=P1+1 ELSE P1=P1-1 ENDIF P{constant}={expression} Function :

Set P-Variable value Type : Motion program (PROG and ROT) Syntax : P{constant}={expression} where {constant} is an integer constant from 0 to 1023 representing the P-Variable number. {expression} represents the value to be assigned to this P-Variable. This command sets the value of the specified P-Variable to that of the expression on the right side of the equals sign. The assignment is done as the line is processed, which usually in a motion program is one or two moves ahead of the move actually executing at the time (because of the need to calculate ahead in the program). Examples: P1=0 P746=P20+P40 P893=SIN(Q100)-0.5 PSET Function : Redefine current axis positions (position SET) Type :

Motion program Syntax : PSET{axis}{data} [{axis}{data}...] where {axis} is the character specifying which axis (X, Y, Z, A, B, C, U, V, W). {data} is a constant or an expression representing the new value for this axis position. This command allows the user to re-define the value of an axis position in the middle of the program. It is equivalent to the RS-274 G-Code G92. No move is made on any axis as a result of this command -- the value of the present commanded position for the axis is merely set to the specified value. 228 Buffer Commands