Need your help on probe screen. Broke his whole head

More
2 years 9 months ago #289561 by Serg452
The situation is this - after updating to 2.9, I can't make the probe screen by vers work completely.
I converted one version myself from the verified version to 2.8, the second (newer) version here on the forum. As a result, the same appears in both!!! error - Outside measure X- stops after the macro has been run, does not return the axis to the start position, and does not reset the coordinate.
 

Attachment not found


 

Attachment not found


If you use a complex measurement (for example, the center of a hole or the center of two walls), everything works fine. For more than a week I have not been able to find a solution, like the macro code is identical, the python code for X + and X is also identical.
 

Attachment not found



Who understands the code well - I ask you to help!!!
If moderators think this topic is for another section - please move to the correct one.
In the attachment sim configuration in which you can see the problem
Code:
# X+ def on_xp_released(self, gtkbutton, data = None): self.command.mode( linuxcnc.MODE_MDI ) self.command.wait_complete() # move X - xy_clearance s="""G91 G1 X-%f G90""" % (self.spbtn1_xy_clearance.get_value()) if self.gcode(s) == -1: return if self.z_clearance_down() == -1: return # Start xplus.ngc if self.ocode ("O<xplus> call") == -1: return a=self.probed_position_with_offsets() xres=float(a[0])+0.5*self.spbtn1_probe_diam.get_value() self.lb_probe_xp.set_text( "%.4f" % xres ) self.lenght_x() self.add_history(gtkbutton.get_tooltip_text(),"XpLx",0,0,xres,self.lenght_x(),0,0,0,0,0,0,0) # move Z to start point up if self.z_clearance_up() == -1: return # move to finded point s = """G1 X%f M65P0""" % xres if self.gcode(s) == -1: return self.set_zerro("X") # X- def on_xm_released(self, gtkbutton, data = None): self.command.mode( linuxcnc.MODE_MDI ) self.command.wait_complete() # move X + xy_clearance s="""G91 G1 X%f G90""" % (self.spbtn1_xy_clearance.get_value()) if self.gcode(s) == -1: return if self.z_clearance_down() == -1: return # Start xminus.ngc if self.ocode ("O<xminus> call") == -1: return a=self.probed_position_with_offsets() xres=float(a[0]-0.5*self.spbtn1_probe_diam.get_value()) self.lb_probe_xm.set_text( "%.4f" % xres ) self.lenght_x() self.add_history(gtkbutton.get_tooltip_text(),"XmLx",xres,0,0,self.lenght_x(),0,0,0,0,0,0,0) # move Z to start point up if self.z_clearance_up() == -1: return # move to finded point s = """G1 X%f M65P0""" % (xres) if self.gcode(s) == -1: return self.set_zerro("X")

Please Log in to join the conversation.

More
2 years 9 months ago #289563 by cmorley
I would add some print statements to find out where it stalls at.

Please Log in to join the conversation.

More
2 years 9 months ago #289565 by Serg452
As far as I understand, stopping after the end of the xminus.ngc macro.
Can you specify an example of how to output a print operator? I'm sorry

Please Log in to join the conversation.

Time to create page: 0.193 seconds
Powered by Kunena Forum