- Posts: 16
- Thank you received: 0
Generating G Code from MDI history log
13 years 7 months ago #30904
by susam
Replied by susam on topic Re:Generating G Code from MDI history log
When I try to run M153 from the commndline I get the error.
line 3: splice: command not found.
My M153 looks like this.
#!/bin/bash
splice ~/linuxcnc/nc_files/header.ngc ~/linuxcnc/nc_files/footer.ngc /tmp/cords.txt ~/.axis_mdi_history /tmp/op.ngc
#axis-remote /tmp/op.ngc
exit 0
line 3: splice: command not found.
My M153 looks like this.
#!/bin/bash
splice ~/linuxcnc/nc_files/header.ngc ~/linuxcnc/nc_files/footer.ngc /tmp/cords.txt ~/.axis_mdi_history /tmp/op.ngc
#axis-remote /tmp/op.ngc
exit 0
Please Log in to join the conversation.
13 years 7 months ago #30905
by susam
Replied by susam on topic Re:Generating G Code from MDI history log
further, if I replace 'splice' with './splice' in M153 I get the following error.
./splice: error while loading shared libraries: libqt-mt.so.3: cannot open shared object file: No such file or directory
./splice: error while loading shared libraries: libqt-mt.so.3: cannot open shared object file: No such file or directory
Please Log in to join the conversation.
13 years 7 months ago #30907
by ArcEye
splice is not in a directory in your PATH environment variable (echo $PATH)
You don't have qt3 multi threaded library installed, used by splice
apt-get install libqt3-mt
Replied by ArcEye on topic Re:Generating G Code from MDI history log
line 3: splice: command not found.
splice is not in a directory in your PATH environment variable (echo $PATH)
/splice: error while loading shared libraries: libqt-mt.so.3: cannot open shared object file: No such file or directory
You don't have qt3 multi threaded library installed, used by splice
apt-get install libqt3-mt
Please Log in to join the conversation.
13 years 7 months ago #30909
by susam
Replied by susam on topic Re:Generating G Code from MDI history log
Thanks.
its working now.
Just another question. Instead of the Axis MDI history, is it possible to include a different .ngc file (say a subroutine) that is written seperately and is in the path. Like, can we change that line in M153 and replace "~/.axis_mdi_history" with say "grinding_subroutine.ngc"....something like this?
Just another question. Instead of the Axis MDI history, is it possible to include a different .ngc file (say a subroutine) that is written seperately and is in the path. Like, can we change that line in M153 and replace "~/.axis_mdi_history" with say "grinding_subroutine.ngc"....something like this?
Please Log in to join the conversation.
13 years 7 months ago #30910
by ArcEye
Well done, it is worth persisting, but linux is a steep learning curve and then you have to add linuxcnc!
Yes of course, you can put anything you like there.
Just remember to lower and raise the tool in your code, because splice will just rapid to the next co-ordinates.
regards
Replied by ArcEye on topic Re:Generating G Code from MDI history log
Thanks.
its working now.
Well done, it is worth persisting, but linux is a steep learning curve and then you have to add linuxcnc!
Instead of the Axis MDI history, is it possible to include a different .ngc file (say a subroutine) that is written seperately and is in the path
Yes of course, you can put anything you like there.
Just remember to lower and raise the tool in your code, because splice will just rapid to the next co-ordinates.
regards
Please Log in to join the conversation.
13 years 7 months ago #30911
by susam
Replied by susam on topic Re:Generating G Code from MDI history log
Thanks!!.... I hope to scale the steep learning curve.
Please Log in to join the conversation.
13 years 7 months ago #31272
by susam
Replied by susam on topic Re:Generating G Code from MDI history log
Hi, I'v got another small query. I created the following pyvcp elements to go along with 'mark co-ordinates' and 'generate'(as seen in the attachment).
Now, when I click on the 'Mark Coordinates', apart from writing the coordinates to the text file, is it possible to display it in the labelframe - 'Last Mark-Coordinate' (please refer to the attached screenshot)?
If yes, I guess it is through accessing connections as in the custom_postgui.hal file through an external command. Please advice on this.
Thanks.
Now, when I click on the 'Mark Coordinates', apart from writing the coordinates to the text file, is it possible to display it in the labelframe - 'Last Mark-Coordinate' (please refer to the attached screenshot)?
If yes, I guess it is through accessing connections as in the custom_postgui.hal file through an external command. Please advice on this.
Thanks.
Please Log in to join the conversation.
13 years 7 months ago #31273
by susam
Replied by susam on topic Re:Generating G Code from MDI history log
the screenshot
Attachment not found
Please Log in to join the conversation.
13 years 7 months ago #31277
by ArcEye
Replied by ArcEye on topic Re:Generating G Code from MDI history log
Hi
Well as far as implementing the number displays, I think you need to use 3 number display widgets inside a hbox
linuxcnc.org/docs/2.5/html/hal/pyvcp.html#_number_displays
I think the label text is pretty well static and you want something that displays formatted floating point automatically.
This is getting to a point where it would be easier to write a single user-space program to do it all, rather than try to cobble on another bit
of G Code / halui / bash script.
You would still use a pyVCP panel but the pins are directly connected to a program that does the actions
I will have some time tomorrow, leave it with me and I will see what emerges.
regards
Well as far as implementing the number displays, I think you need to use 3 number display widgets inside a hbox
linuxcnc.org/docs/2.5/html/hal/pyvcp.html#_number_displays
I think the label text is pretty well static and you want something that displays formatted floating point automatically.
This is getting to a point where it would be easier to write a single user-space program to do it all, rather than try to cobble on another bit
of G Code / halui / bash script.
You would still use a pyVCP panel but the pins are directly connected to a program that does the actions
I will have some time tomorrow, leave it with me and I will see what emerges.
regards
Please Log in to join the conversation.
13 years 7 months ago #31333
by ArcEye
Replied by ArcEye on topic Re:Generating G Code from MDI history log
Hi
I have written a user space component for you called plot, which will considerably simplify the setup and usage of the co-ordinate logging and creating a gcode file from them using splice
The zip file has the different elements set out as if in a tarball, ie you need to navigate to the directory named and deposit the contents into it.
Then start Linuxcnc and select the entry called plot from the config-picker dialog.
This will start a simulator with the elements installed.
All that is required then is to copy the gcode routine you wish to be carried out at each co-ordinates to a file called /tmp/operation.ngc
Then jog to wherever you want to start and click 'Mark Co-ordinates' and again at each point required.
Then click 'Generate File' and then 'Load' and the created gcode file will be loaded into Axis.
(NB click the buttons deliberately and move the mouse off them afterwards, pvVCP can sometimes 'stick' a button if the mouse remains on it)
Screenshot shows output, if you want to preserve it, need to save as something else in your gcode directory before you close the computer, contents of /tmp are volatile.
Once you have tried the sim you can use the files as a guide to integrate into your own config.
Hope it does what you want
regards
I have written a user space component for you called plot, which will considerably simplify the setup and usage of the co-ordinate logging and creating a gcode file from them using splice
The zip file has the different elements set out as if in a tarball, ie you need to navigate to the directory named and deposit the contents into it.
Then start Linuxcnc and select the entry called plot from the config-picker dialog.
This will start a simulator with the elements installed.
All that is required then is to copy the gcode routine you wish to be carried out at each co-ordinates to a file called /tmp/operation.ngc
Then jog to wherever you want to start and click 'Mark Co-ordinates' and again at each point required.
Then click 'Generate File' and then 'Load' and the created gcode file will be loaded into Axis.
(NB click the buttons deliberately and move the mouse off them afterwards, pvVCP can sometimes 'stick' a button if the mouse remains on it)
Screenshot shows output, if you want to preserve it, need to save as something else in your gcode directory before you close the computer, contents of /tmp are volatile.
Once you have tried the sim you can use the files as a guide to integrate into your own config.
Hope it does what you want
regards
Attachment not found
Attachment not found
Please Log in to join the conversation.
Time to create page: 0.068 seconds
