Reload a file from a pendant button?

More
14 years 4 months ago #21025 by andypugh
I have added a pin axisui.reload to Axis, which should do what you want.

Make a backup copy of your /usr/bin/axis file, then put this one in its place:

File Attachment:

File Name: axis.zip
File Size:28.28 KB

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

More
14 years 4 months ago #21027 by billooms
Thank you!

I'll download it and try it when I get back to the shop on Monday.

Bill

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

More
14 years 4 months ago #21061 by billooms
This works great!

A note for others that may use this -- don't forget to add execute privileges to the axis command:

cd /usr/bin
sudo chmod ugo+x axis

Will this be added to future updates so that the functionality doesn't go away the next time there is an update?

Thanks a lot!

Bill

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

More
7 years 2 months ago #142788 by terans1085
Hello! Apologies for posting on such an old thread. I have come to need this feature as I am running "parametric" python scripts that need to be reloaded in AXIS to refresh their output gcode.

I am skeptical about changing the axis file directly since a lot of newer versions have been released since. Would it be possible to implement this HAL pin differently? Thank you :)

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

More
7 years 2 months ago #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.
The following user(s) said Thank You: terans1085

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

More
7 years 2 months ago #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.

Time to create page: 0.065 seconds
Powered by Kunena Forum