> On Jan 5, 2016, at 8:26 AM, Jeff Epler <[email protected]> wrote:
> 
> As I tired to indicate in my initial reply in this thread, I am not
> particularly committed to making "axis remote --reload" work while an
> MDI is actively executing; I think this is a mistaken idea.  It was an
> initial design decision in AXIS that a change to the active coordinate
> system that was *NOT* done by AXIS own touch-off would never trigger an
> automatic reload.
> 
> Perhaps *this* is the decision that should be revisted; I would consider
> a patch which would optionally trigger a reload when the active g5x
> offset or g92 offset was changed, at the next moment that AXIS believes
> it is OK to perform a reload (e.g., after the MDI that generated the
> coordinate system change was finished)
> 
> This could be controlled by an inifile option or a menu option.
> Probably the former would be preferable for you, so that an operator
> can't make the wrong setting at runtime.
> 
> Jeff

A follow up to this.  We have tried a different approach and it is working at 
all (better?) but not perfect.  Rather than execute mdi commands (in .ngc 
files) and using axis-remote to reload the file on touch off we changed our 
gladevcp panel to execute python functions and are reloading the file after 
touch off using a tk call.  The code that pertains to the button presses is:


       def mdi_exec(self,c,s,cmd):
               s.poll()
               if not s.estop and s.enabled and s.homed and (s.interp_state == 
linuxcnc.INTERP_IDLE):
                       c.mode(linuxcnc.MODE_MDI)
                       while c.wait_complete() == -1:
                               pass

                       c.mdi(cmd)
                       while c.wait_complete() == -1:
                               pass

       def on_touchoffXYbtn_pressed(self,obj,data=None):
               t = Tkinter.Tk(); t.wm_withdraw()

               c = linuxcnc.command()
               s = linuxcnc.stat()
               s.poll()
               start_mode = s.motion_mode

               c.mode(linuxcnc.MODE_MDI)
               self.mdi_exec(c,s,"G10 L20 P1 X0Y0")

               try:
                  msg = t.tk.call("send", "axis", ("remote","reload_file"))
               except:
                  pass
               while c.wait_complete() == -1:
                  pass

               c.mode(start_mode)
               while c.wait_complete() == -1:
                  pass

       def on_gomachinezero_btn_pressed(self,obj,data=None):
               c = linuxcnc.command()
               s = linuxcnc.stat()
               s.poll()
               start_mode = s.motion_mode

               self.mdi_exec(c,s,"G53 G0 Z0")
               self.mdi_exec(c,s,"G53 G0 X0Y0Z0")

               c.mode(start_mode)
               while c.wait_complete() == -1:
                  pass

       def on_gohome_btn_pressed(self,obj,data=None):
               c = linuxcnc.command()
               s = linuxcnc.stat()
               s.poll()
               start_mode = s.motion_mode

               self.mdi_exec(c,s,"G53 G0 Z0")
               self.mdi_exec(c,s,"G0 X0Y0")
               self.mdi_exec(c,s,"G0 Z0")

               c.mode(start_mode)
               while c.wait_complete() == -1:
                  pass

As you can see we are saving the initial MODE (Axis tab state), and restoring 
that after the gcode (and/or reload) is completed.  The touch off/reload 
definition seems to complete 100% of the time - always restoring Axis to the 
tab it started in.  The other two definitions however only complete about 90% 
of the time.  What we suspect (though don’t know for sure) is that even though 
we are requesting the mode change and Linuxcnc indeed changes it's mode, Axis 
does not poll, for some reason, and so doesn’t get the message and change it’s 
tab to manual.   Again, it does work about 90% of the time, but 1 out of 10 
times or so Axis just doesn’t change back to the Manual Mode after going into 
MDI mode to execute the commands.   Even if we explicitly change mode to manual 
( c.mode(linuxcnc.MODE_MANUAL)) rather than using our saved start_mode value 
(c.mode(start_mode)), it still fails intermittently.

Considering that the first touch off definition seems to complete correctly is 
there something about the fact that we are tickling Axis to reload the the file 
that is helping us?  That is happening before the restore mode though so I 
don’t understand why it would.   I don’t NEED to reload the file on the moves 
to machine zero or home point but I guess I could try that.  Or is there some 
other way to yell at Axis to poll and get in sync?  If that is what is failing.

-Tom



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to