Hi
OK I have a solution for you.
I have done what I suggested that you do and altered Axis. It now accepts a new remote command
get_file_name.
I have also altered axis-remote so that it has a new switch
--get.
When
axis-remote --get is run, Axis will write the current loaded file to
/tmp/filename.txt
Then using a M code script which I called M121,
Code:
#!/bin/bash
if [ ! $# -ge 1 ]; then
echo "Usage: M121 n - where n is 1 (start 2 (end "
exit 1
fi
float=$1
int=${float/\.*}
case $int in
1 ) axis-remote --get
echo "JOB FILE NAME" >> /tmp/joblog.txt
echo "*************" >> /tmp/joblog.txt
cat /tmp/filename.txt >> /tmp/joblog.txt
echo "Started at:-" >> /tmp/joblog.txt
date >> /tmp/joblog.txt;;
2 ) echo "Ended at:-" >> /tmp/joblog.txt
date >> /tmp/joblog.txt;;
esac
exit 0
you now can just code
M121 P1
.
. (rest of your gcode)
.
M121 P2
and you will get a file called
/tmp/joblog.txt which contains for example:-
Code:
JOB FILE NAME
*************
/home/bob/emc2/ngc/blank.ngc
Started at:-
Tue Dec 6 14:47:30 GMT 2011
Ended at:-
Tue Dec 6 14:54:32 GMT 2011
The emc version is 2.6, axis-remote should just run , don't think it has been changed for a while.
The alterations to axis are lines 1884 - 1903, if this version of axis does not run on your build.
zip of all files attached
regards