Need your help on probe screen. Broke his whole head

More
02 Jan 2024 13:52 - 02 Jan 2024 14:05 #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.
 
 
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.
 

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
# 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")
Attachments:
Last edit: 02 Jan 2024 14:05 by Serg452.

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

More
02 Jan 2024 13:59 #289563 by cmorley
I would add some print statements to find out where it stalls at.

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

More
02 Jan 2024 14:10 #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 or Create an account to join the conversation.

Moderators: newbynobiHansU
Time to create page: 0.106 seconds
Powered by Kunena Forum