Getting current gcode file name from Axis

More
09 Dec 2011 15:23 - 09 Dec 2011 15:28 #15513 by ArcEye
Hi,

This results from a thread where gois wanted a way of writing the current gcode file name to a work time logging report.
(www.linuxcnc.org/index.php/english/compo...ew&catid=38&id=15259)

It had to be usable in a Mcode script which was triggered from the gcode starting and finishing.

After finding an interim method of filling this requirement, I have made a more satisfactory and general alteration to Axis, which results in a file called /tmp/emc.filename being maintained.

When axis starts, this file will either contain "No File Loaded", or the name of the loaded file, if started with the file as a command-line argument, or an automatic opening from the .INI file etc.

Whenever a new file is loaded, this file will be updated to reflect the change.

The attached zip contains modified axis for 2.4.5, 2.4.7 and 2.6. If yours is a different version copy over the code as marked and listed in the header to it.

Also contains a sample M code script M121, which shows a use as a work time stamp file generator

Hopefully of use to some of you

regards
Attachments:
Last edit: 09 Dec 2011 15:28 by ArcEye.

Please Log in or Create an account to join the conversation.

More
09 Dec 2011 15:29 #15515 by ArcEye
Zip attached to this one!!

File Attachment:

File Name: Axis_Get_F...Name.zip
File Size:91 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
09 Dec 2011 16:13 #15517 by gois
All right, thank you "

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum