Reference Manual
PMAC 2 Software Reference
PMAC Program Command Specification 341
Q{constant}={expression}
Function
Set Q-Variable Value
Type
Motion program (PROG and ROT); PLC program
Syntax
Q{constant}={expression}
where:
• {constant} is an integer value from 0 to 1023 representing the Q-variable number
• {expression} represents the value to be assigned to the specified Q-variable.
Remarks
This command sets the value of the specified Q-variable to that of the expression on the
right side of the equals sign. The assignment is done as the line is processed, which in a
motion program performing a continuous move sequence is usually one or two moves
ahead of the move actually executing at the time (because of the need to calculate ahead
in the program).
Because each coordinate system has its own set of Q-variables, it is important to know
which coordinate system’s Q-variable is affected by this command.
When executed from inside a motion program, this command affects the specified Q-
variable of the coordinate system running the motion program.
When executed from inside a PLC program, this command affects the specified Q-
variable of the coordinate system specified by the most recent ADDRESS command
executed inside that PLC program. If there has been no ADDRESS command executed
since power-on/reset, it affects the Q-variable of Coordinate System 1.
Example
Q1=3
Q99=2.71828
Q124=P100+ATAN(Q120)
See Also
Q-Variables (Program Computational Features)
On-line command Q{constant}={expression}
Program commands ADDRESS, I{constant}={expression},
M{constant}={expression}, P{constant}={expression}
R{data}
Function
Set Circle Radius
Type
Motion program (PROG or ROT)
Syntax
R{data}
where:
• {data} is a constant or expression representing the radius of the arc move specified
in user length units.
Remarks
This partial command defines the magnitude of the radius for the circular move specified
on that command line. It does not affect the moves on any other command lines.. (If
there is no R radius specification and no IJK vector specification on a move command
line, the move will be done linearly, even if the program is in CIRCLE mode.)
If the radius value specified in {data} is greater than zero, the circular move to the
specified end point will describe an arc of less than or equal to 180
º
with a radial length
of the specified value. If the radius value specified in {data} is less than zero, the
circular move to the specified end point will describe an arc of greater than or equal to
180
°
with a radial length equal to the absolute value of {data}.