Power PMAC User's Manual
F(MyLastCuttingFeedrate);
}
MyMoveMode == 3;
Coord[1].NoBlend = 0;
return;
G04 – Dwell Command
The G04 code implements a "dwell" of a specified time. In different "dialects" of RS-274, the
time is specified in different ways, but always with a letter/number combination immediately
following the G04 code. Common letters used are X, P, L, and D, and the number values can
represent the dwell time in seconds or milliseconds. The subroutine will use the read command
to obtain the value associated with the chosen letter.
Most Power PMAC implementations will choose a single letter and a specific time unit for the
dwell. For example, to use the letter P with a number specifying the time in seconds, the
subroutine could be:
N4000: read(P);
dwell(D16 * 1000);
return;
The read(p) command places the value after the letter P in the main program into local
variable D16 (as P is the 16
specified in milliseconds, the specified time in seconds is multiplied by 1000.
A more robust implementation may want to ensure that a dwell time value has actually been
specified in the command line. In the above subroutine, if no P-value were specified after the G04
in the part program, the subroutine would execute a dwell using whatever value happened to be in
the D16 variable at the time. Bit n-1 of local variable D0 is set to 1 if and only if a value
associated with the nth letter of the alphabet has been successfully read in the most recent read
command. For the letter P, this is bit 15, with a value of 2
feature would be like the following:
N4000: read(P);
if (D0 & 32768) dwell(D16 * 1000);
else dwell 0;
return;
Of course, the action to take, if any, if no value is present to be read, is up to the integrator.
Power PMAC's dwell command always executes at 100%; it does not use the feedrate override
value (whether time base or segmentation override) in force at the time. It also stops any pre-
calculation for blending and lookahead purposes. On the other hand, Power PMAC's delay
command executes at the override value in effect at the time, and does not disable pre-calculation.
Depending on what features the integrator wants, dwell, delay, or both commands could be
used. For example, to implement a G04 that uses the override value in effect, but disables pre-
calculation, the following subroutine could be used:
N4000: read(P);
if (D0 & 32768) {
dwell 0;
Writing and Executing Script Programs in the Power PMAC
th
letter of the alphabet). Since Power PMAC's dwell time is always
15
, or 32,768. A subroutine using this
622
Need help?
Do you have a question about the Power PMAC and is the answer not in the manual?
Questions and answers