When I use the home function to zero all the axes, I can't manipulate the jog mo

More
29 Jul 2021 03:32 #216184 by yi2580
Hello everyone, I have now written a GUI interface to control the three axes, but after using this code (home function) to reset them one by one, I can no longer operate these axes for jog movement. Is there any good solution?
Thank you very much for answering my question
  def on_Home_x_clicked(self, widget, data=None):
    print 'home x button clicked'
    self.c.mode(linuxcnc.MODE_MANUAL)            
    if self.status.homed:
       print 'homing axis 0'
       self.c.home(0)
       self.c.wait_complete()
       print 'axis 0 homed'
    else:
       print 'can not home axis 0' 

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

More
29 Jul 2021 08:43 #216199 by tommylight
No double posting, makes it really hard to keep track.
Thank you.

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

More
29 Jul 2021 08:53 #216200 by yi2580
This is the function of my jog motion
  def on_jd_x_pressed(self, widget, data=None):
    print'jdx'
    self.entry33 = self.builder.get_object("entry33")
    self.jdx = float(self.entry33.get_text())
    self.c.jog(self.emc.JOG_INCREMENT, 1,0,(self.builder.get_object("jog_speedx").get_value() / 60),self.jdx)
    print 'jdx=',self.jdx

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

More
29 Jul 2021 15:50 #216235 by Aciera
Not sure if that has something to do with it:

Usually before homing the system is in 'joint' mode (eg halui.joint.0.plus will work for jogging) after homing the system is in axis mode (eg halui.axis.x.plus will need to be used)

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

More
30 Jul 2021 01:04 #216289 by yi2580
Hello, thank you very much for your reply
How can I return the system to the joint mode after I classify it as?( I use three axes. As long as I return all three axes to zero, I can't jog, but as long as one axis hasn't returned to zero, each axis can jog)
Thanks again

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

More
30 Jul 2021 02:00 #216291 by cmorley
What version of linuxcnc are you using?

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

More
30 Jul 2021 03:03 #216294 by yi2580
I use version 2.8.1. Do you know how to solve this problem?

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

More
30 Jul 2021 04:21 - 30 Jul 2021 04:27 #216298 by cmorley
self.c.jog(self.emc.JOG_INCREMENT, 1,0,(self.builder.get_object("jog_speedx").get_value() / 60),self.jdx)

looks like you hard coded joint mode - that the 1 in your jog command and that requires a particular mode - teleop_enable(0)
Once homing finishes you want to jog axes not joints.
joints/axis in linuxcnc is a pain, but does give more capability.

I would suggest you look at the guis included in linuxcnc to see how this is worked out.

and look at the python command docs.
linuxcnc.org/docs/2.8/html/config/python...mand_code_attributes
Last edit: 30 Jul 2021 04:27 by cmorley.

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

More
30 Jul 2021 04:44 #216299 by yi2580
OK, thank you very much for answering my question,

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

More
30 Jul 2021 05:08 #216303 by yi2580
Hello, I've read the function you said carefully. I still don't know the difference between axes and joins. I think there are no joins in the old version of Linux CNC. This is my chagrin.
I hope you can give me some guidance. Thank you

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

Time to create page: 0.096 seconds
Powered by Kunena Forum