Generating G Code from MDI history log

More
13 years 7 months ago #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
13 years 7 months ago #31273 by susam
the screenshot

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

More
13 years 7 months ago - 13 years 7 months ago #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: 13 years 7 months ago by ArcEye.

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

More
13 years 7 months ago - 13 years 7 months ago #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:19.76 KB
Last edit: 13 years 7 months ago by ArcEye.

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

More
13 years 7 months ago - 13 years 7 months ago #31334 by ArcEye
Code for plot component for those interested
Warning: Spoiler!
Last edit: 13 years 7 months ago by ArcEye.
The following user(s) said Thank You: susam

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

More
13 years 7 months ago - 13 years 7 months ago #31544 by susam
Thanks!..

I am writing a G-code generator in java...(as I'm more comfortable with it). I will try to integrate these elements through that piece of code. I hope it works out....to integrate java into such an environment.

Regards
Last edit: 13 years 7 months ago by susam.

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

Time to create page: 0.088 seconds
Powered by Kunena Forum