Reload Program Through Pin

More
11 years 2 months ago #61719 by Delron
Replied by Delron on topic Reload Program Through Pin
Tried all that, I think....

Can you do it in a M-code? Did not seem to work for me.

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

More
11 years 2 months ago #61720 by Delron
Replied by Delron on topic Reload Program Through Pin
Here is one I tried with no success


M101

#!/bin/sh
halcmd setp halui.mode.mdi true
axis-remote -m "o100 call"
halcmd setp halui.mode.manual true
axis-remote —reload &
exit 0

Sure would like to see Linuxcnc create a method to deal with this problem in the next release.

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

More
11 years 2 months ago #61721 by PCW
Replied by PCW on topic Reload Program Through Pin
Still not convinced there is a problem

Nothing you have shown checks that the state has changed to the desired state before proceeding

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

More
11 years 2 months ago - 11 years 2 months ago #61722 by Delron
Replied by Delron on topic Reload Program Through Pin
I'm not sure where I can check the state from for this to work?
Can the M-code do logic?

Would I place the hali.mode.is-manual in the M-code file and check there?
How do I pause the m-code until it is in manual mode before proceeding with the reload?
Can you give an example?
Last edit: 11 years 2 months ago by Delron. Reason: More questions

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

More
11 years 2 months ago #61723 by Delron
Replied by Delron on topic Reload Program Through Pin
Ok, I think it's behaving I little more here, however, I cannot get the m-code to put the machine back to manual mode after the reload.??

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

More
11 years 2 months ago #61724 by PCW
Replied by PCW on topic Reload Program Through Pin
Not the most elegant way but
a bash while loop in your script waiting for

halcmd getp halui.mode.is-mdi | grep true

Having a 0 exit code is a possibility for waiting for mode changes

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

Time to create page: 0.395 seconds
Powered by Kunena Forum