Preparing to Issue a Command
Edit gui5.ini file and remove the comments from the following items and leave HOME_SEQUENCE commented out.
#HOME_SEARCH_VEL = 20.0 #HOME_LATCH_VEL = 20.0 #HOME_USE_INDEX = NO #HOME_IGNORE_LIMITS = NO #HOME_SEQUENCE = 0 #HOME_IS_SHARED = 1 to HOME_SEARCH_VEL = 20.0 HOME_LATCH_VEL = 20.0 HOME_USE_INDEX = NO HOME_IGNORE_LIMITS = NO #HOME_SEQUENCE = 0 HOME_IS_SHARED = 1
Adding a Command
Next we will add a couple of commands to our on_home_x_clicked function. The self.c.home(0) sends the command to home axis X. The self.c.wait_complete() waits for the command to complete. So now our function should look like this.
def on_home_x_clicked(self, widget, data=None): print 'home x button clicked' print 'homing ok status for x =', self.homing_ok(0) if self.homing_ok(0): print 'homing axis 0' self.c.home(0) self.c.wait_complete() print 'axis 0 homed' else: print 'can not home axis 0'
Run the config again and test out the Home X buttons with the E Stop in and Power off, then test with the E Stop off etc. to see the debugging print. Your config should home the X axis and move a bit then put the homed icon on the backplot.
Your GUI should look like this now.