RAPID - Rapid feedrate
Command caption
How the command appears in the CLData command list:
RAPID N n
RAPID activates rapid travel mode (G-code G00). All further travels are done in rapid mode until feedrate modification command FEDRAT is received.
Access from sppx
Handler: program Rapid
| Parameter | CLD array | CLD name | Description |
|---|---|---|---|
| n | CLD[1] | CLD.N | Rapid feedrate value |
Example (from the Fanuc (30i)_Mill postprocessor):
program Rapid
if IsRotaryInterpolation>0 then begin
INTERP_ = 1
Feed_ = 5000
GFeed = 94
end else begin
if INTERP_ > 0 then INTERP_ = 0 ! G0
end
RapFr=cld[1]
end
Access from .NET
Handlers:
public override void OnMoveVelocity(ICLDMoveVelocityCommand cmd, CLDArray cld) // shared velocity handler (FEDRAT and RAPID)
public override void OnRapid(ICLDRapidCommand cmd, CLDArray cld) // rapid feed
Inheritance: ICLDRapidCommand : ICLDMoveVelocityCommand : ICLDCommand.
Read the parameters from the strongly-typed cmd object (recommended); the raw cld[i] array (same indices as in sppx) and the named cmd["..."] helpers are available too. The table lists the command's members, including those inherited from its base interfaces; the common ICLDCommand members (navigation, CLD, CLDFile, TechOperation, ...) are described in the CLData access model.
| Member | Type | Description |
|---|---|---|
cmd.IsRapid |
bool |
Contains "true" if the command is a RAPID command, otherwise it is "false". |
cmd.FeedKind |
CLDFeedKind |
The kind of a feed (working, rapid, engage, return, finish etc.). Possible values: Working (0) - The feed kind for base working movements.Rapid (1) - The feed kind of rapid movements.First (2) - The feed kind for the working movements on a first (roughing) pass.Engage (4) - The feed kind for the movements entering to the first machining (cutting) point.Retract (8) - The feed kind for the movements leaving the last machining (cutting) point.Plunge (16) - The feed kind for the movements that plunge vertically into the machining area.Finish (32) - The feed kind for the working movements on a last (finishing) pass.Next (64) - The feed kind for the short link movements.Return (128) - The feed kind for the movements which take the tool away from the machining site.Approach (256) - The feed kind for the movements which bring the tool closer to the machining site.Rapid5D (512) - The feed kind value reserved for an internal use.TransitionOnSafe (1024) - The feed kind for the movements performed in a safe area.ApproachFromSafe (2048) - The feed kind for the movements from the safe area to the machining side.ReturnToSafe (4096) - The feed kind for the movements from the machining side to the safe area.LongNext (8192) - The feed kind for the long link movements.ThreadPitch (16384) - The feed kind for the threading movements.Overload (1073741824) - The feed kind value reserved for an internal use. |
cmd.FeedCode |
int |
Numerical representation of the "FeedKind" flag, that defines the kind of a feed (working, rapid, engage, return, finish etc.). For a wire EDM case it contains the numerical code of a row in a machining conditions table. |
cmd.FeedUnits |
CLDFeedUnits |
Units of the feed (mm/min, mm/rev etc.) Possible values: MPM (0) - Current linear units (mm or inch) per minute.MPR (1) - Current linear units (mm or inch) per revolution.ConditionCode (2) - Numerical code of a row in a machining conditions table (for a wire EDM). |
cmd.FeedValue |
double |
The value of the feed. |
Example - OnMoveVelocity (from the Fanuc (30i)_Mill_DN postprocessor):
public override void OnMoveVelocity(ICLDMoveVelocityCommand cmd, CLDArray cld)
{
if (cmd.IsRapid) {
nc.GInterp.v = 0;
} else {
if (nc.GInterp == 0)
nc.GInterp.v = 1;
nc.F.v = cmd.FeedValue;
if (cmd.FeedUnits==CLDFeedUnits.MPR)
nc.GFeed.v = 95;
else
nc.GFeed.v = 94;
if (IsFirstFeed)
{
nc.F.Show();
nc.GFeed.Show();
IsFirstFeed = false;
}
}
}