Reload a file from a pendant button?

More
16 Jun 2012 16:47 #21008 by billooms
Is there any way to reload a file from a button on a pendant? I looked through the HAL manual and all the halui pins and didn't find anything. I see pause, resume, run, step, and stop, but not a reload.

I realize that it can be done with axis-remote or ssh, but I'm looking for an easy way to reload an updated file without having to pull out the keyboard or mouse.

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

More
16 Jun 2012 21:18 #21015 by BigJohnT
I gotta ask how your updating the file without the keyboard or mouse?

John

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

More
16 Jun 2012 22:04 - 16 Jun 2012 22:05 #21016 by billooms
I guess I didn't say that clearly. I keep the keyboard/mouse connected but out of the way except when needed. It keeps the sawdust out of the keyboard. I keep my pendant close by the working area (application is a computerized ornamental lathe). I update the file from a separate design computer and simply do a reload of the file to make the next series of cuts. Right not, I pull out the mouse or keyboard to update the file each time. It would be easier to just press a button on the pendant instead.
Last edit: 16 Jun 2012 22:05 by billooms.

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

More
16 Jun 2012 22:33 #21019 by andypugh
billooms wrote:

It would be easier to just press a button on the pendant instead.


I really hope that there is a neater way than this but:

The button can be linked to an MDI_COMMAND (in the INI). That MDI_COMMAND can call a custom M-code (M10-M199) and then the custom M-code can be a bash script containing
#! /bin/sh
axis-remote --reload

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

More
16 Jun 2012 22:42 #21021 by billooms
Yes -- I hadn't thought about a custom M-code (never used them before). If I don't get any better suggestions, I'll give that a try on Monday.

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

More
16 Jun 2012 23:07 #21024 by BigJohnT
That makes more sense now, Andy anyway to add something to .axisrc to make that happen?

or change halui.cc and add that function?

This bit of code from halui.cc might be a clue...
static int sendProgramResume()
1225 {
1226     EMC_TASK_PLAN_RESUME emc_task_plan_resume_msg;
1227 
1228     emc_task_plan_resume_msg.serial_number = ++emcCommandSerialNumber;
1229     emcCommandBuffer->write(emc_task_plan_resume_msg);
1230     return emcCommandWaitReceived(emcCommandSerialNumber);
1231 }

John

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

More
17 Jun 2012 00:26 #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 KB
Attachments:

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

More
17 Jun 2012 00:47 #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
18 Jun 2012 17:12 #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
22 Aug 2019 06:04 #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.

Time to create page: 0.073 seconds
Powered by Kunena Forum