Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Captain_sq on May 27, 2017, 07:23:20 AM

Title: Reference all axes (Home) on a machine without limit switches
Post by: Captain_sq on May 27, 2017, 07:23:20 AM
When jogging to the "home" position and pressing the [Reference all] button, machine coordinates does not reset to zero. Why?

In homing/Linits the [In place] is checked. All limit switches are disabled in my PoKeys plug-in and in Mach config.
In Mach3 there was an "Auto Zero" option to make this happen but this is not present in Mach4.

Any suggestions?
Title: Re: Reference all axes (Home) on a machine without limit switches
Post by: Captain_sq on May 30, 2017, 07:27:15 AM
Additional info: When i power-cycle the controller/pokeys motion controller and restart Mach4 it starts with machine coordinates at 0, 0, 0. That seems to be the only way right now to do the referencing. Otherwise, the machine, Pokeys 57DB25 and Mach4 works fine and runs a Fusion360 .tap file smooth as a babys arse. Just this button home referencing does not work as expected. I interpret this as I must have homing/limit switches setup to do a proper homing maneuvre. I'll try to setup and fake the three switches by pressing them by hand to see if that maybe will work. Maybe look at the lua code for that button too.
Title: Re: Reference all axes (Home) on a machine without limit switches
Post by: Chaoticone on May 30, 2017, 10:08:14 AM
Home in place should work. Make sure you do not have any axis enabled that you do not have Home in Place enabled for. Also, make sure your looking at machine coordinates and not work coordinates. Referencing does not change work offsets, only the positions work offsets are relative to.

Might want to start with a single axis. Get one axis doing as it should then add the next.
Title: Re: Reference all axes (Home) on a machine without limit switches
Post by: Captain_sq on May 31, 2017, 03:27:24 AM
Still no luck. I have a CNC3040T which has 4 axes and a PoKeys57db25USB external motion controller. The A axis is a rotary type which of course cannot have a home switch.
I use the wx4 screen set and have disabled the A axis because I don't use it for the moment.

- The motor tuning tab, Motor3 is uncecked
- The Axis mapping tab has only X, Y and Z mapped.
- The Homing/softlimits tab only the X, Y and Z is set to Home in place. The soft limits are set to within the travel of the table and stroke of the Z axis (0...270, 0...370, -55...0 all in mm).
- The input signals tab only has E-Stop and Probe inputs defined and mapped
- The output signals only has Enable signals mapped to Motor 0, 1 and 2

When I klick the "ref all" button, whilst wtching the machine coords, the DRO leds turns green but DOES NO reset to 0.000 for the enabled axes X, Y and Z.
I get an error rmessage that says "Step pulse overflow" with numbers I don't understand.

Maybe this can shed some light over things for you experts out there.

Thanks in advance, /Thom
Title: Re: Reference all axes (Home) on a machine without limit switches
Post by: Captain_sq on July 04, 2017, 04:04:14 PM
Still haven't solved the home-in-place issue. When hitting the Reference all axes (home) button the DRO is not reset to Zero for all enabled axes. The DRO LEDs however, almost always turn green. In a few instances it won't. Often, there is a error message in the history line stating
Code: [Select]
Motion steps overflow (9600) - check motor speed parameters (0 -> 9600  / incr: 0) - move 1018673
Motion steps overflow (-9600) - check motor speed parameters (9600 -> 0  / incr: 0) - move 1018674
What does this mean exatcly?

I've logged the events occurring when the home button is pressed. These are as follows:
Code: [Select]
2017-07-04 21:42:17.046 - API: mcAxisDerefAll(inst = 0) (Mach4GUI LUA script)
2017-07-04 21:42:17.047 - API: mcAxisDeref(inst = 0, axis = 0) (Mach4GUI LUA script)
2017-07-04 21:42:17.047 - API: mcAxisDeref(inst = 0, axis = 1) (Mach4GUI LUA script)
2017-07-04 21:42:17.047 - API: mcAxisDeref(inst = 0, axis = 2) (Mach4GUI LUA script)
2017-07-04 21:42:17.047 - API: mcAxisDeref(inst = 0, axis = 3) (Mach4GUI LUA script)
2017-07-04 21:42:17.047 - API: mcAxisHomeAll(inst = 0) (Mach4GUI LUA script)
2017-07-04 21:42:17.047 - Attempt transition from "Idle" on event "Home" Command.cpp:934
2017-07-04 21:42:17.047 - S_IDLE_on_exit
2017-07-04 21:42:17.047 - ACION_start_homing
2017-07-04 21:42:17.047 - S_HOMING_on_entry
2017-07-04 21:42:17.048 - [PoKeys]  [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_SET_MOTOR_ZERO (1027), wparam = 2, lparam = -200

2017-07-04 21:42:17.048 - API: mcAxisHomeComplete(inst = 0, axis = 2) (unknown caller)
2017-07-04 21:42:17.048 - Signal id 1131, (Z Homed), changed from LOW to HIGH.
2017-07-04 21:42:17.048 - Attempt transition from "Homing" on event "Stop Home" Command.cpp:1041
2017-07-04 21:42:17.048 - S_HOMING_on_exit
2017-07-04 21:42:17.048 - ACTION_stop_homing
2017-07-04 21:42:17.048 - SyncPosition()! Clearing planner.
2017-07-04 21:42:17.049 - S_IDLE_on_entry
2017-07-04 21:42:17.049 - Attempt transition from "Idle" on event "Home" Command.cpp:980
2017-07-04 21:42:17.049 - S_IDLE_on_exit
2017-07-04 21:42:17.049 - ACION_start_homing
2017-07-04 21:42:17.050 - S_HOMING_on_entry
2017-07-04 21:42:17.050 - [PoKeys]  [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_SET_MOTOR_ZERO (1027), wparam = 0, lparam = 800

2017-07-04 21:42:17.050 - API: mcAxisHomeComplete(inst = 0, axis = 0) (unknown caller)
2017-07-04 21:42:17.051 - Signal id 1129, (X Homed), changed from LOW to HIGH.
2017-07-04 21:42:17.051 - Attempt transition from "Homing" on event "Stop Home" Command.cpp:1041
2017-07-04 21:42:17.051 - S_HOMING_on_exit
2017-07-04 21:42:17.051 - ACTION_stop_homing
2017-07-04 21:42:17.051 - SyncPosition()! Clearing planner.
2017-07-04 21:42:17.052 - S_IDLE_on_entry
2017-07-04 21:42:17.052 - Attempt transition from "Idle" on event "Home" Command.cpp:980
2017-07-04 21:42:17.052 - S_IDLE_on_exit
2017-07-04 21:42:17.053 - ACION_start_homing
2017-07-04 21:42:17.053 - S_HOMING_on_entry
2017-07-04 21:42:17.053 - [PoKeys]  [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_SET_MOTOR_ZERO (1027), wparam = 1, lparam = 9600

2017-07-04 21:42:17.053 - API: mcAxisHomeComplete(inst = 0, axis = 1) (unknown caller)
2017-07-04 21:42:17.053 - Signal id 1130, (Y Homed), changed from LOW to HIGH.
2017-07-04 21:42:17.054 - Attempt transition from "Homing" on event "Stop Home" Command.cpp:1041
2017-07-04 21:42:17.054 - S_HOMING_on_exit
2017-07-04 21:42:17.054 - ACTION_stop_homing
2017-07-04 21:42:17.054 - SyncPosition()! Clearing planner.
2017-07-04 21:42:17.054 - S_IDLE_on_entry
2017-07-04 21:42:17.055 - Attempt transition from "Idle" on event "Home" Command.cpp:980
2017-07-04 21:42:17.055 - S_IDLE_on_exit
2017-07-04 21:42:17.055 - ACION_start_homing
2017-07-04 21:42:17.055 - [PoKeys] New commanded position 0.000 9600.000 0.000
2017-07-04 21:42:17.055 - S_HOMING_on_entry
2017-07-04 21:42:17.055 - [PoKeys] Motion steps overflow (9600) - check motor speed parameters (0 -> 9600  / incr: 0) - move 1018673
2017-07-04 21:42:17.055 - [PoKeys] Motion steps overflow (9600) - check motor speed parameters (0 -> 9600  / incr: 0) - move 1018673
2017-07-04 21:42:17.055 - API: mcCntlEStop(inst = 0) (unknown caller)
2017-07-04 21:42:17.056 - [PoKeys]  [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_SET_MOTOR_ZERO (1027), wparam = 3, lparam = 0

2017-07-04 21:42:17.056 - API: mcAxisHomeComplete(inst = 0, axis = 3) (unknown caller)
2017-07-04 21:42:17.056 - API: mcCntlEnable(inst = 0, FALSE) (unknown caller)
2017-07-04 21:42:17.056 - Signal id 1132, (A Homed), changed from LOW to HIGH.
2017-07-04 21:42:17.056 - Attempt transition from "Homing" on event "Stop Home" Command.cpp:1041
2017-07-04 21:42:17.056 - S_HOMING_on_exit
2017-07-04 21:42:17.056 - ACTION_stop_homing
2017-07-04 21:42:17.056 - SyncPosition()! Clearing planner.
2017-07-04 21:42:17.057 - API: mcCntlCycleStop(inst = 0) (unknown caller)
2017-07-04 21:42:17.057 - [PoKeys]  [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_CYCLE_STOP (1002), wparam = 0, lparam = 0

2017-07-04 21:42:17.057 - S_IDLE_on_entry
2017-07-04 21:42:17.058 - Signal id 1018, (Enable #0), changed from HIGH to LOW.
2017-07-04 21:42:17.058 - [PoKeys]  [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_IO_CHANGED (1012), wparam = 193600032, lparam = 1

2017-07-04 21:42:17.058 - [PoKeys] New commanded position 0.000 0.000 0.000
2017-07-04 21:42:17.058 - Signal id 1019, (Enable #1), changed from HIGH to LOW.
2017-07-04 21:42:17.058 - [PoKeys] Motion steps overflow (-9600) - check motor speed parameters (9600 -> 0  / incr: 0) - move 1018674
2017-07-04 21:42:17.058 - [PoKeys] Motion steps overflow (-9600) - check motor speed parameters (9600 -> 0  / incr: 0) - move 1018674
2017-07-04 21:42:17.058 - API: mcCntlEStop(inst = 0) (unknown caller)
2017-07-04 21:42:17.058 - [PoKeys]  [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_IO_CHANGED (1012), wparam = 193592024, lparam = 1

2017-07-04 21:42:17.059 - Signal id 1020, (Enable #2), changed from HIGH to LOW.
2017-07-04 21:42:17.059 - API: mcCntlEnable(inst = 0, FALSE) (unknown caller)
2017-07-04 21:42:17.059 - [PoKeys]  [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_IO_CHANGED (1012), wparam = 193619504, lparam = 1

2017-07-04 21:42:17.059 - Signal id 1021, (Enable #3), changed from HIGH to LOW.
2017-07-04 21:42:17.059 - [PoKeys]  [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_IO_CHANGED (1012), wparam = 193614576, lparam = 1

2017-07-04 21:42:17.060 - Signal id 1120, (Machine Enabled), changed from HIGH to LOW.
2017-07-04 21:42:17.060 - [PoKeys]  [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_ENABLE (1008), wparam = 0, lparam = 0

2017-07-04 21:42:17.060 - [PoKeys] Mach4 disabled!

2017-07-04 21:42:17.060 - [PoKeys] PoKeys_24608 - MotionDisable

2017-07-04 21:42:17.061 - [PoKeys]  [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_ENABLE (1008), wparam = 0, lparam = 0

2017-07-04 21:42:17.061 - [PoKeys] PoKeys Pulse engine disabled
2017-07-04 21:42:17.061 - [PoKeys] Mach4 disabled!

2017-07-04 21:42:17.061 - [PoKeys] PoKeys_24608 - MotionDisable

2017-07-04 21:42:17.062 - [PoKeys] Disabling motion - Buffer with 13 moves is being cleared!
2017-07-04 21:42:17.063 - [PoKeys] Axis enabled changed 0

2017-07-04 21:42:17.064 - [PoKeys] Updating enable output signals
2017-07-04 21:42:17.064 - [PoKeys] PoKeys Pulse engine disabled
2017-07-04 21:42:17.569 - [PoKeys]  [msg] PluginInstanceProcessAsyncMsg mInst = 0, msg = MSG_GUI_FOCUS (1030), wparam = 0, lparam = 0


Perhaps this will tell you experts what is the matter with this situation.
What should I do?
Title: Re: Reference all axes (Home) on a machine without limit switches
Post by: joeaverage on July 04, 2017, 08:29:09 PM
Hi,
when you say the DROs do not reset are they configured to display work co-ords or machine co-ords?.

When you have 'homed in place' have a look on the diagnostics tab and see what the machine co-ords are.

Craig
Title: Re: Reference all axes (Home) on a machine without limit switches
Post by: joeaverage on July 05, 2017, 02:31:01 AM
Hi,
only other suggestion you might try is on Machs Homing and Limits page in the home order column set to zero ALL axes OTHER than X,Y,Z.
I'm thinking that the error logging you're seeing is related to axes which are not assigned or have home switches.

Craig
Title: Re: Reference all axes (Home) on a machine without limit switches
Post by: Captain_sq on July 05, 2017, 03:07:48 AM
Hi,
when you say the DROs do not reset are they configured to display work co-ords or machine co-ords?.

When you have 'homed in place' have a look on the diagnostics tab and see what the machine co-ords are.

Craig

1. Machine coordinates.
2. Haven't done that, I will check later today.

It might be useful to know that this function worked well in Mach3 with the Mach3  PoKeys plugin. The main difference between Mach3 and Mach4 in this respect is the option to reset the machine coordinates at the homing operation or not. This option is not to my knowledge present with Mach4.

Title: Re: Reference all axes (Home) on a machine without limit switches
Post by: joeaverage on July 05, 2017, 03:51:35 AM
Hi,
'home in place' works exactly as expected here. I use an ESS however I don't think the plugin has any bearing on 'home in place' at all.

'Home in place' is part of Machs setup and it means 'don't bother looking for a home switch signal from the motion controller', ie the controller/plugin have
no bearing at all.

I note also that you have set data for soft limits. If you are homing in place then soft limits are irrelevant, they only have meaning if the machine co-ord zero
is at some sensible and REPEATABLE place, home in place doesn't really qualify.

I know some very experienced CNCers say otherwise but setting up decent home switches was the single best thing I've done to make my machine usable and
crash resistant, I can still crash it but I have to try hard!

Craig