Wednesday, 31 March 2021

Setting the homing move parameters - and sneaky GUI button macros

X Axis Homing parameters:

Struggled a bit with this, despite having spent some time with it a week or so ago. Here's the crux of what I've got, having done a lot more trial and error ("playing") with the settings:


[AXIS_X]
MIN_LIMIT = -100
MAX_LIMIT = 1.0

[JOINT_0]

HOME = 0.000
HOME_OFFSET = 2.0

MIN_LIMIT = -100.0
MAX_LIMIT = 1.0

# Duplicated?
# HOME_OFFSET = 0 

  • HOME is where the axis moves - AFTER setting the home zero position
  • HOME_OFFSET is the offset between home switch and where machine zero is to be set
  • For some reason, we need to specify the limits in both [AXIS_X] and [JOINT_0]. Not clear why.
Here's what I ended up with:

[JOINT_0]

HOME =                          0.000
FERROR =                        10
MIN_FERROR =                    1.00
MAX_VELOCITY =                  50
MAX_ACCELERATION =              100.0
BACKLASH =                      0.000
INPUT_SCALE =                   -200 
OUTPUT_SCALE =                  1.000
HOME_OFFSET =                   2.0

P =                             1.0
I =                             0.0 
D =                             0.0
FF0 =                           0.0
FF1 =                           1.0
FF2 =                           0.0
BIAS =                          0.0
DEADBAND =                      0.0
MAX_OUTPUT =                    0.0

STEPLEN    =                    2500
STEPSPACE  =                    2500  
STEP_SCALE =                    1000.0 

MIN_LIMIT =                     -100.0
MAX_LIMIT =                     1

Go Home (GUI button) and go_to_home.ngc macro:

I got confused about the "Go Home" button in the GUI and the above homing parameters. What I overlooked is that the GUI buttons mainly just call up macros from the subroutines subfolder  in the Probe Basic Lathe folder.

Here's what the go_to_home.ngc macro looks like. Nothing special really:

O<go_to_home> sub

G0 G53
; G53 G0 Z0
G53 G0 X0

O<go_to_home> endsub

M2

It simply tells the machine to go to machine coords X0 and Z0. Clearly, X0 and Z0 need to lie within the soft limits for this to work out. I've also commented out the Z0 move, since I haven't set up the Z homing moves yet - on account of the fact that I haven't fitted any homing / limit switches.


No comments:

Post a Comment

TIG welder up and running - after some fault diagnostics and repair

Finally got some time to connect up the flow meter and argon hose. Plugged in the torch and ground cables and the torch hose etc. Powered it...