Entry Functions

The intermediate NC data is transferred to the configuration script one record at a time using the special entry functions listed below.

Entry Functions

onMachine()

onMachine() is invoked when the machine configuration changes during post processing.

onOpen()

onOpen() is invoked once at post processing initialization. This is the place to output the program header.

The configuration script is not allowed to modify the entry functions after onOpen() has been invoked.

onParameter(String name, String value)

onParameter() is invoked for each parameter in the CLD data where a parameter is a simple name-value pair.

onPassThrough(String value)

onPassThrough() is invoked for pass-through information. Pass-through allows the user to transfer text unmodified through to the post processor to the output file. This feature should be used with caution as the post processor will ignore any pass-through data.

onComment(String comment)

onComment() is invoked for each comment.

onSection()

onSection() is invoked at the start of a section. A section commonly corresponds to an individual operation within the CAM system. However, note that it is perfectly legal from the post processors perspective if an operation generated multiple sections.

onSectionSpecialCycle()

onSectionSpecialCycle() is invoked at the start of a section if the section contains a cycle that has been marked as special. A section commonly corresponds to an individual operation within the CAM system. However, note that it is perfectly legal from the post processors perspective if an operation generated multiple sections. onSectionSpecialCycle() doesn't do anything by default. Use PostProcessor.setSectionSpecialCycle() to mark a cycle as special.

onDwell(Number seconds)

onDwell() is invoked per dwell command.

onSpindleSpeed(Number spindleSpeed)

Invoked when the spindle speed changes. The property spindleSpeed specifies the current spindleSpeed.

onRapid(Number x, Number y, Number z)

onRapid() is invoked per linear rapid (high-feed) motion. Make sure to prevent dog-leg movement in the generated program.

onLinear(Number x, Number y, Number z, Number feedrate)

onLinear() is invoked per linear motion.

onCircular(Boolean clockwise, Number cx, Number cy, Number cz, Number x, Number y, Number z, Number feedrate)

onCircular() is invoked per circular motion.

onRapid5D(Number x, Number y, Number z, Number dx, Number dy, Number dz)

onRapid5D() is invoked per linear 5-axis rapid motion.

onLinear5D(Number x, Number y, Number z, Number dx, Number dy, Number dz, Number feedrate)

onLinear5D() is invoked per linear 5-axis motion.

onRewindMachine(Number a, Number b, Number c) DEPRECATED

onRewindMachine() is invoked per for simultaneous 5-axis motion when machine axis rewind is required. Note that rewinds are commonly undesired but cannot be avoided for certain machine types.

onRewindMachineEntry(Number a, Number b, Number c)

onRewindMachineEntry() is invoked per for simultaneous 5-axis motion when machine axis rewind is required. This is called before performing a machine rewind in the kernel, as onRewindMachine() is now deprecated. Several other functions need to be implemented for rewind machine to perform properly, such as onTurnTCPOff(), onRotateAxes() etc. These are marked with "Required for machine rewinds" in this manual.

onMoveToSafeRetractPosition()

Required for machine rewinds. onMoveToSafeRetractPosition() is invoked during a machine rewind procedure. It needs to output the code for retracting to safe position before indexing rotaries (usually a retract in Z).

onReturnFromSafeRetractPosition(Number x, Number y, Number z)

Required for machine rewinds. onReturnFromSafeRetractPosition() is invoked during a machine rewind procedure. It needs to output the code for returning from safe position after indexing rotaries.

onRotateAxes(Number x, Number y, Number z, Number a, Number b, Number c)

Required for machine rewinds. onRotateAxes() is invoked during a machine rewind procedure. It needs to output the code for rotating the axes to new position above re-entry position. Usually just a call to onRapid5D() with xyz disabled before the call and re-enabled after.

onMovement(Integer movement)

onMovement() is invoked when the movement type changes. The property movement specifies the current movement type.

onPower(bool power)

onPower() is invoked when the power mode changes. The property power specifies the current power mode. Used for water jet, laser cutter, and plasma cutter.

onRadiusCompensation()

onRadiusCompensation() is invoked when the radius compensation mode changes. The property radiusCompensation specifies the current radius compensation mode.

onToolCompensation(Integer compensation)

onToolCompensation() is invoked when the tool compensation mode changes. Only used for tool types for which dual compensation is defined.

onCycle()

onCycle() is invoked at the beginning of each cycle. The variable cycleType holds the unique name identifying the type of the current cycle. The parameters of the cycles are available through the cycle variable.

onCyclePoint(Number x, Number y, Number z)

onCyclePoint() is invoked for each point associated with the active cycle. onCyclePoint() is only invoked between onCycle() and onCycleEnd().

onCyclePath()

onCyclePath() is invoked at the beginning of the cycle with toolpath (e.g. turning canned cycle). onCyclePath() is only invoked between onCycle() and onCycleEnd().

onCyclePathEnd()

onCyclePathEnd() is invoked at the ending of the cycle with toolpath (e.g. turning canned cycle). onCyclePathEnd() is only invoked between onCycle() and onCycleEnd().

onCycleEnd()

onCycleEnd() is invoked on cycle termination. A corresponding onCycleEnd() is guaranteed to follow an invocation of onCycle().

onCommand(Integer command)

onCommand() is invoked for well-known commands (e.g. stop spindle).

onManualNC()

onManualNC() is invoked when any of the Manual NC commands are processed. If onManualNC is not defined the previous method will be used (onParameter, onCommand, etc.).

onMachineCommand(Integer command)

onMachineCommand() is invoked for machine commands (e.g. 28 could be mapped to M28).

onLiveAlignment()

onLiveAlignment() is invoked after the last posted operation of a Part Alignment.

onOrientateSpindle(Number angle)

onOrientateSpindle() is invoked when a specific spindle orientation is required. The function may be invoked when expanding cycles.

onLinearExtrude(Number x, Number y, Number z, Number feedrate, Number extrusionLength)

onLinearExtrude() is invoked per linear extrusion motion in an additive FFF toolpath.

onCircularExtrude(Boolean clockwise, Number cx, Number cy, Number cz, Number x, Number y, Number z, Number feed, Number extrusionLength)

onCircularExtrude() is invoked per circular extrusion motion in an additive FFF toolpath.

onLayer(Number layerNumber)

onLayer() is invoked at the start of a layer in an additive FFF or DED toolpath.

onLayerEnd(Number layerNumber)

onLayerEnd() is invoked at the end of a layer in an additive DED toolpath.

onExtrusionReset(Number length)

onExtrusionReset() is invoked when the extrusion length is reset in an additive FFF toolpath.

onExtruderChange(Number extruderId)

onExtruderChange() is invoked when the extruder is changed in an additive FFF toolpath.

onExtruderTemp(Number temp, bool wait, int extruderId)

onExtruderTemp() is invoked when the extruder temperature is changed in an additive FFF toolpath. The variable wait defines whether the process should wait to reach the desired extruder temperature before continuing.

onBedTemp(Number temp, bool wait)

onBedTemp() is invoked when the bed temperature is changed in an additive FFF toolpath. The variable wait defines whether the process should wait to reach the desired bed temperature before continuing.

onFanSpeed(Number speed, int fanId)

onFanSpeed() is invoked when the fan speed is changed in an additive FFF toolpath.

onMaxAcceleration(Number xAxis, Number yAxis, Number zAxis, Number eAxis)

onMaxAcceleration() is invoked when the max axis acceleration is changed in an additive FFF toolpath.

onAcceleration(Number travel, Number printing, Number retract)

onAcceleration() is invoked when the acceleration is changed in an additive FFF toolpath.

onJerk(Number xAxis, Number yAxis, Number zAxis, Number eAxis)

onJerk() is invoked when the axis jerk is changed in an additive FFF toolpath.

onSectionEnd()

onSectionEnd() is invoked at the termination of a section.

onSectionEndSpecialCycle()

onSectionEndSpecialCycle() is invoked at the termination of a section if the section contains a cycle that has been marked as special. onSectionEndSpecialCycle() doesn't do anything by default. Use PostProcessor.setSectionSpecialCycle() to mark a cycle as special.

onClose()

onClose() is invoked at post processing completion. This is the place to output your program footer.

onTerminate()

onTerminate() is invoked once after post processing has completed. The output file is unlocked at this point and can be moved and copied as desired.



Generated by Autodesk, Inc. 19 April 2024
Copyright (c) 2012-2024 by Autodesk, Inc.