CNC Machine Simulation, Verification Software CNC post-processors, CNC simulation software, cnc verification, G- code simulation verification
ICAM Technologies- CNC Simulation, advanced NC post-processing, cnc post-processor, CAM-POST, Post-processor, Virtual Machine, nc post-processing, Control Emulator, CNC postprocessors
ICAM Technologies- advanced NC post-processing, machine tool simulation, cnc post-processor, CAM-POST, post-processor, Virtual Machine, nc post-processing, Control Emulator, cnc postprocessor NC post-processor, advanced cnc Post- processors, CAM-POST, NC post-processor development, ICAM, cnc post-processor, Virtual Machine, postprocessing, machine toll simulation, Control Emulator Technical Tips from ICAM, Post processing Tutorial, CNC Tutorial, Machine Simulation, Postprocessor, G-code simulation, advanced CNC Post- processors for Mastercam Catia, NX, Creo, Mazak, DMG, Makino, HAAS, Siemens CNC Simulation, Custom Multi-axis CNC Post-processors and integrated  G-code simulation verification from ICAM
Technical Tips from ICAM, Post processing Tutorial, CNC Tutorial, Machine Simulation, Postprocessor, G-code simulation, advanced CNC Post- processors for Mastercam Catia, NX, Creo, Mazak, DMG, Makino, HAAS, Siemens
ICAM Home
Software Connecting CAD/CAM to CNC Machines
Post processors, CNC machine simulation for 5 axis machines, advanced CNC G-code simulation verification, collision detection for Mastercam, Catia, NX, Creo, Topsolid users
NC post-processor, advanced cnc Post- processors, CAM-POST, NC post-processor development, ICAM, cnc post-processor, Virtual Machine, postprocessing, machine toll simulation, Control Emulator
CNC Simulation, NC post-processor for Mastercam, advanced cnc Post- processors, CAM-POST, NC post-processor development, ICAM, cnc post-processor, Virtual Machine, postprocessing, machine simulation, Control Emulator NC post-processor, advanced cnc Post- processors, CAM-POST, NC post-processor development, ICAM, cnc post-processor, Virtual Machine, postprocessing, machine toll simulation, Control Emulator ICAM develops Custom Multi-axis NC post-processors, integrated CNC Simulation, G-code Simulation verification solutions supporting lathe, mill, advanced mill, rotary mill , mill-turns CNC Simulation, NC post-processor for Mastercam, advanced cnc Post- processors, CAM-POST, NC post-processor development, ICAM, cnc post-processor, Virtual Machine, postprocessing, machine simulation, Control Emulator NC post-processor, advanced cnc Post- processors, CAM-POST, NC post-processor development, ICAM, cnc post-processor, Virtual Machine, postprocessing, machine toll simulation, Control Emulator CNC Simulation, NC post-processor for Mastercam, advanced cnc Post- processors, CAM-POST, NC post-processor development, ICAM, cnc post-processor, Virtual Machine, postprocessing, machine simulation, Control Emulator NC post-processor, advanced cnc Post- processors, CAM-POST, NC post-processor development, ICAM, cnc post-processor, Virtual Machine, postprocessing, machine toll simulation, Control Emulator CNC Simulation, NC post-processor for Mastercam, advanced cnc Post- processors, CAM-POST, NC post-processor development, ICAM, cnc post-processor, Virtual Machine, postprocessing, machine simulation, Control Emulator

CNC Simulation, NC postprocessors from ICAM

How to extract the day of the week in a post-processor

If for whichever reason, the current day of the week (Monday through Sunday) is required to be known or printed as a comment in the NC program, here is a little utility that can extract this information from the system and make it available to the post-processor.  It can be inserted in a Machine Startup Macro:

$$ DAY OF THE WEEK
$$
$$ -> Abbreviated day of week

DECLAR/STRING,TMPFILE,WKDAY          $$ Declare string variables
TMPFILE=$FGETENV('TMP')//'\date.txt' $$ Name of temporary file
SYSTEM/'date /T > '//TMPFILE         $$ Run 'date /T' saving to file
OPEN/21,TMPFILE                      $$ Open the file
READ/21,'!(a3)',WKDAY                $$ Read first 3 characters
CLOSE/21                             $$ Close the file
SYSTEM/'del '//TMPFILE               $$ Run 'del' to delete the file
$$
$$ -> Day number of week (Sun=0,Mon=1,…,Sat=6)

DECLAR/REAL,DAYNO
DAYNO=$FINDEX('..MONTUEWEDTHUFRISAT',$FTOUPER(WKDAY))/3 $$ For English locale
$$
$$ -> Full day name (for English locale, otherwise please change)

DECLAR/DAYNAMES
DAYNAMES={'Sunday','Monday','Tuesday','Wednesday',$
  'Thursday','Friday','Saturday'
}
DECLAR/STRING,WEEKDAY
WEEKDAY=DAYNAMES(DAYNO+1)


Benefit to User

Have access to information otherwise not accessible through system variables.

For more information or comments, please do not hesitate to contact Phil at TechTipTuesday@icam.com



CNC simulation and verification software, NC post-processing, CAM-POST, cnc post-processors, Virtual Machine, post-processor, Control Emulator, Advanced post-processor, dedicated custom post processor
CNC simulation and verification software, NC post-processing, CAM-POST, cnc post-processors, Virtual Machine, post-processor, Control Emulator, Advanced post-processor, dedicated custom post processor
CNC simulation and verification software, NC post-processing, CAM-POST, cnc post-processors, Virtual Machine, post-processor, Control Emulator, Advanced post-processor, dedicated custom post processor