Reload Program Through Pin

More
11 years 2 months ago #61753 by Delron
Replied by Delron on topic Reload Program Through Pin

BigJohnT wrote: No, I missed that you had hijacked the thread...

JT


My Apologies.

Did not realize one could "Hijack" a four year old defunct thread. :unsure:

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

More
11 years 2 months ago #61754 by BigJohnT
Replied by BigJohnT on topic Reload Program Through Pin

Delron wrote: I just don't understand. We are all simply trying to touch-off to a work piece by pressing a button on our pendents. When we do that, we a mostly triggering a sub routine to probe down, and set the working offset. However, Linuxcnc will not refresh the new offset plot in this manner, so we must reload the program.


Please note that it is not LinuxCNC that is not refreshing the backplot it is Axis that does not know what you do with MDI commands that are run via your pendant. If you don't tell Axis how is it supposed to know?

LinuxCNC has the Python Interface and that is one of the many things that you can do with it.

www.linuxcnc.org/docs/2.7/html/config/python-interface.html

JT

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

More
11 years 2 months ago - 11 years 2 months ago #61757 by Delron
Replied by Delron on topic Reload Program Through Pin
Well I appreciate that there "May" be a way to do what we want with a Python script, I am no programmer. I'm struggling enough wrapping my mind around the HAL interface.

My CNC is just an extension on my woodworking hobby. (Hobby!) I unfortunate do not have time to learn new programming skills, especially just for one simple plot refresh.

I was really hoping to find someone that may have done something to deal with this already and borrow from their work. Make no mistake, I do not "Expect" anyone to hand over their hard work, but some are willing to help others in need sometimes.

Cheers!
Last edit: 11 years 2 months ago by Delron. Reason: mistakes

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

More
11 years 2 months ago #61759 by Delron
Replied by Delron on topic Reload Program Through Pin
Maybe a glimmer of hope? If this is being looked into, if it's not too old and stale.

From
wiki.linuxcnc.org/cgi-bin/wiki.pl?Lncnc_3_Idea_Whiteboard

7.4. Better support for GUI updates, like update messages
It would be nice if linuxcnc had a better system for updating GUI information, such as when to reload the plot, when to update offset display pages, when the user system changes etc
For instance right now if you offset the origin you must explicitly reload the HAL_gremlin graphics plot. That means if we ever have a different plotter it will be broken until one updates the program to reload the new plotter. It would be much better if linuxcnc sent a 'update plot' message every time it moves the origin
Another one is the fact you must switch from MDI to manual to MDI again to get linuxcnc to re-synch the var file.

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

More
11 years 2 months ago #61761 by BigJohnT
Replied by BigJohnT on topic Reload Program Through Pin
That's just a wish list someone posted 2 1/2 years ago for LinuxCNC 3.

JT

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

More
11 years 2 months ago #61763 by andypugh
Replied by andypugh on topic Reload Program Through Pin
I just created a little HAL component that runs the axis-remote reload command when a HAL pin changes fro 0 to 1..
Code:
#!/usr/bin/python import linuxcnc, hal import os h = hal.component("update") h.newpin("trigger",hal.HAL_BIT, hal.HAL_IN) c = linuxcnc.command() h.ready try: while 1: if h.trigger and not old_trigger: os.system("axis-remote --reload ") old_trigger = h.trigger except KeyboardInterrupt: pass

But I am not sure if that does what you want. Clearly reloading a program while it is running has to be a very bad idea.

The backplot display is created by a "dry run" of the G-code through the actual interpreter. It can't do that while the interpreter is busy with a running program.

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

Time to create page: 0.417 seconds
Powered by Kunena Forum