Saturday, 13 February 2021

LinuxCNC homing sequences - setting up homing in Probe Basic Lathe

Status:

I got homing sort of set up using the PNCConf utility and copied the changes into the Probe Basic setup - simply by copying the resulting .hal file across. That's he advanage of using the same name for the .hal file as the one autocreated by PNCConf for the Axis version.

I found I had to invert the switch polarity to get homing to work when I copied the .hal file from Axis to Probe Basic. I also had to add to add the parameter value for this line in the .hal file...

setp hm2_5i25.0.encoder.00.scale [SPINDLE_0]ENCODER_SCALE

...by going into the .ini file and inserting his line:

[SPINDLE_0]
P = 0.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 2000.0
ENCODER_SCALE = 4000.0
OUTPUT_SCALE = 2000
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 2000

I guess PNCConf must have inserted that into the Axis .ini file, although the vast majority of the changes are contained within the .hal file.

To avoid LinuxCNC bombing out at startup. So it appears that the .ini file had to have that minor change made in addition to the .hal file changes.

Homing:

Ho hum. But I have homing working wih Probe Basic now. However, there are 4 different schemes for the homing sequence and the various distances etc need to understood and set to suitable values. It's not difficult to understand in principle but you have to understand the naming and operating modes they have chosen to use before you can sensibly set values. So far I have been operating the microswitch whilst watching the GUI to figure out where to press and release it, mimicing the homing moves.

The homing sequences etc are defined here.

 

I don't plan to use the index pulse yet, so I should select one of the first 2 options.

 

So I need to set HOME_SEARCH_VEL and HOME_LATCH_VEL, as well as setting HOME_USE_INDEX to zero.

Each of the "Joints" has the following section:

HOME_OFFSET = 10.000000
HOME_SEARCH_VEL = -3.316667
HOME_LATCH_VEL = -0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 1

How to set this stuff?

HOME_SEARCH_VEL:

This variable has units of machine-units per second. The default value is zero. A value of zero causes LinuxCNC to assume that there is no home switch; the search stage of homing is skipped.

If it is non-zero, then LinuxCNC assumes that there is a home switch. It begins by checking whether the home switch is already tripped. If tripped it backs off the switch at HOME_SEARCH_VEL. The direction of the back-off is opposite the sign of HOME_SEARCH_VEL. Then it searches for the home switch by moving in the direction specified by the sign of HOME_SEARCH_VEL, at a speed determined by its absolute value. When the home switch is detected, the joint will stop as fast as possible, but there will always be some overshoot. The amount of overshoot depends on the speed. If it is too high, the joint might overshoot enough to hit a limit switch or crash into the end of travel. On the other hand, if too low, homing can take a long time.

HOME_LATCH_VEL:

This variable has units of machine-units per second. Specifies the speed and direction that LinuxCNC uses when it makes its final accurate determination of the home switch (if present) and index pulse location (if present). It will usually be slower than the search velocity to maximize accuracy. If HOME_SEARCH_VEL and HOME_LATCH_VEL have the same sign, then the latch phase is done while moving in the same direction as the search phase. (In that case, LinuxCNC first backs off the switch, before moving towards it again at the latch velocity.) If HOME_SEARCH_VEL and HOME_LATCH_VEL have opposite signs, the latch phase is done while moving in the opposite direction from the search phase. That means LinuxCNC will latch the first pulse after it moves off the switch. If HOME_SEARCH_VEL is zero (meaning there is no home switch), and this parameter is nonzero, LinuxCNC goes ahead to the index pulse search. If HOME_SEARCH_VEL is non-zero and this parameter is zero, it is an error and the homing operation will fail. The default value is zero.

HOME_FINAL_VEL:

This variable has units of machine-units per second. It specifies the speed that LinuxCNC uses when it makes its move from HOME_OFFSET to the HOME position. If the HOME_FINAL_VEL is missing from the ini file, then the maximum joint speed is used to make this move. The value must be a positive number.



That seems to be the background. I'll need to figure out the distances and speeds when I have the X and Z axes finally running.....

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...