Hello Guest it is April 28, 2024, 09:51:33 AM

Author Topic: Mach4 Homing and Machine Coordinates  (Read 2988 times)

0 Members and 1 Guest are viewing this topic.

Mach4 Homing and Machine Coordinates
« on: July 14, 2021, 11:16:18 AM »
So Mach4 uses machine coordinates to compare with the values in the configure dialog box's Soft Limit columns min/max.

If I turn a Taig mill on with no home switches installed, position x,y,z at a consistent min position and hit the zero buttons and then the Reference All Axes (Home), get the pop up dialog about setting home; the machine coordinate can be negative and apparently the soft limits min/max values are going to be compared to those negative values.  So now Mach4 thinks the stage is way outside the soft limits, and both the negative and positive jog buttons both go in the same direction -- I guess to only allow you to get it back in range. 

If you quit Mach4 and restart, the machine coordinates are zero and the soft limits work correctly. 

So is there someway that I'm missing here to "Reference All Axes (Home)"?  Has anyone else run into this and do they actually quit and restart Mach4 each time they turn on their machine with no homing switches?  I'l make some brackets and put on homing switches here soon, but isn't there some way to just zero out the machine coordinates short of restart the app?

Re: Mach4 Homing and Machine Coordinates
« Reply #1 on: July 14, 2021, 11:32:05 AM »
I think your issues lies with you hitting the zero buttons before homing the machine.
That will cause your work coordinates (offsets) to change if they don't match the machine position. 
Since you don't have home switches, you should move to your desired "Home" location like you have been doing; then hit ref all.  Then you can set your work coordinates (Hitting the Zero Buttons). 
The soft limits don't care where you home the machine since it is all relative + or relative -.   What it does care about is where the program "thinks" it is relative to the soft limit position.  So if you zero the axis before you home the axis, it will update the work offset (the position shown in the dro) to reflect the referenced machine position.

So try this:
Open Mach4
Move the table to your "Home Position"
Hit Reference All
Zero your Axis

See what you get once you do that.
Chad Byrd
Re: Mach4 Homing and Machine Coordinates
« Reply #2 on: July 14, 2021, 02:18:59 PM »
"I think your issues lies with you hitting the zero buttons before homing the machine.
That will cause your work coordinates (offsets) to change if they don't match the machine position."

Thanks!  I'll try that out tonight.
Re: Mach4 Homing and Machine Coordinates
« Reply #3 on: July 14, 2021, 09:44:12 PM »

So try this:
Open Mach4
Move the table to your "Home Position"
Hit Reference All
Zero your Axis

See what you get once you do that.

Reference All first, Zero second; still leaves the machine coordinates with a negative number. 
If I turn on Soft Limits, X- has a  slow speed moving in the positive direction.  X+ moves in the positive direction at the jogging speed.

So basically Ref All first or Zero first doesn't make a difference unfortunately.  I have to home, quite the app, load Mach4 and oddly the axis will have negative numbers but the machine coordinates will be zero.  I then zero and ref, turn on soft limits and it runs as expected.
Re: Mach4 Homing and Machine Coordinates
« Reply #4 on: July 15, 2021, 12:19:35 AM »
Hi,
RefAll and 'zero your axis' are totally different operations.

When an axis is Referenced, also called Homed, the machine coordinate for that axis is set to zero, or alternately set to your programmed offset. This is
THE ONLY WAY you can set machine coordinates.....there is no other method.

When you 'Zero your Axis' Mach changes the WorkOffset so that the DRO reads zero despite the machine coordinate being nnn say. Clearly the
WorkOffset is set to -nnn.

If you don't have home switches then you have to 'Home in Place'. Note that Mach determines if you have home switches by whether the ISIG_MOTORnnnHOME
is populated with an active signal. If it detects that you have assigned a switch it will look for that switch to activate before it References or Homes that axis
and sets the machine coordinate to zero. If it does not detect an assigned switch it will attempt to 'Home in Place'. Note there is a setting in the Control plugin
on the Homing/Limits page that activates 'Home in Place'.

Lets imagine for a moment that you had a home switch, or alternately you jog to a home position and home in place, but not at the end of an axis but in the
middle. Its perfectly permissible. Thus when your axis is referenced the machine coordinate is zero in the middle of travel. When you move in one
direction the machine coordinate will become progressively more positive, and conversely in the other direction the machine coordinate will become progressively
increasingly negative. If the travel of the axis is 500mm then your SoftMax would be 250mm and your SoftMin would be -250mm. No problems.

Negative machine coordinates are perfectly permissible and work fine. Remember that Mach is not intimidated by negative numbers no matter how much they
confuse us.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 Homing and Machine Coordinates
« Reply #5 on: July 15, 2021, 03:16:59 AM »
Negative machine coordinates are perfectly permissible and work fine. Remember that Mach is not intimidated by negative numbers no matter how much they
confuse us.

Yes, I could have centered for home position and had negative numbers. 

But the problem is that the machine coordinates are out of range of the soft limits.  I could go into the config dialog and re-edit the min/max values of the soft limits, but it is easy to just quit out of mach4 and restart it.  It then comes up with machine coordinates that are in range, and things work properly. 

So right now I have min to max as 0 to 8000.  If I instead centered to get a home position, I would need to have soft limits at -4000 to 4000.  But moving the stage left or right for X to center, say distance D which could be a positive number or negative, means that the machine coordinates will be in a translated range -4000+D to 4000+D. 
Re: Mach4 Homing and Machine Coordinates
« Reply #6 on: July 15, 2021, 04:46:51 AM »
Hi,

Quote
So right now I have min to max as 0 to 8000.  If I instead centered to get a home position, I would need to have soft limits at -4000 to 4000.  But moving the stage left or right for X to center, say distance D which could be a positive number or negative, means that the machine coordinates will be in a translated range -4000+D to 4000+D.

Perfectly correct, but once you have determined what constitutes your Home position you MUST repeat that Home position every Mach session.

Thats the whole point about having Home switches, they uniquely define one position as Home and then SoftLimts are the machine extents
relative to that position. It doesn't matter whether that Home position is in the middle of the 8000mm axis, or closer to one end, all that matters
is that the Home position be repeatable EVERY Mach session, otherwise your SoftLimits would have to be modified EVERY Mach session also.

I can only but imagine that any machine with an 8m axis is an expensive beast, in which case buy yourself three $20 (each) snap action microswitches,
good ones, and fit them.  Home switches were the first 'addition' to my original mini-mill and by far and away the best money I've spent over and
above its original build. I used to crash quite regularly before getting Home switches, and I've crashed about three times in the six years SINCE
I got them. Second best improvement was a $300 coolant pump and resevoir.....

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 Homing and Machine Coordinates
« Reply #7 on: July 15, 2021, 08:14:25 AM »
So I tried All Ref by it self, and the machine coordinates are still not in the right range.  They are not getting zeroed.  If anyone has an idea about how to address that issue, let me know.

Thanks.
Re: Mach4 Homing and Machine Coordinates
« Reply #8 on: July 15, 2021, 08:23:22 AM »
once you have determined what constitutes your Home position you MUST repeat that Home position every Mach session.

So that's the issue here.  As stated, when I home for each session it involves a quit and restart of Mach 4 to get the machine coordinate into the correct range for the soft limits. 
Re: Mach4 Homing and Machine Coordinates
« Reply #9 on: July 15, 2021, 04:53:10 PM »
Hi,

Quote
They are not getting zeroed.  If anyone has an idea about how to address that issue, let me know.

If the machine coordinates are not getting zeroed then you are NOT referencing the axes. If you do not have home switches assigned then at best you
can only Home in Place, and that REQUIRES that you activate that feature in the Homing/Limits tab of the Control plugin as I posted earlier. Have you
activated HomeInPLace?

Note also that <RefAll> will home each axis in turn according to your programmed priority but you don't have to reference ALL axes sequentially.
If you go to the MachineDiagnostics tab you will see the DRO block which contains all the prevailing numbers, ie machine coords, work offsets, G92 offsets etc,
and each axis has a button that allows you to reference that axis alone.

Quote
So that's the issue here.  As stated, when I home for each session it involves a quit and restart of Mach 4 to get the machine coordinate into the correct range for the soft limits.

When you first start a Mach session SoftLimits are by default disabled....so who cares whether they are 'in range' or not? Do not enable SoftLimits until AFTER you
reference (home) your machine. SoftLimits ONLY make any sense once the home position has been established and the machine coordinates set, zeroed commonly by
default, but offset if that is your desire and you program in the desired offset.

At this stage you are still struggling to understand and use Reference and/or HomeInPlace and I would suggest you do not complicate the issue with Home offsets
just yet.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'