Hello Guest it is May 06, 2021, 05:38:41 PM

Author Topic: How to manually set Current Position, Machine Coord, and Work Offset to zero.  (Read 21242 times)

0 Members and 1 Guest are viewing this topic.

I think we are starting to get there.  You mentioned "AutoZero simply tells Mach to set Zero (or Home Off value) to the machine Coords DROs when you reference the machine."

I think that you are absolutely right.  My problem is when my Mach3 starts up the Machine Coord is set to X = -0.0005 even before I press the Reset button.  I cannot phantom why it is doing that, but it is.  This is why when I RefAll, the axis moves.  Mach3 is starting up with a Machine Coord not zero and is zeroing to the machine coord dro, which is taking the table off the zero I want.

When I press the ResAll, it's from the screen, not the Pendant (which is an excellent pendant, btw.  Highly recommended).

Here is the contents of Macropump.m1s
If GetUserLED (1010) Then
  If Not IsActive (Input2) Then
    DoOEMButton (1003)
    Message “Program Stopped Spindle Fault”
  End If
End If

As far as the parallel port, I am using a Derek Hillbilly bob board which works very well.  Surprisingly well.  I don't think this is the source of the problem given that Mach3 starts up with the machine coords as noted above, even before I press Reset.  If there is some way to make Mach3 start with machine coords set to zero, then my problems go away.

Still cannot imagine why it is so difficult to move the bed to any location I wish and press a button to force Current Position, Machine coord, and work offset to zero at that location. 

I really appreciate your help. 
And here is a screenshot of the diagnostics page right after starting up and before pressing reset.

If there is any way to make that Machine Coord come up zero every time I start Mach3 no matter the x,y,z coordinates, then I'm good to go.

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Ok as I keep saying the Axes should NOT move when you RefAll if there is no Home switch set for that axis. All that will happen is the Machine Coords will be set Zero (or the value you have in Home Off)
However now you have mentioned you are using the HillBillyBob I now realise (and should have noticed) that you are using MaxCL mode.
That may be your problem as I have no idea how that mode operates with regards to referencing the machine.
 As mentioned previously what you are experiencing is not normal, what you are wanting and expecting is, however as you are using MaxCL mode then it may just be the way it behaves.

I will have a look later at MaxCL mode, when I get some time, however I think it has designated pins for home switches so even if you dont have them set then it may still register them and act on them or it could even be because the pin you have set for Z is actually a pin meant for all home switches. I am just thinking out loud but will check later and see if that is indeed the case.

Hood
 
I can live with it if I have to, although I would rather not. 

Goes right back to my first question.  Is there a macro or routine which can set Current Position, Machine Coord, and Work Offset to zero?

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Your first questions answer is that the RefAll should do exactly what you want and thus no need for a macro.
Current position and current work offset are one in the same in this situation, as far as I see, and if you do not have any values set for the work offset then that will be the same as machine coords, under normal circumstances of course ;) Looks like MaxCL may not be normal though ::)

It would have been very simple to make a macro up to do what you wanted if under normal circumstances but my point is there should be no need to do it as that is the default way Mach does it.
With your situation it is likely still possible but I will have a look later and see if I can work anything out with MaxCL that will mean you can use Mach normally without having to resort to scripting as that will be the most sensible option.

Hood

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Ok just looked, MaxCL states pin 12 is for Home and Limit switches, ie it would seem it is the input you would use for ALL axes.
 I would say that means RefAll will not act correctly for you as you are not wanting X or Y to move.
As a test can you disable the Z limit input and see if it helps, Z of course will not move but it will possibly make X and Y work as you want, expect and how Mach normally works.

Let me know what happens when you do that, please, and we can then go from there.
Hood
I should have something for you tomorrow.
I again appreciate the help.

One thing, though.  My mill has a very accurate tool changer which I use on every job.  And I mean very accurate, to around .001" repeatably.  The current part I am making uses 6 different tools, and I need 7 of these parts.  I only have to set the tool height once and I'm off and running!

It's wonderful.  Of course it only works because Z sets to a repeatable and reliable zero stop on RefAll.

So eliminating this Z movement is a non-starter.  Not having the Z home would be even worse than the x axis moving.  The cure worse than the disease.

It seems the best solution is to have a routine that forces the current position, workspace, and machine coord to zero, which is where we started.

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
You may or may not be able to do as you want, it all depends on your findings with disabling the Z home switch input and also a further test I will ask you to do if that is successful.
Hood
Ok, thank you.  I will let you know tomorrow.