Hello Guest it is March 28, 2024, 02:28:04 PM

Author Topic: Can't set machine position in script  (Read 3031 times)

0 Members and 1 Guest are viewing this topic.

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Can't set machine position in script
« Reply #10 on: October 15, 2022, 07:47:18 PM »
Thats another pain in the aris.

Got a Fagor controller on one of my lathes, shut it down and restart it and it saves all positions prefectly. A quick check to confirm and jobs can be resumed without having to re-home etc. Never failed.

The Devs should expose the methods to do this. Seems easy enough as they RESET the machine Coords to zero on a restart.

More headaches....

It depends on the motion controller.  My machine with a Galil on it does this perfectly so it isn't a Mach limitation.  HOWEVER, what if someone bumps the table?  Game over.  Only homing or ABS encoders will ensure proper positioning. 

Steve

Offline Rimmel

*
  •  207 207
    • View Profile
Re: Can't set machine position in script
« Reply #11 on: October 16, 2022, 07:20:33 AM »
I know what you are saying, I just don't understand why restoring the shutdown parameters isn't a basic default. I mean why not? It seems counter intuative to arbitrarily reset the machine Coords to zero.

Not heard of the Galil - have you got a link?

thansk
Re: Can't set machine position in script
« Reply #12 on: October 16, 2022, 04:21:09 PM »
Hi,
if you have parameters, in this case coordinates, that you want to save.....that's what the ScreenUnload script is for, save the data to the .ini file and
restore the data at the next startup during the first pass of the PLC.

There is a particular procedure (other than Homing) where you can set the machine coordinates at will, it's a workaround and not too difficult, and is in any case
automated.

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

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Can't set machine position in script
« Reply #13 on: October 16, 2022, 05:11:59 PM »
I know what you are saying, I just don't understand why restoring the shutdown parameters isn't a basic default. I mean why not? It seems counter intuative to arbitrarily reset the machine Coords to zero.

Not heard of the Galil - have you got a link?

thansk
https://www.galil.com/.  However, note that the Galil is not a plug and play motion controller.  You must understand how a Galil works to effectively integrate them into a CNC machine.  Also, while there are things like position retention available with the Mach/Galil plugin, other things like lathe threading and mill rigid tapping are not available.  So research and decide.

I think everyone that wants something a certain way wishes for it to be a "basic default".  It is human nature.  :)  However, most motion controllers set the machine coordinates during the home operation because in all cases except ABS encoders, the correct thought is that the position is undefined until the machine is referenced.  Otherwise, why would there even be a homing/referencing feature?  Mach 4 has lots of screw mapping and Z leveling features that Mach 3 never had and they simply depend on the machine being referenced.  Referencing the machine at startup simply ensures correct operation EVERY time.  Not some of the time or times where nobody bumps the table.  Even though the Galil remembers the previous positions, I do not use it because it takes a mere 20 seconds to home my machine and then I know my fixture offset is correct.  No guessing or checking.

But again, this is not a Mach 4 limitation.  Mach 4's notion of machine coordinates is whatever the motion controller tells Mach it is.  If you wish for your shutdown positions to be retained, ask your motion controller vendor for that feature.

Steve
Re: Can't set machine position in script
« Reply #14 on: October 16, 2022, 06:37:07 PM »
Hi,
I had Mach4Hobby and my ESS motion control saving the machine coordinates at the end of a session and then writing those saved values to the ESS
at the next start years ago. There is a trick that you can pull using HomeInPlace and HomeOffset that effectively hoodwinks the ESS into writing an arbitrary value into
the machine coordinate register.

I never really used it. Like Steve every time I start Mach I Home....always....no matter what. It takes but a few seconds, no guessing, no inaccuracies.
I never turn my machine off, unless perhaps I'm doing some maintenance or alteration or maybe the power has faulted out....a fairly rare occurrence.
My mill has been sitting powered on for the best part of two months since the last time I powered it down to fit a new fourth axis. I ocassionaly re-Home
but have yet to find a time when the reference has somehow 'slipped'.

The only time that I've ever really wanted the feature that Rimmel wants is when the machine crashes, by that I mean a software crash or something along those
lines. In that event the machine does not shut down gracefully and so the Screen Unload script never runs anyway.....so whats the point?..... and under those same circumstances
I would not expect the ESS plugin to be running and therefore retain machine coordinates either. Even if the plugin were running would I trust that the machine coordinates had not
been corrupted?.....no I don't think so.

There are features  that I wish Mach4 and the ESS had, but this is not one of them. Features that help me make parts certainly, but this feature does not do that.

Craig
« Last Edit: October 16, 2022, 06:43:31 PM by joeaverage »
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Rimmel

*
  •  207 207
    • View Profile
Re: Can't set machine position in script
« Reply #15 on: October 17, 2022, 05:28:47 AM »
For what I do with that machine it's really helpfull.

"From Mach3 to Mach4

Mach4 is completely new!  We cannot stress this enough: Mach4 is not an upgrade for Mach3. It is faster, more responsive, and provides a platform for expansion, modification, and new features. The changes requested by many Mach3 users were simply not able to be completed because of limitations in the Mach3 code. Mach4 is our response to the limitations and requested changes for Mach3."

Unless you simply want it to save it's state over shutdown....
Re: Can't set machine position in script
« Reply #16 on: October 17, 2022, 06:44:34 AM »
Hi,

Quote
Unless you simply want it to save it's state over shutdown....

I've posted that it can be done, twenty or thirty lines of code, or does it have to be programmed for you by NFS?
I did it myself not long after I started using Mach4, say 7.5 years ago. I found it less useful than you might believe, but I did have
it working. I've updated I don't know how many times since and that code didn't survive and was not useful enough for me to be bothered
to recreate it.....but its not rocket science.

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

Offline Rimmel

*
  •  207 207
    • View Profile
Re: Can't set machine position in script
« Reply #17 on: October 17, 2022, 08:44:24 AM »
Hi,

Quote
Unless you simply want it to save it's state over shutdown....

I've posted that it can be done, twenty or thirty lines of code, or does it have to be programmed for you by NFS?
I did it myself not long after I started using Mach4, say 7.5 years ago. I found it less useful than you might believe, but I did have
it working. I've updated I don't know how many times since and that code didn't survive and was not useful enough for me to be bothered
to recreate it.....but its not rocket science.

Craig
Well yeah it can be programmed using a "hack or "workaround" which is hardly ideal.

Should you really need to do it for a "Hobby" installation?
Re: Can't set machine position in script
« Reply #18 on: October 17, 2022, 02:25:11 PM »
Hi,

Quote
Should you really need to do it for a "Hobby" installation?

Well no.....in fact you don't. Once I had fitted proper and decent Home switches I found that I didn't need this facility at all and I let the
code for it 'lapse' six years ago because I didn't use it.


Craig
« Last Edit: October 18, 2022, 02:06:15 AM by Tweakie.CNC »
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Can't set machine position in script
« Reply #19 on: October 20, 2022, 07:21:52 PM »
steve
im agree with you ,but now with abs encoder , i read position ,how can i set it on mach?
****i use with home in position and put the value as offset , but its not very good
for example the axiss always have mistories movment( its not noise ,its small move that comand from mach)