Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: ftomazz on September 11, 2008, 07:12:55 AM

Title: Open door as pause
Post by: ftomazz on September 11, 2008, 07:12:55 AM
Hello to all.

I have a complete closed machine, were if I open its door, the program should act like a pause: turning off the rotation of the spindle, shutdown the coolant. This allows the user to inspect the work. After the door is closed, the program continues doing what it was doing (turns the spindle on, allows a accelaration time, then continues)
I do not know if this is possible. I think it is, but also some security issues are present. Anybody did something like this ? It should be common.

My second question is how can I save my current machine coordenates, tool number and tool offset being used, so that when I open Mach again, everthing will be as when I closed it.

Thank you in advance,
Filipe
Title: Re: Open door as pause
Post by: Hood on September 11, 2008, 11:20:19 AM
Its possible but may depend on how your spindle works, when you press Feedhold and then Stop and press start again does your spindle start?
 Hood
Title: Re: Open door as pause
Post by: ftomazz on September 11, 2008, 11:47:22 AM
Thanks Hood.

I made a simple tap:

M03 S400
G01 X500 F10

When I press feedhold, the spindle maintains rotating, but X stop, if I pressed cycle start again, X moves, from the point it has stopped. It is how I would like, expect the spindle does not stop - very important. Appears that the spindle is "not connected" to the button.
What can I do ?

Thank you
Title: Re: Open door as pause
Post by: Hood on September 11, 2008, 01:26:56 PM
What I was wanting was you to press feedhold then press  Stop once it had come to a halt with the feedhold and then finally press start again. The Stop should shut off the spindle but I am unsure whether your spindle will start again and thats what I was wondering. If it does then its easy to do, if it doesnt then its not so easy.
Hood
Title: Re: Open door as pause
Post by: fdos on September 11, 2008, 03:40:49 PM
You could easily create an interlock to do what you want, using just a relay with it's contacts in series with the spindle start output in Mach   Coil to be operated by the door switch.

Same relay with enough poles could put mach into Feedhold.

Probably better to do that than rely on software alone.


Wayne....
Title: Re: Open door as pause
Post by: ftomazz on September 12, 2008, 02:26:46 AM
Hood:
When I press start again, the spindle will not work, only the axis will move, as you were guessing.

fdos:
That is a nice ideia. But that needs to change my wiring, but probably is safer. I have no clue is how to trigger feedhold if the switch changes.

If I rely only in software, I could do a series of actions if some triger is put on, can't I ? In this case I would not need to change my wiring configuration.
something like:

Door was open -> send an input to mach
is spindle on? stop spindle
feedhold

Door was closed -> send an input to mach
is spindle off? start spindle
delay 3 seconds until spindle reachs speed
take off feedhold

I do not know is how to connect an input, to trigger an action, but it should be easy to do, I think.

About my other question, to save the position and tool number when exiting mach, any ideias ?

Thank you.
Title: Re: Open door as pause
Post by: Hood on September 12, 2008, 02:50:19 AM
Saving position and tool number is easy enough, just set DRO as persistant (Config then General Config) However remember that you always need to home when you start Mach of you could be out of position as the DRO may show one thing but because the motors have moved slightly it could be in a different position.
 As Wayne said cutting the power physically to the motor is the safe way to do things and I would suggest thats the way you go as for the rest you would need to use a macropump or a brain.
Hood
Title: Re: Open door as pause
Post by: ftomazz on September 12, 2008, 04:37:37 AM
Thanks Hood.

My main issue is to preserve the tool that was last used. The toolchanger will not move, so I will be sure to have the same toolnumber. I hope that DRO will also work as persistant for the toolnumbers.
I will look the macropump or brain (?!) as you sugest.
Title: Re: Open door as pause
Post by: Hood on September 12, 2008, 05:17:57 AM
Yes the persistant DRO setting will remember the tool last in use. Not sure however if the offsets for that tool will be preserved so make sure they are before you kill some tooling ;) I think they are on Mill but on turn they are definitely not.
 If you were to use a mcropump you would have your switch coming into mach on an Input such as Input 4, your macropump would then do whatever you want when this is active. I however do see anotrher problem as you are obviously wanting it to start again when you shut the door, this will require a bit of thought as you will have to make sure it only styarts if you have the feedhold active otherwise everytime your door was shut it would be wanting to start. I am not the best at VB but think should be fairly straightforward,  give it a go yourself and see what you come up with, if you need help just shout.
Hood
Title: Re: Open door as pause
Post by: ftomazz on September 12, 2008, 08:08:17 AM
I am working on it (well I am making the door). I will try brains.
About the tool - it was very important to save tool offset, and yes it is for turn.
Thanks Hood.
Title: Re: Open door as pause
Post by: Hood on September 12, 2008, 08:23:23 AM
ok if its for turn then you can have the Tool number persistant but the offsets will not be kept. This is because Tool 1 can have many offsets, eg T0101, T0111, T0121  etc etc.
 It is best practice to have the last part of any G Code indexing back to T0101 before it ends, that way you always know that after a reset Mach has the correct offsets loaded.
 If however you did have  Tool 3 In position the DRO  would show it was tool3 but the offset would be zero, ie T0300. If however you called the correct tool and offset in your code it would again be set to the correct offset.

Hood
Title: Re: Open door as pause
Post by: fdos on September 12, 2008, 10:23:43 AM
All the better reason to think and RETHINK this stuff out before you commit to ANY wiring ;)

Wayne.....


Title: Re: Open door as pause
Post by: Hood on September 12, 2008, 10:49:21 AM
I have to agree with Wayne, much easier doing a bit of wiring than it is to stitch a finger back on.
Hood
Title: Re: Open door as pause
Post by: fdos on September 12, 2008, 01:15:32 PM
Or less severe than physical injury, just designing yourself into a corner.   Done it myself many times!   Makes you think more about possible scenarios in subsequent projects ;)

Myown lathe is almost constantly on my mind at the moment,  Maybe I'll start dreaming solutions soon haha....

Wayne...
Title: Re: Open door as pause
Post by: ftomazz on September 12, 2008, 01:40:52 PM
4 months of thinking. Complete lathe, no retrofit.
Almost done ... Only left is the door issue and to see the spindle accelerate and decelerate as I am going in direction of X-- and X++. And, of course, all other thinks that I left behind, I hope very few. Still coolant protection of ballscrew in my X axis is still killing me, but I will think in it after it runs.
Title: Re: Open door as pause
Post by: ftomazz on September 12, 2008, 01:43:44 PM
And Hood, the ideia of always end with the same tool is a very good one.
I will implement that one, since I also made the software that generate the Gcode that the machine will use.
Nice one, and easy too.
Title: Re: Open door as pause
Post by: HimyKabibble on September 12, 2008, 02:13:18 PM
You could easily create an interlock to do what you want, using just a relay with it's contacts in series with the spindle start output in Mach   Coil to be operated by the door switch.

Same relay with enough poles could put mach into Feedhold.

Probably better to do that than rely on software alone.


Wayne....

I'm not sure that will do what he wants.  When you press FeedHold, it will still take a second or two for the machine to stop.  If you simply shut off the spindle while the machine is still moving, you stand a good chance of losing position and/or breaking a tool and/or damaging the work.  I don't think you can turn off the spindle until you're sure movement has stopped.

Regards,
Ray L.
Title: Re: Open door as pause
Post by: Hood on September 12, 2008, 02:21:24 PM
There is a setting in Mach to lift the tool when stop is pressed, obviously Stop doesnt want to get pressed until a feedhold has been done so maybe its not a good idea either.
Best option may be to have a lockpin hold the door shut until a feedhold has been done and the spindle has stopped.
Hood
Title: Re: Open door as pause
Post by: ftomazz on September 15, 2008, 03:20:32 AM
For sure this is the best option. Also the user should be aware only to "pause" the system when it is not cutting, this is, when it is outside the cutting part.

There is a setting in Mach to lift the tool when stop is pressed, obviously Stop doesnt want to get pressed until a feedhold has been done so maybe its not a good idea either.
Best option may be to have a lockpin hold the door shut until a feedhold has been done and the spindle has stopped.
Hood