Generating G Code from MDI history log

More
05 Mar 2013 16:16 #30904 by susam
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

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

More
05 Mar 2013 17:13 #30905 by susam
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

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

More
05 Mar 2013 17:22 #30907 by ArcEye

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 or Create an account to join the conversation.

More
05 Mar 2013 18:47 #30909 by susam
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?

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

More
05 Mar 2013 19:37 #30910 by ArcEye

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
The following user(s) said Thank You: susam

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

More
05 Mar 2013 19:38 #30911 by susam
Thanks!!.... I hope to scale the steep learning curve. :)

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

More
12 Mar 2013 13:13 #31272 by susam
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.

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

More
12 Mar 2013 13:14 #31273 by susam
the screenshot
Attachments:

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

More
12 Mar 2013 16:35 - 12 Mar 2013 16:42 #31277 by ArcEye
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
Last edit: 12 Mar 2013 16:42 by ArcEye.

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

More
13 Mar 2013 22:17 - 13 Mar 2013 22:59 #31333 by ArcEye
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






File Attachment:

File Name: plot-0-1.zip
File Size:20 KB
Attachments:
Last edit: 13 Mar 2013 22:59 by ArcEye.

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

Time to create page: 0.475 seconds
Powered by Kunena Forum