<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Prototrak smx post processor issue please fix in HSM Post Processor Forum</title>
    <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9369859#M8862</link>
    <description>&lt;P&gt;Ok so that seemed to fix most problems all milling cycles work great although on a drilling cycle it still wants rapid across part at feed hieght??&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2020 18:08:35 GMT</pubDate>
    <dc:creator>gearheadcrawler</dc:creator>
    <dc:date>2020-03-10T18:08:35Z</dc:date>
    <item>
      <title>Prototrak smx post processor issue please fix</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9324026#M8856</link>
      <description>&lt;P&gt;The first move the machine makes is always a rapid to Z0. The prototrak conversational post processor always generates the code wrong. The rapid in x and y are on one line and the z on another causing this problem. It should post all x,y and z rapid moves on the same line for this controller please fix the problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 22:19:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9324026#M8856</guid>
      <dc:creator>gearheadcrawler</dc:creator>
      <dc:date>2020-02-17T22:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Prototrak smx post processor issue please fix</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9332754#M8857</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8614992"&gt;@gearheadcrawler&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you could work in this way&amp;nbsp;to modify first move of your Prototrak postprocessor.&lt;/P&gt;
&lt;P&gt;This is in onSection function at line 550 :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    if (!machineConfiguration.isHeadConfiguration()) {
      writeBlock(
        gAbsIncModal.format(90),
        &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;gMotionModal.format(0), xOutput.format(initialPosition.x), yOutput.format(initialPosition.y), zOutput.format(initialPosition.z));
&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;    } else {&lt;/FONT&gt;&lt;/FONT&gt;
      writeBlock(
        gAbsIncModal.format(90),
        gMotionModal.format(0),
        xOutput.format(initialPosition.x),
        yOutput.format(initialPosition.y),
        zOutput.format(initialPosition.z)
      );&lt;/PRE&gt;
&lt;P&gt;Now you will have first rapid move XYZ on the same line.&lt;/P&gt;
&lt;P&gt;Please test it carefully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 08:13:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9332754#M8857</guid>
      <dc:creator>andrea.amilo</dc:creator>
      <dc:date>2020-02-21T08:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Prototrak smx post processor issue please fix</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9337717#M8858</link>
      <description>&lt;P&gt;are you saying delete line 550 and replace with this?? im sorry ive never had to make post processor adjustments so this is new to me??&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 14:32:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9337717#M8858</guid>
      <dc:creator>gearheadcrawler</dc:creator>
      <dc:date>2020-02-24T14:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Prototrak smx post processor issue please fix</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9337775#M8859</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8614992"&gt;@gearheadcrawler&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you have to replace lines 550, 551 and 552 with the one in red.&lt;/P&gt;
&lt;P&gt;Please test it carefully and let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 14:58:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9337775#M8859</guid>
      <dc:creator>andrea.amilo</dc:creator>
      <dc:date>2020-02-24T14:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Prototrak smx post processor issue please fix</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9337982#M8860</link>
      <description>&lt;P&gt;this may be a dumb question but i have to be sure are you saying the post in red needs to go on all three lines or just delete 550 551 552 and then only paste the red code one time???&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 16:04:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9337982#M8860</guid>
      <dc:creator>gearheadcrawler</dc:creator>
      <dc:date>2020-02-24T16:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Prototrak smx post processor issue please fix</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9338086#M8861</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8614992"&gt;@gearheadcrawler&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I confirm you the line in red has to replace three original lines 500, 551, 552.&lt;/P&gt;
&lt;P&gt;Please take a look at this picture showing you a comparison between original and edited postprocessor :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="comparison.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/733553iEDCBBC41C99C9233/image-size/large?v=v2&amp;amp;px=999" role="button" title="comparison.png" alt="comparison.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 16:44:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9338086#M8861</guid>
      <dc:creator>andrea.amilo</dc:creator>
      <dc:date>2020-02-24T16:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Prototrak smx post processor issue please fix</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9369859#M8862</link>
      <description>&lt;P&gt;Ok so that seemed to fix most problems all milling cycles work great although on a drilling cycle it still wants rapid across part at feed hieght??&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 18:08:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9369859#M8862</guid>
      <dc:creator>gearheadcrawler</dc:creator>
      <dc:date>2020-03-10T18:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Prototrak smx post processor issue please fix</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9370131#M8863</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8614992"&gt;@gearheadcrawler&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think that suggested modification works in every condition, both milling and drilling cycles.&lt;/P&gt;
&lt;P&gt;Have you tested ? Have you got an example of "a drilling cycle it still wants rapid across part" ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 20:23:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9370131#M8863</guid>
      <dc:creator>andrea.amilo</dc:creator>
      <dc:date>2020-03-10T20:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Prototrak smx post processor issue please fix</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9372331#M8864</link>
      <description>&lt;P&gt;this is what I am currently using milling cycles go to retract but the drilling cycles move at feed height.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/**&lt;BR /&gt;Copyright (C) 2012-2018 by Autodesk, Inc.&lt;BR /&gt;All rights reserved.&lt;/P&gt;&lt;P&gt;ProtoTRAK GCD post processor configuration.&lt;/P&gt;&lt;P&gt;$Revision: 42473 905303e8374380273c82d214b32b7e80091ba92e $&lt;BR /&gt;$Date: 2019-09-04 07:46:02 $&lt;BR /&gt;&lt;BR /&gt;FORKID {065403A3-A589-43ef-B345-90B5274EE274}&lt;BR /&gt;*/&lt;/P&gt;&lt;P&gt;description = "ProtoTRAK GCD";&lt;BR /&gt;vendor = "Southwestern Industries";&lt;BR /&gt;vendorUrl = "&lt;A href="http://www.southwesternindustries.com" target="_blank"&gt;http://www.southwesternindustries.com&lt;/A&gt;";&lt;BR /&gt;legal = "Copyright (C) 2012-2018 by Autodesk, Inc.";&lt;BR /&gt;certificationLevel = 2;&lt;BR /&gt;minimumRevision = 40783;&lt;/P&gt;&lt;P&gt;longDescription = "Generic milling post for ProtoTRAK GCD format.";&lt;/P&gt;&lt;P&gt;extension = "gcd"; // use "cam" for some controls&lt;BR /&gt;programNameIsInteger = true;&lt;BR /&gt;setCodePage("ascii");&lt;/P&gt;&lt;P&gt;capabilities = CAPABILITY_MILLING;&lt;BR /&gt;tolerance = spatial(0.002, MM);&lt;/P&gt;&lt;P&gt;minimumChordLength = spatial(0.25, MM);&lt;BR /&gt;minimumCircularRadius = spatial(0.01, MM);&lt;BR /&gt;maximumCircularRadius = spatial(1000, MM);&lt;BR /&gt;minimumCircularSweep = toRad(0.01);&lt;BR /&gt;maximumCircularSweep = toRad(90);&lt;BR /&gt;allowHelicalMoves = true;&lt;BR /&gt;allowedCircularPlanes = undefined; // allow any circular motion&lt;/P&gt;&lt;P&gt;// user-defined properties&lt;BR /&gt;properties = {&lt;BR /&gt;writeMachine: true, // write machine&lt;BR /&gt;writeTools: true, // writes the tools&lt;BR /&gt;preloadTool: true, // preloads next tool on tool change if any&lt;BR /&gt;showSequenceNumbers: true, // show sequence numbers&lt;BR /&gt;sequenceNumberStart: 10, // first sequence number&lt;BR /&gt;sequenceNumberIncrement: 5, // increment for sequence numbers&lt;BR /&gt;optionalStop: true, // optional stop&lt;BR /&gt;separateWordsWithSpace: true, // specifies that the words should be separated with a white space&lt;BR /&gt;useRigidTapping: "yes", // output rigid tapping block&lt;BR /&gt;circularOutsideXY: false // circular in YZ and ZX planes&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;// user-defined property definitions&lt;BR /&gt;propertyDefinitions = {&lt;BR /&gt;writeMachine: {title:"Write machine", description:"Output the machine settings in the header of the code.", group:0, type:"boolean"},&lt;BR /&gt;writeTools: {title:"Write tool list", description:"Output a tool list in the header of the code.", group:0, type:"boolean"},&lt;BR /&gt;preloadTool: {title:"Preload tool", description:"Preloads the next tool at a tool change (if any).", group:1, type:"boolean"},&lt;BR /&gt;showSequenceNumbers: {title:"Use sequence numbers", description:"Use sequence numbers for each block of outputted code.", group:1, type:"boolean"},&lt;BR /&gt;sequenceNumberStart: {title:"Start sequence number", description:"The number at which to start the sequence numbers.", group:1, type:"integer"},&lt;BR /&gt;sequenceNumberIncrement: {title:"Sequence number increment", description:"The amount by which the sequence number is incremented by in each block.", group:1, type:"integer"},&lt;BR /&gt;optionalStop: {title:"Optional stop", description:"Outputs optional stop code during when necessary in the code.", type:"boolean"},&lt;BR /&gt;separateWordsWithSpace: {title:"Separate words with space", description:"Adds spaces between words if 'yes' is selected.", type:"boolean"},&lt;BR /&gt;useRigidTapping: {&lt;BR /&gt;title: "Use rigid tapping",&lt;BR /&gt;description: "Select 'Yes' to enable, 'No' to disable, or 'Without spindle direction' to enable rigid tapping without outputting the spindle direction block.",&lt;BR /&gt;type: "enum",&lt;BR /&gt;values:[&lt;BR /&gt;{title:"Yes", id:"yes"},&lt;BR /&gt;{title:"No", id:"no"},&lt;BR /&gt;{title:"Without spindle direction", id:"without"}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;circularOutsideXY: {title:"Allow circular outside of XY-plane", description:"Allow circular interpolation to be output in the YZ and ZX planes.", group:0, type:"boolean"}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var permittedCommentChars = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,=_-";&lt;/P&gt;&lt;P&gt;var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines&lt;BR /&gt;// samples:&lt;BR /&gt;// {id:aaCOOLANT_THROUGH_TOOL, on: 88, off: 89}&lt;BR /&gt;// {id: COOLANT_THROUGH_TOOL, on: [8, 88], off: [9, 89]}&lt;BR /&gt;var coolants = [&lt;BR /&gt;{id: COOLANT_FLOOD, on: 8},&lt;BR /&gt;{id: COOLANT_MIST, on: 7},&lt;BR /&gt;{id: COOLANT_THROUGH_TOOL},&lt;BR /&gt;{id: COOLANT_AIR},&lt;BR /&gt;{id: COOLANT_AIR_THROUGH_TOOL},&lt;BR /&gt;{id: COOLANT_SUCTION},&lt;BR /&gt;{id: COOLANT_FLOOD_MIST},&lt;BR /&gt;{id: COOLANT_FLOOD_THROUGH_TOOL},&lt;BR /&gt;{id: COOLANT_OFF, off: 9}&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;var gFormat = createFormat({prefix:"G", width:2, zeropad:true, decimals:0});&lt;BR /&gt;var mFormat = createFormat({prefix:"M", width:2, zeropad:true, decimals:0});&lt;BR /&gt;var hFormat = createFormat({prefix:"H", width:2, zeropad:true, decimals:0});&lt;BR /&gt;var dFormat = createFormat({prefix:"D", width:2, zeropad:true, decimals:0});&lt;BR /&gt;var nFormat = createFormat({prefix:"N", width:4, zeropad:true, decimals:0});&lt;/P&gt;&lt;P&gt;var xyzFormat = createFormat({decimals:(unit == MM ? 4 : 4), forceDecimal:true});&lt;BR /&gt;var rFormat = xyzFormat; // radius&lt;BR /&gt;var abcFormat = createFormat({decimals:3, forceDecimal:true});&lt;BR /&gt;var feedFormat = createFormat({decimals:(unit == MM ? 0 : 1), forceDecimal:true});&lt;BR /&gt;var toolFormat = createFormat({width:2, zeropad:true, decimals:0});&lt;BR /&gt;var rpmFormat = createFormat({decimals:0});&lt;BR /&gt;var secFormat = createFormat({decimals:3, forceDecimal:true}); // seconds - range 0.001-99999.999&lt;BR /&gt;var milliFormat = createFormat({decimals:0}); // milliseconds // range 1-9999&lt;BR /&gt;var taperFormat = createFormat({decimals:1, scale:DEG});&lt;/P&gt;&lt;P&gt;var xOutput = createVariable({prefix:"X"}, xyzFormat);&lt;BR /&gt;var yOutput = createVariable({prefix:"Y"}, xyzFormat);&lt;BR /&gt;var zOutput = createVariable({onchange: function() {retracted = false;}, prefix: "Z"}, xyzFormat);&lt;BR /&gt;var aOutput = createVariable({prefix:"A"}, abcFormat);&lt;BR /&gt;var bOutput = createVariable({prefix:"B"}, abcFormat);&lt;BR /&gt;var cOutput = createVariable({prefix:"C"}, abcFormat);&lt;BR /&gt;var feedOutput = createVariable({prefix:"F"}, feedFormat);&lt;BR /&gt;var sOutput = createVariable({prefix:"S", force:true}, rpmFormat);&lt;BR /&gt;var dOutput = createVariable({}, dFormat);&lt;/P&gt;&lt;P&gt;// circular output&lt;BR /&gt;var iOutput = createReferenceVariable({prefix:"I", force:true}, xyzFormat);&lt;BR /&gt;var jOutput = createReferenceVariable({prefix:"J", force:true}, xyzFormat);&lt;BR /&gt;var kOutput = createReferenceVariable({prefix:"K", force:true}, xyzFormat);&lt;/P&gt;&lt;P&gt;var gMotionModal = createModal({}, gFormat); // modal group 1 // G0-G3, ...&lt;BR /&gt;var gPlaneModal = createModal({onchange:function () {gMotionModal.reset();}}, gFormat); // modal group 2 // G17-19&lt;BR /&gt;var gAbsIncModal = createModal({}, gFormat); // modal group 3 // G90-91&lt;BR /&gt;var gFeedModeModal = createModal({}, gFormat); // modal group 5 // G93-94&lt;BR /&gt;var gUnitModal = createModal({}, gFormat); // modal group 6 // G20-21&lt;BR /&gt;var gCycleModal = createModal({}, gFormat); // modal group 9 // G81, ...&lt;BR /&gt;var gRetractModal = createModal({}, gFormat); // modal group 10 // G98-99&lt;/P&gt;&lt;P&gt;var WARNING_WORK_OFFSET = 0;&lt;/P&gt;&lt;P&gt;// collected state&lt;BR /&gt;var sequenceNumber;&lt;BR /&gt;var currentWorkOffset;&lt;BR /&gt;var retracted = false; // specifies that the tool has been retracted to the safe plane&lt;/P&gt;&lt;P&gt;/**&lt;BR /&gt;Writes the specified block.&lt;BR /&gt;*/&lt;BR /&gt;function writeBlock() {&lt;BR /&gt;if (!formatWords(arguments)) {&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;if (properties.showSequenceNumbers) {&lt;BR /&gt;writeWords2(nFormat.format(sequenceNumber % 100000), arguments);&lt;BR /&gt;sequenceNumber += properties.sequenceNumberIncrement;&lt;BR /&gt;} else {&lt;BR /&gt;writeWords(arguments);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/**&lt;BR /&gt;Output a comment.&lt;BR /&gt;*/&lt;BR /&gt;function writeComment(text) {&lt;BR /&gt;writeln("(" + filterText(String(text).toUpperCase(), permittedCommentChars) + ")");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onOpen() {&lt;BR /&gt;if (!properties.circularOutsideXY) {&lt;BR /&gt;allowedCircularPlanes = (1 &amp;lt;&amp;lt; PLANE_XY); // allow XY-plane circular motion&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (!machineConfiguration.isMachineCoordinate(0)) {&lt;BR /&gt;aOutput.disable();&lt;BR /&gt;}&lt;BR /&gt;if (!machineConfiguration.isMachineCoordinate(1)) {&lt;BR /&gt;bOutput.disable();&lt;BR /&gt;}&lt;BR /&gt;if (!machineConfiguration.isMachineCoordinate(2)) {&lt;BR /&gt;cOutput.disable();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if (!properties.separateWordsWithSpace) {&lt;BR /&gt;setWordSeparator("");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;sequenceNumber = properties.sequenceNumberStart;&lt;/P&gt;&lt;P&gt;if (programName) {&lt;BR /&gt;writeComment(programName);&lt;BR /&gt;}&lt;BR /&gt;if (programComment) {&lt;BR /&gt;writeComment(programComment);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// dump machine configuration&lt;BR /&gt;var vendor = machineConfiguration.getVendor();&lt;BR /&gt;var model = machineConfiguration.getModel();&lt;BR /&gt;var description = machineConfiguration.getDescription();&lt;/P&gt;&lt;P&gt;if (properties.writeMachine &amp;amp;&amp;amp; (vendor || model || description)) {&lt;BR /&gt;writeComment(localize("Machine"));&lt;BR /&gt;if (vendor) {&lt;BR /&gt;writeComment(" " + localize("vendor") + ": " + vendor);&lt;BR /&gt;}&lt;BR /&gt;if (model) {&lt;BR /&gt;writeComment(" " + localize("model") + ": " + model);&lt;BR /&gt;}&lt;BR /&gt;if (description) {&lt;BR /&gt;writeComment(" " + localize("description") + ": " + description);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// dump tool information&lt;BR /&gt;if (properties.writeTools) {&lt;BR /&gt;var zRanges = {};&lt;BR /&gt;if (is3D()) {&lt;BR /&gt;var numberOfSections = getNumberOfSections();&lt;BR /&gt;for (var i = 0; i &amp;lt; numberOfSections; ++i) {&lt;BR /&gt;var section = getSection(i);&lt;BR /&gt;var zRange = section.getGlobalZRange();&lt;BR /&gt;var tool = section.getTool();&lt;BR /&gt;if (zRanges[tool.number]) {&lt;BR /&gt;zRanges[tool.number].expandToRange(zRange);&lt;BR /&gt;} else {&lt;BR /&gt;zRanges[tool.number] = zRange;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var tools = getToolTable();&lt;BR /&gt;if (tools.getNumberOfTools() &amp;gt; 0) {&lt;BR /&gt;for (var i = 0; i &amp;lt; tools.getNumberOfTools(); ++i) {&lt;BR /&gt;var tool = tools.getTool(i);&lt;BR /&gt;var comment = "T" + toolFormat.format(tool.number) + " " +&lt;BR /&gt;"D=" + xyzFormat.format(tool.diameter) + " " +&lt;BR /&gt;localize("CR") + "=" + xyzFormat.format(tool.cornerRadius);&lt;BR /&gt;if ((tool.taperAngle &amp;gt; 0) &amp;amp;&amp;amp; (tool.taperAngle &amp;lt; Math.PI)) {&lt;BR /&gt;comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg");&lt;BR /&gt;}&lt;BR /&gt;if (zRanges[tool.number]) {&lt;BR /&gt;comment += " - " + localize("ZMIN") + "=" + xyzFormat.format(zRanges[tool.number].getMinimum());&lt;BR /&gt;}&lt;BR /&gt;comment += " - " + getToolTypeName(tool.type);&lt;BR /&gt;writeComment(comment);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if ((getNumberOfSections() &amp;gt; 0) &amp;amp;&amp;amp; (getSection(0).workOffset == 0)) {&lt;BR /&gt;for (var i = 0; i &amp;lt; getNumberOfSections(); ++i) {&lt;BR /&gt;if (getSection(i).workOffset &amp;gt; 0) {&lt;BR /&gt;error(localize("Using multiple work offsets is not possible if the initial work offset is 0."));&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// absolute coordinates and feed per min&lt;BR /&gt;writeBlock(gAbsIncModal.format(90), gFeedModeModal.format(94), gPlaneModal.format(17));&lt;/P&gt;&lt;P&gt;switch (unit) {&lt;BR /&gt;case IN:&lt;BR /&gt;writeBlock(gUnitModal.format(20));&lt;BR /&gt;break;&lt;BR /&gt;case MM:&lt;BR /&gt;writeBlock(gUnitModal.format(21));&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onComment(message) {&lt;BR /&gt;writeComment(message);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/** Force output of X, Y, and Z. */&lt;BR /&gt;function forceXYZ() {&lt;BR /&gt;xOutput.reset();&lt;BR /&gt;yOutput.reset();&lt;BR /&gt;zOutput.reset();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/** Force output of A, B, and C. */&lt;BR /&gt;function forceABC() {&lt;BR /&gt;aOutput.reset();&lt;BR /&gt;bOutput.reset();&lt;BR /&gt;cOutput.reset();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/** Force output of X, Y, Z, A, B, C, and F on next output. */&lt;BR /&gt;function forceAny() {&lt;BR /&gt;forceXYZ();&lt;BR /&gt;forceABC();&lt;BR /&gt;feedOutput.reset();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var currentWorkPlaneABC = undefined;&lt;/P&gt;&lt;P&gt;function forceWorkPlane() {&lt;BR /&gt;currentWorkPlaneABC = undefined;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function setWorkPlane(abc) {&lt;BR /&gt;if (!machineConfiguration.isMultiAxisConfiguration()) {&lt;BR /&gt;return; // ignore&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (!((currentWorkPlaneABC == undefined) ||&lt;BR /&gt;abcFormat.areDifferent(abc.x, currentWorkPlaneABC.x) ||&lt;BR /&gt;abcFormat.areDifferent(abc.y, currentWorkPlaneABC.y) ||&lt;BR /&gt;abcFormat.areDifferent(abc.z, currentWorkPlaneABC.z))) {&lt;BR /&gt;return; // no change&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;onCommand(COMMAND_UNLOCK_MULTI_AXIS);&lt;/P&gt;&lt;P&gt;// NOTE: add retract here&lt;/P&gt;&lt;P&gt;writeBlock(&lt;BR /&gt;gMotionModal.format(0),&lt;BR /&gt;conditional(machineConfiguration.isMachineCoordinate(0), "A" + abcFormat.format(abc.x)),&lt;BR /&gt;conditional(machineConfiguration.isMachineCoordinate(1), "B" + abcFormat.format(abc.y)),&lt;BR /&gt;conditional(machineConfiguration.isMachineCoordinate(2), "C" + abcFormat.format(abc.z))&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;onCommand(COMMAND_LOCK_MULTI_AXIS);&lt;/P&gt;&lt;P&gt;currentWorkPlaneABC = abc;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var closestABC = false; // choose closest machine angles&lt;BR /&gt;var currentMachineABC;&lt;/P&gt;&lt;P&gt;function getWorkPlaneMachineABC(workPlane) {&lt;BR /&gt;var W = workPlane; // map to global frame&lt;/P&gt;&lt;P&gt;var abc = machineConfiguration.getABC(W);&lt;BR /&gt;if (closestABC) {&lt;BR /&gt;if (currentMachineABC) {&lt;BR /&gt;abc = machineConfiguration.remapToABC(abc, currentMachineABC);&lt;BR /&gt;} else {&lt;BR /&gt;abc = machineConfiguration.getPreferredABC(abc);&lt;BR /&gt;}&lt;BR /&gt;} else {&lt;BR /&gt;abc = machineConfiguration.getPreferredABC(abc);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;try {&lt;BR /&gt;abc = machineConfiguration.remapABC(abc);&lt;BR /&gt;currentMachineABC = abc;&lt;BR /&gt;} catch (e) {&lt;BR /&gt;error(&lt;BR /&gt;localize("Machine angles not supported") + ":"&lt;BR /&gt;+ conditional(machineConfiguration.isMachineCoordinate(0), " A" + abcFormat.format(abc.x))&lt;BR /&gt;+ conditional(machineConfiguration.isMachineCoordinate(1), " B" + abcFormat.format(abc.y))&lt;BR /&gt;+ conditional(machineConfiguration.isMachineCoordinate(2), " C" + abcFormat.format(abc.z))&lt;BR /&gt;);&lt;BR /&gt;return abc;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;var direction = machineConfiguration.getDirection(abc);&lt;BR /&gt;if (!isSameDirection(direction, W.forward)) {&lt;BR /&gt;error(localize("Orientation not supported."));&lt;BR /&gt;return abc;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if (!machineConfiguration.isABCSupported(abc)) {&lt;BR /&gt;error(&lt;BR /&gt;localize("Work plane is not supported") + ":"&lt;BR /&gt;+ conditional(machineConfiguration.isMachineCoordinate(0), " A" + abcFormat.format(abc.x))&lt;BR /&gt;+ conditional(machineConfiguration.isMachineCoordinate(1), " B" + abcFormat.format(abc.y))&lt;BR /&gt;+ conditional(machineConfiguration.isMachineCoordinate(2), " C" + abcFormat.format(abc.z))&lt;BR /&gt;);&lt;BR /&gt;return abc;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var tcp = false;&lt;BR /&gt;if (tcp) {&lt;BR /&gt;setRotation(W); // TCP mode&lt;BR /&gt;} else {&lt;BR /&gt;var O = machineConfiguration.getOrientation(abc);&lt;BR /&gt;var R = machineConfiguration.getRemainingOrientation(abc, W);&lt;BR /&gt;setRotation(R);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;return abc;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function isProbeOperation() {&lt;BR /&gt;return (hasParameter("operation-strategy") &amp;amp;&amp;amp;&lt;BR /&gt;getParameter("operation-strategy") == "probe");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onSection() {&lt;BR /&gt;var insertToolCall = isFirstSection() ||&lt;BR /&gt;currentSection.getForceToolChange &amp;amp;&amp;amp; currentSection.getForceToolChange() ||&lt;BR /&gt;(tool.number != getPreviousSection().getTool().number);&lt;BR /&gt;&lt;BR /&gt;retracted = false; // specifies that the tool has been retracted to the safe plane&lt;BR /&gt;var newWorkOffset = isFirstSection() ||&lt;BR /&gt;(getPreviousSection().workOffset != currentSection.workOffset); // work offset changes&lt;BR /&gt;var newWorkPlane = isFirstSection() ||&lt;BR /&gt;!isSameDirection(getPreviousSection().getGlobalFinalToolAxis(), currentSection.getGlobalInitialToolAxis()) ||&lt;BR /&gt;(currentSection.isOptimizedForMachine() &amp;amp;&amp;amp; getPreviousSection().isOptimizedForMachine() &amp;amp;&amp;amp;&lt;BR /&gt;Vector.diff(getPreviousSection().getFinalToolAxisABC(), currentSection.getInitialToolAxisABC()).length &amp;gt; 1e-4) ||&lt;BR /&gt;(!machineConfiguration.isMultiAxisConfiguration() &amp;amp;&amp;amp; currentSection.isMultiAxis()) ||&lt;BR /&gt;(!getPreviousSection().isMultiAxis() &amp;amp;&amp;amp; currentSection.isMultiAxis() ||&lt;BR /&gt;getPreviousSection().isMultiAxis() &amp;amp;&amp;amp; !currentSection.isMultiAxis()); // force newWorkPlane between indexing and simultaneous operations&lt;BR /&gt;&lt;BR /&gt;if (hasParameter("operation-comment")) {&lt;BR /&gt;var comment = getParameter("operation-comment");&lt;BR /&gt;if (comment) {&lt;BR /&gt;writeComment(comment);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (insertToolCall) {&lt;BR /&gt;forceWorkPlane();&lt;BR /&gt;&lt;BR /&gt;setCoolant(COOLANT_OFF);&lt;BR /&gt;&lt;BR /&gt;if (!isFirstSection() &amp;amp;&amp;amp; properties.optionalStop) {&lt;BR /&gt;onCommand(COMMAND_OPTIONAL_STOP);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (tool.number &amp;gt; 99) {&lt;BR /&gt;warning(localize("Tool number exceeds maximum value."));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;writeBlock("T" + toolFormat.format(tool.number), mFormat.format(6));&lt;BR /&gt;if (tool.comment) {&lt;BR /&gt;writeComment(tool.comment);&lt;BR /&gt;}&lt;BR /&gt;var showToolZMin = false;&lt;BR /&gt;if (showToolZMin) {&lt;BR /&gt;if (is3D()) {&lt;BR /&gt;var numberOfSections = getNumberOfSections();&lt;BR /&gt;var zRange = currentSection.getGlobalZRange();&lt;BR /&gt;var number = tool.number;&lt;BR /&gt;for (var i = currentSection.getId() + 1; i &amp;lt; numberOfSections; ++i) {&lt;BR /&gt;var section = getSection(i);&lt;BR /&gt;if (section.getTool().number != number) {&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;zRange.expandToRange(section.getGlobalZRange());&lt;BR /&gt;}&lt;BR /&gt;writeComment(localize("ZMIN") + "=" + zRange.getMinimum());&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (properties.preloadTool) {&lt;BR /&gt;var nextTool = getNextTool(tool.number);&lt;BR /&gt;if (nextTool) {&lt;BR /&gt;writeBlock("T" + toolFormat.format(nextTool.number));&lt;BR /&gt;} else {&lt;BR /&gt;// preload first tool&lt;BR /&gt;var section = getSection(0);&lt;BR /&gt;var firstToolNumber = section.getTool().number;&lt;BR /&gt;if (tool.number != firstToolNumber) {&lt;BR /&gt;writeBlock("T" + toolFormat.format(firstToolNumber));&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if (insertToolCall ||&lt;BR /&gt;isFirstSection() ||&lt;BR /&gt;(rpmFormat.areDifferent(spindleSpeed, sOutput.getCurrent())) ||&lt;BR /&gt;(tool.clockwise != getPreviousSection().getTool().clockwise)) {&lt;BR /&gt;if (spindleSpeed &amp;lt; 1) {&lt;BR /&gt;error(localize("Spindle speed out of range."));&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;if (spindleSpeed &amp;gt; 99999) {&lt;BR /&gt;warning(localize("Spindle speed exceeds maximum value."));&lt;BR /&gt;}&lt;BR /&gt;var tapping = hasParameter("operation:cycleType") &amp;amp;&amp;amp;&lt;BR /&gt;((getParameter("operation:cycleType") == "tapping") ||&lt;BR /&gt;(getParameter("operation:cycleType") == "right-tapping") ||&lt;BR /&gt;(getParameter("operation:cycleType") == "left-tapping") ||&lt;BR /&gt;(getParameter("operation:cycleType") == "tapping-with-chip-breaking"));&lt;BR /&gt;if (!tapping || (tapping &amp;amp;&amp;amp; !(properties.useRigidTapping == "without"))) {&lt;BR /&gt;writeBlock(&lt;BR /&gt;sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4)&lt;BR /&gt;);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// wcs&lt;BR /&gt;if (insertToolCall) { // force work offset when changing tool&lt;BR /&gt;currentWorkOffset = undefined;&lt;BR /&gt;}&lt;BR /&gt;var workOffset = currentSection.workOffset;&lt;BR /&gt;if (workOffset == 0) {&lt;BR /&gt;warningOnce(localize("Work offset has not been specified. Using G54 as WCS."), WARNING_WORK_OFFSET);&lt;BR /&gt;workOffset = 1;&lt;BR /&gt;}&lt;BR /&gt;if (workOffset &amp;gt; 0) {&lt;BR /&gt;if (workOffset &amp;gt; 6) {&lt;BR /&gt;error(localize("Work offset out of range."));&lt;BR /&gt;return;&lt;BR /&gt;} else {&lt;BR /&gt;if (workOffset != currentWorkOffset) {&lt;BR /&gt;writeBlock(gFormat.format(53 + workOffset)); // G54-&amp;gt;G59&lt;BR /&gt;currentWorkOffset = workOffset;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;forceXYZ();&lt;/P&gt;&lt;P&gt;if (machineConfiguration.isMultiAxisConfiguration()) { // use 5-axis indexing for multi-axis mode&lt;BR /&gt;// set working plane after datum shift&lt;/P&gt;&lt;P&gt;var abc = new Vector(0, 0, 0);&lt;BR /&gt;if (currentSection.isMultiAxis()) {&lt;BR /&gt;forceWorkPlane();&lt;BR /&gt;cancelTransformation();&lt;BR /&gt;} else {&lt;BR /&gt;abc = getWorkPlaneMachineABC(currentSection.workPlane);&lt;BR /&gt;}&lt;BR /&gt;setWorkPlane(abc);&lt;BR /&gt;} else { // pure 3D&lt;BR /&gt;var remaining = currentSection.workPlane;&lt;BR /&gt;if (!isSameDirection(remaining.forward, new Vector(0, 0, 1))) {&lt;BR /&gt;error(localize("Tool orientation is not supported."));&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;setRotation(remaining);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// set coolant after we have positioned at Z&lt;BR /&gt;setCoolant(tool.coolant);&lt;/P&gt;&lt;P&gt;forceAny();&lt;BR /&gt;gMotionModal.reset();&lt;/P&gt;&lt;P&gt;var initialPosition = getFramePosition(currentSection.getInitialPosition());&lt;BR /&gt;if (!retracted &amp;amp;&amp;amp; !insertToolCall) {&lt;BR /&gt;if (getCurrentPosition().z &amp;lt; initialPosition.z) {&lt;BR /&gt;writeBlock(gMotionModal.format(0), zOutput.format(initialPosition.z));&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (insertToolCall || retracted) {&lt;BR /&gt;var lengthOffset = tool.lengthOffset;&lt;BR /&gt;if (lengthOffset &amp;gt; 99) {&lt;BR /&gt;error(localize("Length offset out of range."));&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;gMotionModal.reset();&lt;BR /&gt;writeBlock(gPlaneModal.format(17));&lt;BR /&gt;&lt;BR /&gt;if (!machineConfiguration.isHeadConfiguration()) {&lt;BR /&gt;writeBlock(&lt;BR /&gt;gAbsIncModal.format(90),&lt;BR /&gt;gMotionModal.format(0), xOutput.format(initialPosition.x), yOutput.format(initialPosition.y), zOutput.format(initialPosition.z)&lt;BR /&gt;);&lt;BR /&gt;writeBlock(gMotionModal.format(0), zOutput.format(initialPosition.z));&lt;BR /&gt;} else {&lt;BR /&gt;writeBlock(&lt;BR /&gt;gAbsIncModal.format(90),&lt;BR /&gt;gMotionModal.format(0),&lt;BR /&gt;xOutput.format(initialPosition.x),&lt;BR /&gt;yOutput.format(initialPosition.y),&lt;BR /&gt;zOutput.format(initialPosition.z)&lt;BR /&gt;);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;gMotionModal.reset();&lt;BR /&gt;} else {&lt;BR /&gt;writeBlock(&lt;BR /&gt;gAbsIncModal.format(90),&lt;BR /&gt;gMotionModal.format(0),&lt;BR /&gt;xOutput.format(initialPosition.x),&lt;BR /&gt;yOutput.format(initialPosition.y)&lt;BR /&gt;);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onDwell(seconds) {&lt;BR /&gt;if (seconds &amp;gt; 99999.999) {&lt;BR /&gt;warning(localize("Dwelling time is out of range."));&lt;BR /&gt;}&lt;BR /&gt;milliseconds = clamp(1, seconds * 1000, 99999999);&lt;BR /&gt;writeBlock(gFeedModeModal.format(94), gFormat.format(4), "P" + milliFormat.format(milliseconds));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onSpindleSpeed(spindleSpeed) {&lt;BR /&gt;writeBlock(sOutput.format(spindleSpeed));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onCycle() {&lt;BR /&gt;writeBlock(gPlaneModal.format(17));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function getCommonCycle(x, y, z, r) {&lt;BR /&gt;forceXYZ(); // force xyz on first drill hole of any cycle&lt;BR /&gt;return [xOutput.format(x), yOutput.format(y),&lt;BR /&gt;zOutput.format(z),&lt;BR /&gt;"R" + xyzFormat.format(r)];&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onCyclePoint(x, y, z) {&lt;BR /&gt;if (!isSameDirection(getRotation().forward, new Vector(0, 0, 1))) {&lt;BR /&gt;expandCyclePoint(x, y, z);&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;if (isFirstCyclePoint()) {&lt;BR /&gt;repositionToCycleClearance(cycle, x, y, z);&lt;BR /&gt;&lt;BR /&gt;// return to initial Z which is clearance plane and set absolute mode&lt;/P&gt;&lt;P&gt;var F = cycle.feedrate;&lt;BR /&gt;var P = !cycle.dwell ? 0 : clamp(1, cycle.dwell * 1000, 99999999); // in milliseconds&lt;/P&gt;&lt;P&gt;switch (cycleType) {&lt;BR /&gt;case "drilling":&lt;BR /&gt;writeBlock(&lt;BR /&gt;gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(81),&lt;BR /&gt;getCommonCycle(x, y, z, cycle.retract),&lt;BR /&gt;feedOutput.format(F)&lt;BR /&gt;);&lt;BR /&gt;break;&lt;BR /&gt;case "counter-boring":&lt;BR /&gt;if (P &amp;gt; 0) {&lt;BR /&gt;writeBlock(&lt;BR /&gt;gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(82),&lt;BR /&gt;getCommonCycle(x, y, z, cycle.retract),&lt;BR /&gt;"P" + milliFormat.format(P),&lt;BR /&gt;feedOutput.format(F)&lt;BR /&gt;);&lt;BR /&gt;} else {&lt;BR /&gt;writeBlock(&lt;BR /&gt;gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(81),&lt;BR /&gt;getCommonCycle(x, y, z, cycle.retract),&lt;BR /&gt;feedOutput.format(F)&lt;BR /&gt;);&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;case "chip-breaking":&lt;BR /&gt;expandCyclePoint(x, y, z);&lt;BR /&gt;break;&lt;BR /&gt;case "deep-drilling":&lt;BR /&gt;if (P &amp;gt; 0) {&lt;BR /&gt;expandCyclePoint(x, y, z);&lt;BR /&gt;} else {&lt;BR /&gt;writeBlock(&lt;BR /&gt;gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(83),&lt;BR /&gt;getCommonCycle(x, y, z, cycle.retract),&lt;BR /&gt;"Q" + xyzFormat.format(cycle.incrementalDepth),&lt;BR /&gt;// conditional(P &amp;gt; 0, "P" + milliFormat.format(P)),&lt;BR /&gt;feedOutput.format(F)&lt;BR /&gt;);&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;case "tapping":&lt;BR /&gt;F = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed);&lt;BR /&gt;if (properties.useRigidTapping != "no") {&lt;BR /&gt;writeBlock(mFormat.format(29), sOutput.format(spindleSpeed));&lt;BR /&gt;}&lt;BR /&gt;writeBlock(&lt;BR /&gt;gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND) ? 74 : 84),&lt;BR /&gt;getCommonCycle(x, y, z, cycle.retract),&lt;BR /&gt;"P" + milliFormat.format(P),&lt;BR /&gt;feedOutput.format(F)&lt;BR /&gt;);&lt;BR /&gt;break;&lt;BR /&gt;case "left-tapping":&lt;BR /&gt;F = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed);&lt;BR /&gt;if (properties.useRigidTapping != "no") {&lt;BR /&gt;writeBlock(mFormat.format(29), sOutput.format(spindleSpeed));&lt;BR /&gt;}&lt;BR /&gt;writeBlock(&lt;BR /&gt;gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(74),&lt;BR /&gt;getCommonCycle(x, y, z, cycle.retract),&lt;BR /&gt;"P" + milliFormat.format(P),&lt;BR /&gt;feedOutput.format(F)&lt;BR /&gt;);&lt;BR /&gt;break;&lt;BR /&gt;case "right-tapping":&lt;BR /&gt;F = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed);&lt;BR /&gt;if (properties.useRigidTapping != "no") {&lt;BR /&gt;writeBlock(mFormat.format(29), sOutput.format(spindleSpeed));&lt;BR /&gt;}&lt;BR /&gt;writeBlock(&lt;BR /&gt;gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(84),&lt;BR /&gt;getCommonCycle(x, y, z, cycle.retract),&lt;BR /&gt;"P" + milliFormat.format(P),&lt;BR /&gt;feedOutput.format(F)&lt;BR /&gt;);&lt;BR /&gt;break;&lt;BR /&gt;case "reaming":&lt;BR /&gt;if (P &amp;gt; 0) {&lt;BR /&gt;writeBlock(&lt;BR /&gt;gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(89),&lt;BR /&gt;getCommonCycle(x, y, z, cycle.retract),&lt;BR /&gt;"P" + milliFormat.format(P),&lt;BR /&gt;feedOutput.format(F)&lt;BR /&gt;);&lt;BR /&gt;} else {&lt;BR /&gt;writeBlock(&lt;BR /&gt;gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(85),&lt;BR /&gt;getCommonCycle(x, y, z, cycle.retract),&lt;BR /&gt;feedOutput.format(F)&lt;BR /&gt;);&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;case "boring":&lt;BR /&gt;if (P &amp;gt; 0) {&lt;BR /&gt;writeBlock(&lt;BR /&gt;gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(89),&lt;BR /&gt;getCommonCycle(x, y, z, cycle.retract),&lt;BR /&gt;"P" + milliFormat.format(P), // not optional&lt;BR /&gt;feedOutput.format(F)&lt;BR /&gt;);&lt;BR /&gt;} else {&lt;BR /&gt;writeBlock(&lt;BR /&gt;gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(85),&lt;BR /&gt;getCommonCycle(x, y, z, cycle.retract),&lt;BR /&gt;feedOutput.format(F)&lt;BR /&gt;);&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;expandCyclePoint(x, y, z);&lt;BR /&gt;}&lt;BR /&gt;} else {&lt;BR /&gt;if (cycleExpanded) {&lt;BR /&gt;expandCyclePoint(x, y, z);&lt;BR /&gt;} else {&lt;BR /&gt;writeBlock(xOutput.format(x), yOutput.format(y));&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onCycleEnd() {&lt;BR /&gt;if (!cycleExpanded) {&lt;BR /&gt;writeBlock(gCycleModal.format(80));&lt;BR /&gt;zOutput.reset();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var pendingRadiusCompensation = -1;&lt;/P&gt;&lt;P&gt;function onRadiusCompensation() {&lt;BR /&gt;if (hasParameter("operation:compensationType") &amp;amp;&amp;amp; (getParameter("operation:compensationType") == "control") &amp;amp;&amp;amp;&lt;BR /&gt;(radiusCompensation != RADIUS_COMPENSATION_OFF)) {&lt;BR /&gt;error(localize("Radius compensation 'In control' is not supported. Use 'Wear' instead."));&lt;BR /&gt;}&lt;BR /&gt;pendingRadiusCompensation = radiusCompensation;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onRapid(_x, _y, _z) {&lt;BR /&gt;var x = xOutput.format(_x);&lt;BR /&gt;var y = yOutput.format(_y);&lt;BR /&gt;var z = zOutput.format(_z);&lt;BR /&gt;if (x || y || z) {&lt;BR /&gt;if (pendingRadiusCompensation &amp;gt;= 0) {&lt;BR /&gt;error(localize("Radius compensation mode cannot be changed at rapid traversal."));&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;//writeln("G00")&lt;BR /&gt;writeBlock(gMotionModal.format(0), x, y, z);&lt;BR /&gt;feedOutput.reset();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onLinear(_x, _y, _z, feed) {&lt;BR /&gt;var x = xOutput.format(_x);&lt;BR /&gt;var y = yOutput.format(_y);&lt;BR /&gt;var z = zOutput.format(_z);&lt;BR /&gt;var f = feedOutput.format(feed);&lt;BR /&gt;if (x || y || z) {&lt;BR /&gt;if (pendingRadiusCompensation &amp;gt;= 0) {&lt;BR /&gt;pendingRadiusCompensation = -1;&lt;BR /&gt;writeBlock(gPlaneModal.format(17));&lt;BR /&gt;switch (radiusCompensation) {&lt;BR /&gt;case RADIUS_COMPENSATION_LEFT:&lt;BR /&gt;dOutput.reset();&lt;BR /&gt;writeBlock(gFormat.format(41));&lt;BR /&gt;writeBlock(gMotionModal.format(1), x, y, z, f);&lt;BR /&gt;break;&lt;BR /&gt;case RADIUS_COMPENSATION_RIGHT:&lt;BR /&gt;dOutput.reset();&lt;BR /&gt;writeBlock(gFormat.format(42));&lt;BR /&gt;writeBlock(gMotionModal.format(1), x, y, z, f);&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;writeBlock(gFormat.format(40));&lt;BR /&gt;writeBlock(gMotionModal.format(1), x, y, z, f);&lt;BR /&gt;}&lt;BR /&gt;} else {&lt;BR /&gt;writeBlock(gMotionModal.format(1), x, y, z, f);&lt;BR /&gt;}&lt;BR /&gt;} else if (f) {&lt;BR /&gt;if (getNextRecord().isMotion()) { // try not to output feed without motion&lt;BR /&gt;feedOutput.reset(); // force feed on next line&lt;BR /&gt;} else {&lt;BR /&gt;writeBlock(gMotionModal.format(1), f);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onRapid5D(_x, _y, _z, _a, _b, _c) {&lt;BR /&gt;if (!currentSection.isOptimizedForMachine()) {&lt;BR /&gt;error(localize("This post configuration has not been customized for 5-axis simultaneous toolpath."));&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;if (pendingRadiusCompensation &amp;gt;= 0) {&lt;BR /&gt;error(localize("Radius compensation mode cannot be changed at rapid traversal."));&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;var x = xOutput.format(_x);&lt;BR /&gt;var y = yOutput.format(_y);&lt;BR /&gt;var z = zOutput.format(_z);&lt;BR /&gt;var a = aOutput.format(_a);&lt;BR /&gt;var b = bOutput.format(_b);&lt;BR /&gt;var c = cOutput.format(_c);&lt;BR /&gt;writeBlock(gMotionModal.format(0), x, y, z, a, b, c);&lt;BR /&gt;feedOutput.reset();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onLinear5D(_x, _y, _z, _a, _b, _c, feed) {&lt;BR /&gt;if (!currentSection.isOptimizedForMachine()) {&lt;BR /&gt;error(localize("This post configuration has not been customized for 5-axis simultaneous toolpath."));&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;if (pendingRadiusCompensation &amp;gt;= 0) {&lt;BR /&gt;error(localize("Radius compensation cannot be activated/deactivated for 5-axis move."));&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;var x = xOutput.format(_x);&lt;BR /&gt;var y = yOutput.format(_y);&lt;BR /&gt;var z = zOutput.format(_z);&lt;BR /&gt;var a = aOutput.format(_a);&lt;BR /&gt;var b = bOutput.format(_b);&lt;BR /&gt;var c = cOutput.format(_c);&lt;BR /&gt;var f = feedOutput.format(feed);&lt;BR /&gt;if (x || y || z || a || b || c) {&lt;BR /&gt;writeBlock(gMotionModal.format(1), x, y, z, a, b, c, f);&lt;BR /&gt;} else if (f) {&lt;BR /&gt;if (getNextRecord().isMotion()) { // try not to output feed without motion&lt;BR /&gt;feedOutput.reset(); // force feed on next line&lt;BR /&gt;} else {&lt;BR /&gt;writeBlock(gMotionModal.format(1), f);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/** Adjust final point to lie exactly on circle. */&lt;BR /&gt;function CircularData(_plane, _center, _end) {&lt;BR /&gt;// use Output variables, since last point could have been adjusted if previous move was circular&lt;BR /&gt;var start = new Vector(xOutput.getCurrent(), yOutput.getCurrent(), zOutput.getCurrent());&lt;BR /&gt;var saveStart = new Vector(start.x, start.y, start.z);&lt;BR /&gt;var center = new Vector(&lt;BR /&gt;xyzFormat.getResultingValue(_center.x),&lt;BR /&gt;xyzFormat.getResultingValue(_center.y),&lt;BR /&gt;xyzFormat.getResultingValue(_center.z)&lt;BR /&gt;);&lt;BR /&gt;var end = new Vector(_end.x, _end.y, _end.z);&lt;BR /&gt;switch (_plane) {&lt;BR /&gt;case PLANE_XY:&lt;BR /&gt;start.setZ(center.z);&lt;BR /&gt;end.setZ(center.z);&lt;BR /&gt;break;&lt;BR /&gt;case PLANE_ZX:&lt;BR /&gt;start.setY(center.y);&lt;BR /&gt;end.setY(center.y);&lt;BR /&gt;break;&lt;BR /&gt;case PLANE_YZ:&lt;BR /&gt;start.setX(center.x);&lt;BR /&gt;end.setX(center.x);&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;this.center = new Vector(_center.x, _center.y, _center.z);&lt;BR /&gt;this.start = new Vector(start.x, start.y, start.z);&lt;BR /&gt;this.end = new Vector(_end.x, _end.y, _end.z);&lt;BR /&gt;this.offset = Vector.diff(center, start);&lt;BR /&gt;this.radius = this.offset.length;&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;this.start = new Vector(&lt;BR /&gt;xyzFormat.getResultingValue(start.x),&lt;BR /&gt;xyzFormat.getResultingValue(start.y),&lt;BR /&gt;xyzFormat.getResultingValue(start.z)&lt;BR /&gt;);&lt;BR /&gt;var temp = Vector.diff(center, start);&lt;BR /&gt;this.offset = new Vector(&lt;BR /&gt;xyzFormat.getResultingValue(temp.x),&lt;BR /&gt;xyzFormat.getResultingValue(temp.y),&lt;BR /&gt;xyzFormat.getResultingValue(temp.z)&lt;BR /&gt;);&lt;BR /&gt;this.center = Vector.sum(this.start, this.offset);&lt;BR /&gt;this.radius = this.offset.length;&lt;/P&gt;&lt;P&gt;temp = Vector.diff(end, center).normalized;&lt;BR /&gt;this.end = new Vector(&lt;BR /&gt;xyzFormat.getResultingValue(this.center.x + temp.x * this.radius),&lt;BR /&gt;xyzFormat.getResultingValue(this.center.y + temp.y * this.radius),&lt;BR /&gt;xyzFormat.getResultingValue(this.center.z + temp.z * this.radius)&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;switch (_plane) {&lt;BR /&gt;case PLANE_XY:&lt;BR /&gt;this.start.setZ(saveStart.z);&lt;BR /&gt;this.end.setZ(_end.z);&lt;BR /&gt;this.offset.setZ(0);&lt;BR /&gt;break;&lt;BR /&gt;case PLANE_ZX:&lt;BR /&gt;this.start.setY(saveStart.y);&lt;BR /&gt;this.end.setY(_end.y);&lt;BR /&gt;this.offset.setY(0);&lt;BR /&gt;break;&lt;BR /&gt;case PLANE_YZ:&lt;BR /&gt;this.start.setX(saveStart.x);&lt;BR /&gt;this.end.setX(_end.x);&lt;BR /&gt;this.offset.setX(0);&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onCircular(clockwise, cx, cy, cz, x, y, z, feed) {&lt;BR /&gt;// use G6/G7 for helices&lt;BR /&gt;&lt;BR /&gt;if (isSpiral()) {&lt;BR /&gt;linearize(tolerance);&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;if (isHelical()) {&lt;BR /&gt;var t = tolerance;&lt;BR /&gt;if (hasParameter("operation:tolerance")) {&lt;BR /&gt;t = getParameter("operation:tolerance");&lt;BR /&gt;}&lt;BR /&gt;linearize(t);&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (pendingRadiusCompensation &amp;gt;= 0) {&lt;BR /&gt;error(localize("Radius compensation cannot be activated/deactivated for a circular move."));&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;var circle = new CircularData(getCircularPlane(), new Vector(cx, cy, cz), new Vector(x, y, z));&lt;BR /&gt;&lt;BR /&gt;if (isFullCircle()) {&lt;BR /&gt;if (isHelical()) { // radius mode does not support full arcs&lt;BR /&gt;var t = tolerance;&lt;BR /&gt;if (hasParameter("operation:tolerance")) {&lt;BR /&gt;t = getParameter("operation:tolerance");&lt;BR /&gt;}&lt;BR /&gt;linearize(t);&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;switch (getCircularPlane()) {&lt;BR /&gt;case PLANE_XY:&lt;BR /&gt;writeBlock(&lt;BR /&gt;gAbsIncModal.format(90), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3),&lt;BR /&gt;iOutput.format(circle.offset.x, 0), jOutput.format(circle.offset.y, 0), feedOutput.format(feed)&lt;BR /&gt;);&lt;BR /&gt;break;&lt;BR /&gt;case PLANE_ZX:&lt;BR /&gt;writeBlock(&lt;BR /&gt;gAbsIncModal.format(90), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3),&lt;BR /&gt;iOutput.format(circle.offset.x, 0), kOutput.format(circle.offset.z, 0), feedOutput.format(feed)&lt;BR /&gt;);&lt;BR /&gt;break;&lt;BR /&gt;case PLANE_YZ:&lt;BR /&gt;writeBlock(&lt;BR /&gt;gAbsIncModal.format(90), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3),&lt;BR /&gt;jOutput.format(circle.offset.y, 0), kOutput.format(circle.offset.z, 0), feedOutput.format(feed)&lt;BR /&gt;);&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;var t = tolerance;&lt;BR /&gt;if (hasParameter("operation:tolerance")) {&lt;BR /&gt;t = getParameter("operation:tolerance");&lt;BR /&gt;}&lt;BR /&gt;linearize(t);&lt;BR /&gt;}&lt;BR /&gt;} else {&lt;BR /&gt;switch (getCircularPlane()) {&lt;BR /&gt;case PLANE_XY:&lt;BR /&gt;writeBlock(&lt;BR /&gt;gAbsIncModal.format(90), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3),&lt;BR /&gt;xOutput.format(circle.end.x), yOutput.format(circle.end.y), zOutput.format(circle.end.z),&lt;BR /&gt;iOutput.format(circle.offset.x, 0), jOutput.format(circle.offset.y, 0), feedOutput.format(feed)&lt;BR /&gt;);&lt;BR /&gt;break;&lt;BR /&gt;case PLANE_ZX:&lt;BR /&gt;writeBlock(&lt;BR /&gt;gAbsIncModal.format(90), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3),&lt;BR /&gt;xOutput.format(circle.end.x), yOutput.format(circle.end.y), zOutput.format(circle.end.z),&lt;BR /&gt;iOutput.format(circle.offset.x, 0), kOutput.format(circle.offset.z, 0), feedOutput.format(feed)&lt;BR /&gt;);&lt;BR /&gt;break;&lt;BR /&gt;case PLANE_YZ:&lt;BR /&gt;writeBlock(&lt;BR /&gt;gAbsIncModal.format(90), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3),&lt;BR /&gt;xOutput.format(circle.end.x), yOutput.format(circle.end.y), zOutput.format(circle.end.z),&lt;BR /&gt;jOutput.format(circle.offset.y, 0), kOutput.format(circle.offset.z, 0), feedOutput.format(feed)&lt;BR /&gt;);&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;var t = tolerance;&lt;BR /&gt;if (hasParameter("operation:tolerance")) {&lt;BR /&gt;t = getParameter("operation:tolerance");&lt;BR /&gt;}&lt;BR /&gt;linearize(t);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var currentCoolantMode = COOLANT_OFF;&lt;BR /&gt;var coolantOff = undefined;&lt;/P&gt;&lt;P&gt;function setCoolant(coolant) {&lt;BR /&gt;var coolantCodes = getCoolantCodes(coolant);&lt;BR /&gt;if (Array.isArray(coolantCodes)) {&lt;BR /&gt;if (singleLineCoolant) {&lt;BR /&gt;writeBlock(coolantCodes.join(getWordSeparator()));&lt;BR /&gt;} else {&lt;BR /&gt;for (var c in coolantCodes) {&lt;BR /&gt;writeBlock(coolantCodes[c]);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;return undefined;&lt;BR /&gt;}&lt;BR /&gt;return coolantCodes;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function getCoolantCodes(coolant) {&lt;BR /&gt;var multipleCoolantBlocks = new Array(); // create a formatted array to be passed into the outputted line&lt;BR /&gt;if (!coolants) {&lt;BR /&gt;error(localize("Coolants have not been defined."));&lt;BR /&gt;}&lt;BR /&gt;if (isProbeOperation()) { // avoid coolant output for probing&lt;BR /&gt;coolant = COOLANT_OFF;&lt;BR /&gt;}&lt;BR /&gt;if (coolant == currentCoolantMode) {&lt;BR /&gt;return undefined; // coolant is already active&lt;BR /&gt;}&lt;BR /&gt;if ((coolant != COOLANT_OFF) &amp;amp;&amp;amp; (currentCoolantMode != COOLANT_OFF) &amp;amp;&amp;amp; (coolantOff != undefined)) {&lt;BR /&gt;if (Array.isArray(coolantOff)) {&lt;BR /&gt;for (var i in coolantOff) {&lt;BR /&gt;multipleCoolantBlocks.push(mFormat.format(coolantOff[i]));&lt;BR /&gt;}&lt;BR /&gt;} else {&lt;BR /&gt;multipleCoolantBlocks.push(mFormat.format(coolantOff));&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var m;&lt;BR /&gt;var coolantCodes = {};&lt;BR /&gt;for (var c in coolants) { // find required coolant codes into the coolants array&lt;BR /&gt;if (coolants[c].id == coolant) {&lt;BR /&gt;coolantCodes.on = coolants[c].on;&lt;BR /&gt;if (coolants[c].off != undefined) {&lt;BR /&gt;coolantCodes.off = coolants[c].off;&lt;BR /&gt;break;&lt;BR /&gt;} else {&lt;BR /&gt;for (var i in coolants) {&lt;BR /&gt;if (coolants[i].id == COOLANT_OFF) {&lt;BR /&gt;coolantCodes.off = coolants[i].off;&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;if (coolant == COOLANT_OFF) {&lt;BR /&gt;m = !coolantOff ? coolantCodes.off : coolantOff; // use the default coolant off command when an 'off' value is not specified&lt;BR /&gt;} else {&lt;BR /&gt;coolantOff = coolantCodes.off;&lt;BR /&gt;m = coolantCodes.on;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (!m) {&lt;BR /&gt;onUnsupportedCoolant(coolant);&lt;BR /&gt;m = 9;&lt;BR /&gt;} else {&lt;BR /&gt;if (Array.isArray(m)) {&lt;BR /&gt;for (var i in m) {&lt;BR /&gt;multipleCoolantBlocks.push(mFormat.format(m[i]));&lt;BR /&gt;}&lt;BR /&gt;} else {&lt;BR /&gt;multipleCoolantBlocks.push(mFormat.format(m));&lt;BR /&gt;}&lt;BR /&gt;currentCoolantMode = coolant;&lt;BR /&gt;return multipleCoolantBlocks; // return the single formatted coolant value&lt;BR /&gt;}&lt;BR /&gt;return undefined;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var mapCommand = {&lt;BR /&gt;COMMAND_STOP:0,&lt;BR /&gt;COMMAND_OPTIONAL_STOP:1,&lt;BR /&gt;COMMAND_END:2,&lt;BR /&gt;COMMAND_SPINDLE_CLOCKWISE:3,&lt;BR /&gt;COMMAND_SPINDLE_COUNTERCLOCKWISE:4,&lt;BR /&gt;COMMAND_STOP_SPINDLE:5,&lt;BR /&gt;COMMAND_LOAD_TOOL:6&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;function onCommand(command) {&lt;BR /&gt;switch (command) {&lt;BR /&gt;case COMMAND_START_SPINDLE:&lt;BR /&gt;onCommand(tool.clockwise ? COMMAND_SPINDLE_CLOCKWISE : COMMAND_SPINDLE_COUNTERCLOCKWISE);&lt;BR /&gt;return;&lt;BR /&gt;case COMMAND_LOCK_MULTI_AXIS:&lt;BR /&gt;return;&lt;BR /&gt;case COMMAND_UNLOCK_MULTI_AXIS:&lt;BR /&gt;return;&lt;BR /&gt;case COMMAND_BREAK_CONTROL:&lt;BR /&gt;return;&lt;BR /&gt;case COMMAND_TOOL_MEASURE:&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;var stringId = getCommandStringId(command);&lt;BR /&gt;var mcode = mapCommand[stringId];&lt;BR /&gt;if (mcode != undefined) {&lt;BR /&gt;writeBlock(mFormat.format(mcode));&lt;BR /&gt;} else {&lt;BR /&gt;onUnsupportedCommand(command);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onSectionEnd() {&lt;BR /&gt;writeBlock(gPlaneModal.format(17));&lt;BR /&gt;if (!isLastSection() &amp;amp;&amp;amp; (getNextSection().getTool().coolant != tool.coolant)) {&lt;BR /&gt;setCoolant(COOLANT_OFF);&lt;BR /&gt;}&lt;BR /&gt;if (((getCurrentSectionId() + 1) &amp;gt;= getNumberOfSections()) ||&lt;BR /&gt;(tool.number != getNextSection().getTool().number)) {&lt;BR /&gt;onCommand(COMMAND_BREAK_CONTROL);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;forceAny();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function onClose() {&lt;BR /&gt;setCoolant(COOLANT_OFF);&lt;/P&gt;&lt;P&gt;setWorkPlane(new Vector(0, 0, 0)); // reset working plane&lt;/P&gt;&lt;P&gt;onImpliedCommand(COMMAND_END);&lt;BR /&gt;onImpliedCommand(COMMAND_STOP_SPINDLE);&lt;BR /&gt;writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off&lt;BR /&gt;writeln("%");&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 17:25:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9372331#M8864</guid>
      <dc:creator>gearheadcrawler</dc:creator>
      <dc:date>2020-03-11T17:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Prototrak smx post processor issue please fix</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9376133#M8865</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8614992"&gt;@gearheadcrawler&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sorry but I am not able to find anything wrong in your postprocessor.&lt;/P&gt;
&lt;P&gt;Maybe&amp;nbsp;the drilling cycles move at feed height due to programming inside Fusion.&lt;/P&gt;
&lt;P&gt;If so, please take a look at this picture related to drilling cycles clearance height :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Retract Height.jpg" style="width: 966px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/740931iD93734A9E47E5033/image-size/large?v=v2&amp;amp;px=999" role="button" title="Retract Height.jpg" alt="Retract Height.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 10:13:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/prototrak-smx-post-processor-issue-please-fix/m-p/9376133#M8865</guid>
      <dc:creator>andrea.amilo</dc:creator>
      <dc:date>2020-03-13T10:13:16Z</dc:date>
    </item>
  </channel>
</rss>

