Reload a file from a pendant button?

More
22 Aug 2019 17:42 #142863 by billooms
As far as I can see, the only way to get a remote reload is by modifying axis. The changes are pretty simple, but you have to recompile.

I'm not on the latest version -- I'm still at 2.7.8. Attached are my "old" and "new" files. You can compare them to see where to change the code. Insert 1 line, insert 5 lines, insert 1 line. See attached.
Attachments:
The following user(s) said Thank You: terans1085

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

More
22 Aug 2019 22:59 #142885 by cmorley
in Master we modified the code a bit so you can add AXIS HAL pins in the .rc file:
You could surely connect that with code to reload the program within AXIS.

linuxcnc.org/docs/devel/html/gui/axis.ht..._new_axisui_hal_pins
In 2.7 it probably still possible but a bit more hacky.

You could also create a python component to do the same.
The linuxcnc module combined with the HAL module would allow you to use a HAL pin to reload the current program.

linuxcnc.org/docs/2.7/html/config/python-interface.html
linuxcnc.org/docs/2.7/html/hal/halmodule.html

Chris M
The following user(s) said Thank You: terans1085

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

More
28 Aug 2019 13:28 #143443 by terans1085

As far as I can see, the only way to get a remote reload is by modifying axis. The changes are pretty simple, but you have to recompile.

I'm not on the latest version -- I'm still at 2.7.8. Attached are my "old" and "new" files. You can compare them to see where to change the code. Insert 1 line, insert 5 lines, insert 1 line. See attached.


I'm not really that fluent in Linux, so I grabbed the axis file on my system, took it to my windoze desk PC and compared it to your file in Notepad++. I have made the changes that made sense, ignored others which are version related and copied back to the linux machine (obviously making a backup copy of the original axis beforehand). This did not work! Running linuxcnc failed saying that it did not have permission to run axis.....

Second attempt: ran through the changes locally on linux (in gedit). Did the exact same modifications I had done earlier. Saved and VOILA! Ran perfectly and reload pin works like a charm.

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

Time to create page: 0.063 seconds
Powered by Kunena Forum