Hello Guest it is April 24, 2024, 01:46:10 PM

Author Topic: How do I disable fixture offset (after reference all axes)?  (Read 2510 times)

0 Members and 1 Guest are viewing this topic.

Re: How do I disable fixture offset (after reference all axes)?
« Reply #20 on: May 15, 2022, 06:34:16 PM »
Ok, sorry for the delay - life has a way of slowing down things!

I enabled debugging and here is the log. I watched the machine very closely and was able to "tag" the line where ref all home should have completed. But the machine then continued to move to the fixture offset position as I've described in the first post. Here's the log file with comments. Further down I've commented a line that asserts a G0 X0 Y0 Z0 F30 move - that might be the issue? Since G54 has been issued in the machine startup then, might this move be performed in the work offset space? That at least would explain the behavior. But, how to stop this from happening?

I haven't tried adding a G53 to the Mach configuration General tab.

Code: [Select]
2022-05-15 18:19:46.923 - API: mcAxisDerefAll(inst = 0) (unknown caller)
2022-05-15 18:19:46.923 - API: mcAxisDeref(inst = 0, axis = 0) (unknown caller)
2022-05-15 18:19:46.923 - Signal id 1129, (X Homed), changed from HIGH to LOW.
2022-05-15 18:19:46.924 - API: mcAxisDeref(inst = 0, axis = 1) (unknown caller)
2022-05-15 18:19:46.924 - Signal id 1130, (Y Homed), changed from HIGH to LOW.
2022-05-15 18:19:46.924 - API: mcAxisDeref(inst = 0, axis = 2) (unknown caller)
2022-05-15 18:19:46.924 - Signal id 1131, (Z Homed), changed from HIGH to LOW.
2022-05-15 18:19:46.924 - API: mcAxisHomeAll(inst = 0) (unknown caller)
2022-05-15 18:19:46.924 - Attempt transition from "Idle" on event "Home" command.cpp:1248
2022-05-15 18:19:46.925 - S_IDLE_on_exit
2022-05-15 18:19:46.925 - Signal id 1172, (Machine Idle), changed from HIGH to LOW.
2022-05-15 18:19:46.925 - ACION_start_homing
2022-05-15 18:19:46.925 - S_HOMING_on_entry
2022-05-15 18:19:48.687 - Signal id 65, (Motor 0 Home), changed from LOW to HIGH.
2022-05-15 18:19:48.687 - Signal id 1002, (X Home), changed from LOW to HIGH.
2022-05-15 18:19:48.688 - Signal id 66, (Motor 1 Home), changed from LOW to HIGH.
2022-05-15 18:19:48.688 - Signal id 1005, (Y Home), changed from LOW to HIGH.
2022-05-15 18:19:48.689 - Signal id 67, (Motor 2 Home), changed from LOW to HIGH.
2022-05-15 18:19:48.689 - Signal id 1008, (Z Home), changed from LOW to HIGH.
2022-05-15 18:19:49.257 - Signal id 65, (Motor 0 Home), changed from HIGH to LOW.
2022-05-15 18:19:49.257 - Signal id 1002, (X Home), changed from HIGH to LOW.
2022-05-15 18:19:49.257 - Signal id 66, (Motor 1 Home), changed from HIGH to LOW.
2022-05-15 18:19:49.257 - Signal id 1005, (Y Home), changed from HIGH to LOW.
2022-05-15 18:19:49.258 - Signal id 67, (Motor 2 Home), changed from HIGH to LOW.
2022-05-15 18:19:49.258 - Signal id 1008, (Z Home), changed from HIGH to LOW.
2022-05-15 18:19:49.498 - API: mcMotorSetHomePos(inst = 0, motor = 2, count = 0) (PMDX-SmartBOB-USB)
2022-05-15 18:19:49.498 - API: mcAxisHomeCompleteWithStatus(inst = 0, axis = 2, success = TRUE) (PMDX-SmartBOB-USB)
2022-05-15 18:19:49.498 - Signal id 1131, (Z Homed), changed from LOW to HIGH.
2022-05-15 18:19:49.499 - API: mcMotionSync(inst = 0) (PMDX-SmartBOB-USB)
2022-05-15 18:19:49.499 - SyncPosition()! Clearing planner.
2022-05-15 18:19:54.341 - Signal id 65, (Motor 0 Home), changed from LOW to HIGH.
2022-05-15 18:19:54.341 - Signal id 1002, (X Home), changed from LOW to HIGH.
2022-05-15 18:19:54.342 - Signal id 66, (Motor 1 Home), changed from LOW to HIGH.
2022-05-15 18:19:54.342 - Signal id 1005, (Y Home), changed from LOW to HIGH.
2022-05-15 18:19:54.343 - Signal id 67, (Motor 2 Home), changed from LOW to HIGH.
2022-05-15 18:19:54.343 - Signal id 1008, (Z Home), changed from LOW to HIGH.
2022-05-15 18:19:55.663 - Signal id 65, (Motor 0 Home), changed from HIGH to LOW.
2022-05-15 18:19:55.663 - Signal id 1002, (X Home), changed from HIGH to LOW.
2022-05-15 18:19:55.664 - Signal id 66, (Motor 1 Home), changed from HIGH to LOW.
2022-05-15 18:19:55.664 - Signal id 1005, (Y Home), changed from HIGH to LOW.
2022-05-15 18:19:55.664 - Signal id 67, (Motor 2 Home), changed from HIGH to LOW.
2022-05-15 18:19:55.665 - Signal id 1008, (Z Home), changed from HIGH to LOW.
2022-05-15 18:19:55.846 - API: mcMotorSetHomePos(inst = 0, motor = 0, count = 0) (PMDX-SmartBOB-USB)
2022-05-15 18:19:55.846 - API: mcAxisHomeCompleteWithStatus(inst = 0, axis = 0, success = TRUE) (PMDX-SmartBOB-USB)
2022-05-15 18:19:55.846 - Signal id 1129, (X Homed), changed from LOW to HIGH.
2022-05-15 18:19:55.847 - API: mcMotionSync(inst = 0) (PMDX-SmartBOB-USB)
2022-05-15 18:19:55.847 - SyncPosition()! Clearing planner.
2022-05-15 18:20:00.072 - Signal id 65, (Motor 0 Home), changed from LOW to HIGH.
2022-05-15 18:20:00.073 - Signal id 1002, (X Home), changed from LOW to HIGH.
2022-05-15 18:20:00.073 - Signal id 66, (Motor 1 Home), changed from LOW to HIGH.
2022-05-15 18:20:00.073 - Signal id 1005, (Y Home), changed from LOW to HIGH.
2022-05-15 18:20:00.074 - Signal id 67, (Motor 2 Home), changed from LOW to HIGH.
2022-05-15 18:20:00.074 - Signal id 1008, (Z Home), changed from LOW to HIGH.
2022-05-15 18:20:01.390 - Signal id 65, (Motor 0 Home), changed from HIGH to LOW.
2022-05-15 18:20:01.390 - Signal id 1002, (X Home), changed from HIGH to LOW.
2022-05-15 18:20:01.391 - Signal id 66, (Motor 1 Home), changed from HIGH to LOW.
2022-05-15 18:20:01.391 - Signal id 1005, (Y Home), changed from HIGH to LOW.
2022-05-15 18:20:01.392 - Signal id 67, (Motor 2 Home), changed from HIGH to LOW.
2022-05-15 18:20:01.392 - Signal id 1008, (Z Home), changed from HIGH to LOW.

<< This is where homing appeared to be complete and the reference all home dialog popped up.
<< But then the machine moved to the Fixture Offset position that's stored in the G54 line of the Fixture Table

2022-05-15 18:20:01.588 - API: mcMotorSetHomePos(inst = 0, motor = 1, count = 0) (PMDX-SmartBOB-USB)
2022-05-15 18:20:01.588 - API: mcAxisHomeCompleteWithStatus(inst = 0, axis = 1, success = TRUE) (PMDX-SmartBOB-USB)
2022-05-15 18:20:01.588 - Signal id 1130, (Y Homed), changed from LOW to HIGH.
2022-05-15 18:20:01.589 - Attempt transition from "Homing" on event "Stop Home" command.cpp:1387
2022-05-15 18:20:01.589 - S_HOMING_on_exit
2022-05-15 18:20:01.589 - ACTION_stop_homing
2022-05-15 18:20:01.589 - SyncPosition()! Clearing planner.
2022-05-15 18:20:01.589 - S_IDLE_on_entry
2022-05-15 18:20:01.595 - Signal id 1172, (Machine Idle), changed from LOW to HIGH.
2022-05-15 18:20:01.595 - API: mcMotionSync(inst = 0) (PMDX-SmartBOB-USB)
2022-05-15 18:20:01.595 - SyncPosition()! Clearing planner.


<< This line may be the culprit
2022-05-15 18:20:01.606 - API: mcCntlGcodeExecute(inst = 0, commands = 'G0 X0 Y0 Z0 F30') (unknown caller)


2022-05-15 18:20:01.810 - Attempt transition from "Idle" on event "MDI Start" controller.cpp:2364
2022-05-15 18:20:01.810 - S_IDLE_on_exit
2022-05-15 18:20:01.810 - Signal id 1172, (Machine Idle), changed from HIGH to LOW.
2022-05-15 18:20:01.810 - ACTION_start_mdi
2022-05-15 18:20:01.810 - SoftSync()! Clearing planner.
2022-05-15 18:20:01.832 - S_MDI_RUNNING_on_entry
2022-05-15 18:20:01.832 - SoftSync()! Clearing planner. stateinterface.cpp:1351
2022-05-15 18:20:01.832 - S_MDI_RUNNING2_on_entry
2022-05-15 18:20:01.832 - Signal id 1114, (Gcode Running), changed from LOW to HIGH.
2022-05-15 18:20:01.844 - Waiting on planner to drain before waiting on SetStill... runcanon.cpp:92
2022-05-15 18:20:04.759 - Waiting on SetStill...
2022-05-15 18:20:04.759 - Controller::RunCanonBuffer called AddStopReportRequest() runcanon.cpp:101
2022-05-15 18:20:04.759 - Requesting a stopped report for axis 0 motors.
2022-05-15 18:20:04.759 - Requesting a stopped report for motor 0.
2022-05-15 18:20:04.759 - Requesting a stopped report for axis 1 motors.
2022-05-15 18:20:04.759 - Requesting a stopped report for motor 1.
2022-05-15 18:20:04.759 - Requesting a stopped report for axis 2 motors.
2022-05-15 18:20:04.759 - Requesting a stopped report for motor 2.
2022-05-15 18:20:05.006 - API: mcMotionSetStill(inst = 0, motor = 2) (PMDX-SmartBOB-USB)
2022-05-15 18:20:05.006 - SetStill(): Motor 2 last position reported = -6581.0000 controller.cpp:1400
2022-05-15 18:20:05.006 - Axis 0 reports that it is still moving! controller.cpp:1407
2022-05-15 18:20:05.020 - API: mcMotionSetStill(inst = 0, motor = 0) (PMDX-SmartBOB-USB)
2022-05-15 18:20:05.020 - SetStill(): Motor 0 last position reported = 27833.0000 controller.cpp:1400
2022-05-15 18:20:05.020 - Axis 1 reports that it is still moving! controller.cpp:1407
2022-05-15 18:20:05.020 - API: mcMotionSetStill(inst = 0, motor = 1) (PMDX-SmartBOB-USB)
2022-05-15 18:20:05.020 - SetStill(): Motor 1 last position reported = 24192.0000 controller.cpp:1400
2022-05-15 18:20:05.021 - All motors marked as still.
2022-05-15 18:20:05.021 - Waiting on SetStill is Done!
2022-05-15 18:20:05.021 - Attempt transition from "MDI Running" on event "Stop" gcodeexec.cpp:1359
2022-05-15 18:20:05.021 - S_MDI_RUNNING2_on_exit
2022-05-15 18:20:05.021 - Signal id 1114, (Gcode Running), changed from HIGH to LOW.
2022-05-15 18:20:05.021 - S_MDI_RUNNING_on_exit
2022-05-15 18:20:05.022 - ACTION_stop
2022-05-15 18:20:05.079 - S_IDLE_on_entry
2022-05-15 18:20:05.084 - Signal id 1172, (Machine Idle), changed from LOW to HIGH.
Re: How do I disable fixture offset (after reference all axes)?
« Reply #21 on: May 16, 2022, 07:48:05 AM »
This is not default Mach4 behaviour as far as I'm aware. Best thing to do is package your profile (go to Help > Support > Package Current Profile..) and then upload it here

Offline thosj

*
  •  532 532
    • View Profile
Re: How do I disable fixture offset (after reference all axes)?
« Reply #22 on: May 16, 2022, 08:02:38 AM »
One thing for sure, it's not G54s fault. Something, your RefAllHome script or something, is telling the machine to move. The telling thing is the F30 in that line you "suspect". Nothing would put F30 just pulled from thin air.

I'd go into the Mach4Hobby directory, find screenscript.lua, open it in Notepad or something, and search for the exact line that's moving the machine.

Just remember you can't edit screenscript.lua, it's compiled every time Mach4 starts from all the places Mach4 has scripts. You'd have to find where it is, screen load script, or whatever.

Like SwiftyJ says, package your profile and post it here and maybe someone can figure it out.
--
Tom
Re: How do I disable fixture offset (after reference all axes)?
« Reply #23 on: May 16, 2022, 08:21:49 AM »
Thanks gents. I'm working from home today so I'll do the suggestions above and report back.

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: How do I disable fixture offset (after reference all axes)?
« Reply #24 on: May 16, 2022, 09:00:26 AM »
Have you checked for a setting in the PMDX that might send the machine to a point after homing.
Without engineers the world stops
Re: How do I disable fixture offset (after reference all axes)?
« Reply #25 on: May 16, 2022, 02:29:13 PM »
Ok, I think I found the culprit. My Ref All Home left buttonup script calls a new function (in the screenstartupscript) called RefAllHomeWithOffset() that looks like this:
Code: [Select]
---------------------------------------------------------------
-- Ref All Home() function.
---------------------------------------------------------------
function RefAllHome()
    mc.mcAxisDerefAll(inst)  --Just to turn off all ref leds
    mc.mcAxisHomeAll(inst)
    coroutine.yield() --yield coroutine so we can do the following after motion stops
    ----See ref all home button and plc script for coroutine.create and coroutine.resume
    wx.wxMessageBox('Referencing is complete')
end
---------------------------------------------------------------
-- Ref All Home with Offset() function.
---------------------------------------------------------------
function RefAllHomeWithOffset()
    mc.mcAxisDerefAll(inst)  --Just to turn off all ref leds
    mc.mcAxisHomeAll(inst)
    coroutine.yield() --yield coroutine so we can do the following after motion stops
    ----See ref all home button and plc script for coroutine.create and coroutine.resume
    mc.mcCntlGcodeExecute(inst, "G0 X0 Y0 Z0 F30")
wx.wxMessageBox('Referencing and offset completed')
end

So there is the suspect move line. Apparently I had added this back in 2018 when there was discussion here about how to back off the home switches by a specified amount. At the time I was backing off .5" but later I realized the I got more build area by just letting it clear the switch, so I changed these to "0"s. However, the behavior seems to be different than it was when I implemented this. I don't ever recall the machine moving to the set x,y,z position in the table fixture table. Maybe that is a change with later Mach releases (last few years) as I have not used the machine much in 18 months or so.

I have not tested this yet but I'm hopeful it might be the culprit.

Offline Bill_O

*
  •  563 563
    • View Profile
Re: How do I disable fixture offset (after reference all axes)?
« Reply #26 on: May 16, 2022, 03:10:58 PM »
Thats it.
you can remove it from the left up or comment out the code
Re: How do I disable fixture offset (after reference all axes)?
« Reply #27 on: May 16, 2022, 03:49:50 PM »
Yeah, I removed it from left up but have not tested yet. I can do that later tonight.

Offline thosj

*
  •  532 532
    • View Profile
Re: How do I disable fixture offset (after reference all axes)?
« Reply #28 on: May 16, 2022, 04:10:30 PM »
Yeah, I removed it from left up but have not tested yet. I can do that later tonight.

You might have to change the left up script to call the original RefAllHome, but I s'pose that's obvious.
--
Tom
Re: How do I disable fixture offset (after reference all axes)?
« Reply #29 on: May 16, 2022, 04:11:45 PM »
Yup, that's exactly what I did. I had commented out the original call when I added the new call so I just had to swap the comment characters.