Somewhere in the "// collected state" area (line 209). If it's before any other variable, don't forget your ";" at the end
Example with the Doosan post:
// collected state
var sequenceNumber;
var now = new Date (); <--------------
var currentWorkOffset;
var optionalSection = false;
var forceSpindleSpeed = false;
var activeMovements; // do not use by default
var currentFeedId;
var g68RotationMode = 0;
var angularProbingMode;
var subprograms = [];
var currentPattern = -1;
var firstPattern = false;
var currentSubprogram;
var lastSubprogram;
var definedPatterns = new Array();
var incrementalMode = false;
var saveShowSequenceNumbers;
var cycleSubprogramIsActive = false;
var patternIsActive = false;
var lastOperationComment = "";
var incrementalSubprogram;
var previousABC = new Vector(0, 0, 0);
var retracted = false; // specifies that the tool has been retracted to the safe plane
probeMultipleFeatures = true;
And then further down the post (line 460):
// absolute coordinates and feed per min
writeBlock(/*gAbsIncModal.format(90),*/ gFeedModeModal.format(properties.useG95 ? 95 : 00),gFormat.format(17), gFormat.format(40), gFormat.format(80), gFormat.format(90), gFormat.format(94),gFormat.format(98));
writeComment("SEE SETUP SHEET");
writeln("(LAST RUN)(UNPROVEN)");
writeComment("PROGRAM BY=STM")
writeComment((now.getMonth()+1) + "/" + now.getDate() + "/" + now.getFullYear() + " " + now.getHours() + ":" + ('0'+now.getMinutes()).slice(-2));
Resulting code (note the date time format, doesn't reflect the missing charcters mentioned above)
G00 G17 G40 G80 G90 G94 G98
(SEE SETUP SHEET)
(LAST RUN)(UNPROVEN)
(PROGRAM BY=STM)
(12312020 825)
Seth Madore
Customer Advocacy Manager - Manufacturing