Using LOG command with PlanetCNC TNG software

If you want to save your variable and parameter values or any other log data in a form of a file, you can use LOG command.

LOG: Writes to LOG file
LOGCREATE: Creates new LOG file.
LOGOPEN: Adds content to previously created LOG file
LOGCLOSE: Closes LOG file

 

Example 1: G-code program will create LOG file where desired data will be saved.

%
(LOGCREATE,DataLOG.txt)  
(LOG,This text is saved in "DataLOG.txt" file)
(LOGCLOSE)
%

 

Example 2: G-code program will create two separate LOG files where data will be saved.

%
(LOGCREATE,DataLOG 1.txt)
(LOG,This text is saved in "DataLOG 1.txt" file)
(LOGCLOSE)

(LOGCREATE,DataLOG 2.txt)
(LOG,This text is saved in "DataLOG 2.txt" file)
(LOGCLOSE)

(LOGOPEN,DataLOG 1.txt)
(LOG,This text is also saved in "DataLOG 1.txt" file)
(LOGCLOSE)

(LOGOPEN,DataLOG 2.txt)
(LOG,This text is also saved in "DataLOG 2.txt" file)
(LOGCLOSE)
%

Example 3: G-code program will create LOG file where value of machine work position will be saved. This is a great way to “track” and store values of desired parameter.

%
G00 X0
(LOGCREATE,Work PositionLOG.txt) 
(LOG,Work position start:#<_x>)
(LOGCLOSE) 
G00 X100
(LOGOPEN,Work PositionLOG.txt) 
(LOG,Work position end:#<_x>)
(LOGCLOSE)
%

 

Created LOG files are located in main installation folder of PlanetCNC TNG. User can also explicitly tell where created LOG file will be located.