PDA

View Full Version : Z-zero plate - for calibrating z-height to workpiece or table


Marc Shlaes
Mon 04 February 2008, 20:18
Gerald, Greolt,

I have been wanting to ask this for a very long time. If the answer is here and I missed it or if it is very obvious, I apologize.

Could you quickly explain how a zero touch plate works? Do you attach some kind of lead to the router and pass current through the bit that sends a signal through the touch plate when the bit and touch plate meet. Or... is there current in the touchplate that goes to ground when the bit touches it? Or, and more likely, is it neither of these pure guesses?

I have wondered about this for months but I figured somewhere along the line, the answer would become obvious... but it hasn't. Thanks tons!

Gerald D
Mon 04 February 2008, 21:48
Marc, typically there are two wires, one with a crocodile clip, other with an alu plate. Clip goes to cutting bit to ground it properly, plate carries 5V. When bit touches plate it drops (shorts) the plate voltage to 0v. PMDX senses it as an input.

Some people work happily without the ground wire and clip because the cutter grounds electrically via the router bearings. Folk with spindles and ceramic bearings discovered that this does not ground and the spindle just keeps driving on into the table, lifting the y-car. (Imagine if the y-car could not lift . . . )

Then there are coated bits TiN or diamond/ceramic which also do not conduct . . . .

Marc Shlaes
Mon 04 February 2008, 21:55
Gerald,

Thanks tons. It is nice to know that my guesses weren't that far off the mark.

One thing I really love about this forum is the subtle exposure to the rest of the world. Here in the US (probably because we have them), we call it an alligator clip.

Greolt
Mon 04 February 2008, 22:55
Marc I am not familiar with the PMDX boards so I have had a read of the PDF manual for the 122.

The 122 has pullups on the inputs. This is good.

Most of the board manufacturers like to build in pulldowns. Fine for limit switches, bad for the simple Auto Tool Zero device.

What the device needs, to keep it as simple as it is, is an input that is "High" when at rest.

That means it can be made "Active" by grounding, or touching the tool.

The rest is as Gerald has said. :)

I use no Crocodile clip.

Greg

cncb
Mon 18 February 2008, 15:47
Thanks for the info, Greg and Gerald. Been following Greg's routine for awhile.. I may have viewed his youtube video 20 times as well in the past too. In particular since most mechmaters are using the PMDX-122, which input are you finding yourselves using on the BOB for this function?

rkd
Wed 20 February 2008, 09:02
Greg, I have a question for you if you don't mind, I'll wait my turn though. I am using the z-zero script you posted on cnczone. My question is, how would I utilize a remote pushbutton to activate the script? I use remote pushbuttons for pause and resume functions, but I can't find documentation onn how to use a remote pushbutton to activate a user created script.
Thank you, Ryan

smreish
Wed 20 February 2008, 10:57
Ryan,

HOW to set up a switch or pushbutton in Mach3 for the MechMate.

Follow this tutorial (http://mechmate.com/forums/showthread.php?t=281)
Gerald walked me thru this earlier in the week.
OEM codes (http://www.artsoftcontrols.com/MachCustomizeWiki/index.php?title=OEM_Buttons) for reference to the tutorial
Sean

Gerald D
Wed 20 February 2008, 11:11
Sean, that doesn't answer Ryan's question - I am also keen to hear how Greg replies to him. The difference here is; how does one use a hardwired button to start a script?...ie. to find a bit of program and execute it.

Greg J
Wed 20 February 2008, 11:25
Doesn't this thread (Artsoft website) answer Ryan's question. I'm not at that stage YET.


http://www.machsupport.com/forum/index.php?PHPSESSID=covn4naf7luunnlr1hg120hvl6&topic=2136.0

rkd
Wed 20 February 2008, 12:50
I can get the script to work fine with the on screen button. I can also get the pause and resume functions to work well using the OEM codes as Gerald has decribed somewhere on this forum.
What I am having trouble with is how to assign a remote pushbutton to an on-screen button that does not have an OEM code assigned to it ie. custom script.
I asked this question on the Mach forum a while ago and I got this answer.

I think you need to set an oem trigger up, In ports and pin's, Inputs, To a OEM trigger # (1-15) for your switch.

Then include that triggers oem code in your script, something sorta like this.

If IsInputActive( OEM Trig # ) Then
DeActivateSignal( OEM code )
Else
ActivateSignal( OEM code )
End If

Well it's a Start, Chip

It's a little beyond my understanding of scripts and such, so hopefully someone smarter than myself will be able to help.
Thanks, Ryan

Gerald D
Wed 20 February 2008, 12:59
Everyone's noticed that I have 4 pushbuttons on the y-car. 3 of them are defined (E-Stop, resume, pause) and number 4 is intended for exactly this thing that Ryan is asking about.

Part of the cutter change process is to re-zero the z-height (cutter lengths vary). So I want to run the z-zero routine by pressing the button at the y-car. Save 2 walks to the keyboard and back . . . .

Finish changing cutter
Slip touch plate under cutter
Run zero routine
Remove plate
Re-start job

In fact, the keyboard can be locked away in a dustproof place, while the daily grind is done purely on the buttons on the gantry (by an unskilled operator)

Greg J
Wed 20 February 2008, 13:00
Ryan,

I'm just starting to get to this stage of the project. I'm getting very close to my MM cutting wood, so the next phase is understanding Mach and all it's capabilities.

Anyways, your issue may involve using Visual Basic to program the script in Mach. I'm sure this forum will come up with an answer before I do, but if I learn something, this forum will be the first to know.

Greolt
Wed 20 February 2008, 14:36
To have a hard wired button activate the tool zero script I believe this is now done with a brain. A recent Mach feature.

This is not something I have done myself so don't have details but should be easy to find out.

Using external buttons is a common requirement. When there are lots of buttons then ModIO is often used but for this if you have a spare input that should suffice.

Greg


EDIT: I will do a little research on using a brain together with an input. Get back to you. :)

Greolt
Wed 20 February 2008, 19:36
No I was wrong a VB script can not be run using a brain.

So the answer is in a macro pump. I have not done that either. :)

Doing some research now on macro pumps. Sounds like it will be relatively simple. Has to be for me to get it. :)

Greg

Greg J
Thu 21 February 2008, 07:10
Has anyone tried emailing Art or Brain at Artsoft with this question?

I'm not even close to asking an intelligent question on this subject to Artsoft. Give me a couple more months, and I will be. :)

sailfl
Thu 21 February 2008, 07:19
Greg,

I think you macro pump also. I am starting to look at the VB programming.

Greolt
Thu 28 February 2008, 03:19
Have been doing some reading and messaging with Scott on the Artsoft site.

I now have an external switch to activate the Auto Tool Zero routine.

Testing so far has been good. It has some safety features built in.

It involves a momentary switch connected to a spare input on the BOB.

A macropump runs in Mach in the background at about four times a second and polls the input.

Checks to see if spindle is running and also if the system is in motion.

If all those conditions are met it runs the zero routine.

Greg

Gerald D
Thu 28 February 2008, 03:37
That's going to be very useful!

sailfl
Thu 28 February 2008, 03:39
Greg,

Great progress and I will be interested in seeing how the code looks.

J.R. Hatcher
Thu 28 February 2008, 04:56
Everything I know about code can be read between the lines of this word .... N _ O _ T _ H _ I _ N _ G :o.
But I am interested in the zero plate and setting one up for my machine.

Greg J
Thu 28 February 2008, 06:14
Greg,

I'm very interested in your code. It's been awhile since I've written any code, so I'll have to dust the brain for cobwebs. Along with the shielded cable, I also received a couple of books on CNC programing and VB.

Greolt
Thu 28 February 2008, 06:33
OK give me a couple of days. I want to make it as bullet proof as I can. Still learning.

J.R. the zero plate is fairly simple to set up. This idea of having an external switch trigger it will make setup a bit more complex.

Greg

domino11
Thu 28 February 2008, 06:38
Greg,
Would you also be able to trigger it from the Multimedia remote like Sean is going to use? That might be useful, since a lot of the guys seem to be going to it for jogging etc?

Heath.

Greolt
Thu 28 February 2008, 06:41
Which remote do you mean. If it is the Shuttle Pro, then that is easy.

Greg

domino11
Thu 28 February 2008, 06:50
Greg,
Yes it was the Shuttle Pro I was wondering about. Couldnt remember the name this morning.

Heath

Greolt
Thu 28 February 2008, 07:52
If you look at the Shuttle Pro plugin configuration screen you will see that a button can be set to call a macro directly from the macro's folder.

So that is just about as easy as setting a button script. :)

I have two set on my Shuttle. One for "Auto Tool Zero" and one for "Laser Zero".

Greg

rkd
Thu 28 February 2008, 09:37
This sounds very good! Can't wait to try it.

smreish
Thu 28 February 2008, 15:36
I asked the question if JR had an additional input available for the touch plate, not for a button to activate it. I assumed (duck for cover) that JR would use the shuttlepro to initiate the zero call.....

But for all of this to work, would you not still need a contact available to "sense" the tool bit and get the PMDX to go high?

Greolt
Thu 28 February 2008, 16:37
I'm sorry I must be tired. Can't follow your question.

Greg

J.R. Hatcher
Thu 28 February 2008, 16:59
I would like to use the shuttle pro. I have some buttons available, also have a few inputs on the bob and an extra pair of wires. What I'm lacking is the know how. I'm not in a hurry, I would rather wait until the trials are finished. Thanks everyone.

Greolt
Thu 28 February 2008, 17:17
J.R. do you already have a Z zero touch plate set up?

If so I can explain how to use a button on the Shuttle Pro to activate it. It is quite simple.

Some others including Gerald want to use an external switch to activate the Z zero routine.

That is a little more complex setup. But not that difficult. Any one who can build a Mechmate will eat it for breakfast. :)

I am now happy with the macropump/brain combination I have working if anyone is interested in looking at it.

Greg

sailfl
Thu 28 February 2008, 18:11
Greg,

I don't have a machine to try it on but I would like to look at the code that you have. Can you post it or send it to me.

Thanks for your efforts.

rkd
Thu 28 February 2008, 19:04
I am interested in looking at it. I dont have an actual machine going right now but I do have a simulator setup on my kitchen table that would work just as well.
I too appreciate your efforts. It's people like you that improve these online communities.

Greolt
Thu 28 February 2008, 19:06
PM sent

J.R. Hatcher
Thu 28 February 2008, 19:22
Greg I will try to get one setup tomorrow. thanks

Greolt
Thu 28 February 2008, 20:05
For those who want to look at code it is easiest to just go to this link.

http://www.cnczone.com/forums/showthread.php?t=36099

The rest to make it trigger via Shuttle Pro and external switch is not much more than where you put it and how you enable it.

I know I sound like a broken record but I'll say again, none of this is original or my idea.

Lots of variants of this are used all over. This is just my variant.

Others have given me a lot of help getting some sort of a grip on this. (I'm only a carpenter:))

Greg

Greg J
Thu 28 February 2008, 21:10
Others have given me a lot of help getting some sort of a grip on this. (I'm only a carpenter:))

Greg


Greg,

Thanks for your efforts. I'm slow, but will have my machine operational soon and gladly give results.

Carpentry is one of the greatest endeavors known to man. When the weight of the world is heavy, I work with wood. :)

"Every nail driven should be as another rivet in the machine of the universe"
-Thoureau

Greolt
Sat 01 March 2008, 17:18
For those who are interested in having an external switch to activate the Auto Tool Zero routine here is some stuff to look at.

I am not a software expert. Neither am I qualified in any way in electronics or electrical control.

This information is shared only for those interested to look at. Do not use anything contained here in a working machine. It has not been tested or verified to any proper standard.

Sorry about that, but the legal fraternity in this country are hell bent on pursuing the model found elsewhere which says "Something happened, who can I blame?"

There are three components in the attached zip folder.

M615.m1s, Macropump.m1s and ZeroSwitch.brn

M615.m1s is the zero script that I and others have been using for a while. It usually needs tweaking for a users personal requirements.

If I was only using it from an on screen button, as many do, it would simply have the code found in this file used as a "Button Script". If you don't know what that means then ask.

Because I want to activate it with either the Shuttle Pro or an external switch I place M615.m1s in the macro folder with the name of the profile I am using. For most users this will be "Mach3mill"

This macro can now be called with a Shuttle Pro button. Look at the Shuttle Pro "Plugin Config" for setting that up. It's easy.

For an external switch to trigger the zero routine, I also place the "Macropump.m1s" in the same macro folder, and the "ZeroSwitch.brn" goes in the brain folder.

Macropump is then enabled on the "General Config" page. Brain is enabled via Operator / Brain Control. A Mach restart is needed for both of these to work.

Then you can open, Operator / Brain Control / View Brain, and see the brain operate.

My external switch is connected to a spare input pin and assigned to "Input#4" in "Ports and Pins". Set to become active when switch is pressed.

The brain contains a switch delay as a safety feature. I have it set so the switch must be pressed for two seconds before it triggers.

For this reason I have removed a delay that was previously coded into the zero routine. Two delays built in was confusing for an operator.

Also the brain locks out if the spindle is running or machine is moving.

The macropump simply sets the M615.m1s going. It has a lock out thingy built in to stop Mach trying to run the script multiple times.

Logic tells me that it should not be needed because of the delay in the brain but real world tests tell me otherwise. It works with it in and does not work when it is left out.

Now you will ask "Why both a brain and a macropump?"... "Either one or the other should do it"

A brain can not trigger a macro, so a brain alone won't do what I need.

Mach does not like delays coded into a macropump because of timing issues. It can be done but is much more complex. (remember I am just a carpenter)

The brain makes the switch delay a no brainer. Pun intended. :)

Also the other safety lock outs are really easy to do in a brain.


Wow what a long waffle of a post!!!! No one is going to read all that. :o

Greg

PS: I have had a lot of help to understand all this from Brian and others. Mostly Scott (poppabear). Thanks Scott.

sailfl
Sat 01 March 2008, 17:30
Greg,

Your ExternalZeroSwitch txt file is empty that you included with the zip. Is that what you wanted?

Greolt
Sat 01 March 2008, 17:49
Sorry my mistake.

I was going to repeat the long winded spiel but forgot.

I have removed the empty text file and reloaded the zip.

Greg

EDIT: I have reloaded and attached here. The m1s files read better in notepad. I don't know much about ANSI versus Unicode. The VB editor puts out one which notepad does not recognise carriage returns. :)

Gerald D
Sat 01 March 2008, 22:18
Did you say you are a carpenter? Darn it, we will never catch up to the Ozzies. :(

Thanks for all the work! :)

Gerald D
Sun 02 March 2008, 04:34
Greg, if I read you right, the button must be held down for 2 seconds, which seems rather long. . . . .

Would it make sense to hold the button for the entire zeroing operation, with a realease of the button causing a quick retraction? For the times when the bit does not make electrical contact . . .

Greolt
Sun 02 March 2008, 15:08
Gerald in working conditions two seconds is not long. The main motivation is to prevent accidental activation.

I find the two seconds is good. I'm thinking as I press "I want this to happen" and in that delay time occasionally think "Oops I forgot...." and still have time to release button.

That delay can be changed very easily in the brain.

You could write into the code to check back to see if button is still checked at every step but it would be quite long code.

I have found the routine to be reliable. I do have a large LED on screen and touch the plate to the tool and see it light up by
way of assuring myself that no electrical fault has crept in before running the routine.

The Mechmate has an advantage of allowing the Y carriage to lift a bit in the event of a disaster.

Also, if I follow how your machine's switches are grouped, the estop is right beside the zeroing switch.

The trick with it is to keep the probe distance small. Mine is 20mm. Don't have it set to 200mm

I jog the Z down to approx 5 to 10mm, just enough so I can easily slip the plate under, then run the routine.

Greg

Greg J
Sun 02 March 2008, 19:16
Greg,

I've been reading some of your posts on that "other" CNC forum.

For being "just a carpenter", you'd make one hella'va electrical engineer. :)

Greolt
Sun 02 March 2008, 20:32
HA Ha Ha!! Those who really know about this stuff might take issue with you there.:)

My dad always said "You can know just enough to get yourself into trouble"..... That's me.....:p

domino11
Mon 03 March 2008, 07:12
Greg,
But hey I have had a lot of fun too getting into trouble in a lot of different fields! :):eek:

Heath.

Art
Tue 04 March 2008, 17:00
I am going to setup Z height calibration in the next few weeks. Plan on doing a detail write up to post. Any sugestions appreciated.

Gerald D
Wed 05 March 2008, 22:59
Greg, I realise that the pushbutton that initiates the z-zero sequence must go to a dedicated parallel port pin. But, pins being at a premium, can the z-zero plate itself go onto the same pin as the homing/limit switches? (the NO/NC aspect taken care of with some other logic/relay). In other words, would your sequence/files see the z-zero plate as simply another of the series wired home switches? (I must admit I havn't studied your files yet).

Greolt
Thu 06 March 2008, 02:23
To be honest I don't know.

Definitely probe could not share a pin with a limit.

Mach ignores limits when doing homing. So homing and limit can share.

But Mach would not ignore limit while probing. I think. :)

Maybe probe could share with home. Not sure...would have to test that one.

The G31 is hard coded in Mach, all the script does is call it as gcode. (G31Z-20)

revved_up
Thu 06 March 2008, 07:52
If you pause the machine using the button on the gantry or any of the remote switches for that matter and change a bit or anything that would require resetting the zero would you have to first press the resume button before pressing the zero button or would the zero button also resume the pause before starting the zero routine?

Gerald D
Thu 06 March 2008, 10:49
Greg, you seem to be talking of probe and z-zero device as being very similar. Are you using a modified "probe" function to do the z-zero? If yes, I understand why you want limits to function in addition to "probing". However, I see z-zero as something quite different from probing - I think it is just another "home switch" happily in series with the other home switches.

Snag is, we are running out of inputs on a single parallel port . . .
(Realise we already allocate 2 pins to Pause (Feedhold) and Resume, another pin for the button that starts the z-zero routine, and that leaves only one pin for limits, homes and z-zero together.

Greolt
Thu 06 March 2008, 12:56
Zero touch plate uses the probe input. So it utilizes a probe move (G31)

So in effect it is a probe. Yes five input limit quickly becomes a problem when wanting external controls. :)

Revved-up, That is a good point. I need to test routine while in feedhold.

I have no problem on my setup but I don't use an external switch like we are talking about with all it's associated macros etc.

I will test with that in mind.

Greg

Allegheny
Mon 10 March 2008, 06:55
Hi all,

If this has been posted before, I apologize, but I found this mentioned on a Yahoo group:

http://www.cad2gcode.com/cncprojects/id16.html

I haven't built one yet, but in my travels today, I'll try to round up the parts I don't already have in my junkbox.

Brian

kaartman
Mon 19 January 2009, 02:03
z zero wire diagram
This is how I understand it, to use a push button to activate the Z Zero process i need a N/O push button switch, input from PMDX 122 enter at one side of the switch and GND connected to the other end of the switch, now where does the wire come from that is connected to the touchplate.

sailfl
Mon 19 January 2009, 03:52
I had an extra hot wire in the push button box on the Y Car that I used to connect to Pin 11 on the PMDX and to the touch plate. I actually bought a inexpensive sprial wire that goes from my connection in the box. The other end currently has a alligator clip (which I will get rid of later) which I connect to my touch plate.

kaartman
Wed 21 January 2009, 07:52
Thank you Nils, I have done that
Regards

Art
Wed 21 January 2009, 14:13
t http://www.turningaround.org/HTMLPages/xyz_zero_addon.htm is my implementation of the MachBlue screen set. It contains the link to CNC Zone where the software and all details. Been using it for the las 6 months and love it.

javeria
Thu 22 January 2009, 04:20
Art - agreed that your setup is good - but for large machine like Mechmate - a laser crosshair - and a simple plate like Z - zero would be better -

bending over to hold the heavy steel block will be a problem for many unless you have employed some one to do it.

Now that I have seen what you have done - will have it done for my smaller machine and have a regular Z zero plate on the Mechmate.

Need to certainly try the Blue screen. Also some time back somebody was designing a Fanuc type screen which looked very interesting - have to look at it.

RGDS
Irfan

kaartman
Sun 25 January 2009, 23:20
Z Motor don’t stop
The z Motor turn when I activate the Z Zero at the gantry push button but it does not stop when the touch plate connects with direct ground wire, spindle ground or the ground on the PMDX 122, the LED at Pin 15 does light up when the touch plate touches gnd on pmdx
The wire from the pushbutton originates at pin 13 on the PMDX to N/O switch to ground on PMDX, the wire for the touch plate is from pin 15 on PMDX
M615.m1s and macropump.ms1s extracted and copied to Macro folder in mach3mill, and Zeroswitch.brn copied to Brain folder, Mach 3….. config > port/pin> input signal> INPUT #4 –enable- port 1- Pin# 13 and active low (tick), Config> General Logic> enable Macro Pump, Brain is enable in Operator/ Brain , vital restart done,
What did I do wrong, please help
Regards

sailfl
Mon 26 January 2009, 02:19
Koning,

I had the same problem and drove the router into the plate lots of times. I even pushed the router out of it's bracket. It wasn't until I reconfigured Ports and Pins did it start working and it works every time. In Ports and Pins, you have to use the Probe. Once you have done that, it should work. You can test it by holding the plate in the air or by touching the plate to the router once you have the macro activated.

I have a 3 inch down distance and I have the feed rate set at 10 but I would try 5 feed rate first. I always check the circuit before I run the macro.

I would also not use the macropump when you are trying to get it to run. Just use the macro so you know you don't have a programming problem on top of configuring the zero touch plate. You can always add the macropump back in. That way if you have a code error you can more easily find it and you can be sure that your hardware is working correctly.

I had problems getting the macropump working and it was a simple coding error but it was easier to find since I knew my zero touch plate worked.

Let me know if you need any other help.

Gerald D
Mon 26 January 2009, 02:49
3460

kaartman
Mon 26 January 2009, 12:43
Hi Nils,
The motor is turning free from the Z axis, when i configure the probe input then the Z motor is not turning at all, with input #4 the motor is turning nicely but did not stop with the touch plate touching to ground, I have installed the Zero probe system from ART`s recommendation and it worked first time with no problems, would like to have the remote pushbutton activated on that system too,
Thank you for your contribution, much appreciated,

obuhus
Sun 29 November 2009, 09:09
Marc, typically there are two wires, one with a crocodile clip, other with an alu plate. Clip goes to cutting bit to ground it properly, plate carries 5V. When bit touches plate it drops (shorts) the plate voltage to 0v. PMDX senses it as an input.

Some people work happily without the ground wire and clip because the cutter grounds electrically via the router bearings. Folk with spindles and ceramic bearings discovered that this does not ground and the spindle just keeps driving on into the table, lifting the y-car. (Imagine if the y-car could not lift . . . )

Then there are coated bits TiN or diamond/ceramic which also do not conduct . . . .

Greetings to all. Greetings Gerald. To see glad again you. At me a question about Z-Zero. I wish to understand as correctly to connect a wire from a crocodile to PMDX, from alu plate to PMDX where the black button is connected and how it is all works? I read this forum, but the full answer to the question have not found: (

More low I show, how I plan to connect other buttons on Y and Z-gantry. I hope all correctly except joints in a grey square?

sailfl
Sun 29 November 2009, 09:20
Dmitriy,

If you are using a router, you don't have to use the ground wire because it is grounded as described above.

You know just have to tell Mach which pin you are using for the probe and it should work.

obuhus
Sun 29 November 2009, 10:17
Thanks for a prompt reply. But I wish to understand in the complete set as I should connect wires from Z-zero plate, from Gerald's black button and what script to use.
I project a board of the relay and I should know as correctly all to make. The preliminary project of a board of the relay more low.

Gerald D
Sun 29 November 2009, 10:57
Hi Dmitriy, I have not used that black button yet. Sorry.

obuhus
Sun 29 November 2009, 11:16
What for the note?

obuhus
Sun 29 November 2009, 11:21
It is good thing - to use the additional (black) button for activation Match at calibration Z-zero. I heard it can work as additional limit switch? Let's solve this problem together!

smreish
Sun 29 November 2009, 11:36
What's the black button for?

I have modified Greolt and Nils script for the z-zero height to use this button as a height "set" and "start z-zero" routine. Before anyone ask's - I can't find the script in my library and the MM it is being used on is not near me....so I can't send it to you all yet.

Logic used:

1) Quick momentary push of the black operator "set's the z-height" at the current location.
2) A 2 second hold of the black operator "start's the z-zero" routine.

This allows for the single use of the PMDX input for both.

My contribution today! :)

obuhus
Sun 29 November 2009, 11:55
I thought that Gerald's black button activates a script for Match. After that Match defines height Z-zero with use of a script and inputs PMDX (a crocodile and z-plate), then makes program changes to options.

obuhus
Sun 29 November 2009, 12:10
How you think? Whether we can use the Crocodile and Z-zero plate as additional limit swittch for definition of real zero, and the black button for activation of procedure of definition of zero?

Gerald D
Sun 29 November 2009, 21:44
Dmitriy, Sean is telling you that he has built his machine exactly like you want it. He uses the black button for activation of procedure of definition of zero.

kaartman
Fri 20 January 2012, 22:36
I would like to use the z zero touch plate with the indexer, how would i go about changing the script, this is the scenario: from the center of the lathe to the top of the fixed surface at the point where i will use to zero the cutter is 75mm, I am making use of the screenset posted by PEU
thank you for the help
K

kaartman
Sat 21 January 2012, 09:54
I have copied the script here,and add a picture for a better understanding, I would like the cutter to retract 25mm above the flat surface ( yellow rectangle) that i use to find z zero, from the flat surface the Z is 75 mm downward, how would i go about editing the script below to accomplish this

'Rem Probe Down by PEU (Based on Erniebro Work)
FeedCurrent = GetOemDRO(818) 'Get the current settings
ZCurrent = GetOemDro(802)
Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "F100" 'slow feed rate to 100 MM/MIN
GageH = GetUserDRO(1152)
ZNew = ZCurrent - 20 'probe down 20 mm
Code "G31 Z" &ZNew
While IsMoving()
Wend
Call SetDro (2,GageH)
FinalMove = GageH * 2
Code "G0 Z" &FinalMove
Code "F" &FeedCurrent 'restore starting feed rate

The problem that i have is that the Z- axis retract the height of the gauge block and resulting in the Z to run into the Z max hard stop

alan254
Mon 30 January 2012, 10:59
i am finally in process of wiring my control panel. after reading and studing the drawing in post #63 a light in my head finally came on. that the green buttons on the machine are only to resume motion on the machine and not to start the whole machine. i was wiring the greens as all start stations. now , if im correct the only machine start will be on the control panel.

i also have only one set of contacts on my e-stop buttons and am using my an extra set of contacs in my main contactor to hold in the e-stop on the pmdx, when the contact opens the pmdx will be open and cause the e-stop within the pmdx to do the same.

I hope i am correct

smreish
Mon 30 January 2012, 13:42
Al,
The green button "can" start the process if the file is loaded in the cue and ready to cut. Or, if your repeating many part files, it will be the "cut again" file. The association in the OEM mapping - the 1000 and 1001 numbers in Mach 3 allow for it.

But, for wiring sake....it's really a "resume" green button, and yellow "feed hold"
Which, if your using the PMDX-122. Will be two the five J terminal inputs allowed. All button stations of similar type wired in parallel.

Does that help?
Sean

alan254
Wed 07 March 2012, 13:00
In wiring the Z-Zero button the infamous “ Black Button”

First, a wire coming from the PMDX-122 pin # 15 (in my case) goes to one side of the black button on the Y- car that SAME side also connects to the z-plate.

The other side of the NO Button connects to ground.

When the button is pressed making contact to ground, release the button after two seconds, Mech3 then starts the zeroing process. Mech3 is now in control until the spindle bit comes into contact with the z-plate thus zeroing the DRO.

Now that is assumed that 3 files supplied by Greg in post #38 have been installed to the proper folders in Mech3. I am using a .250 aluminum plate where do I enter this?

I think I understand it. If not HELP.

Thanks,

Al

alan254
Wed 07 March 2012, 13:34
Here is a drawing of my understanding

13118

Al

smreish
Wed 07 March 2012, 14:17
Al,
In the .m1s file you will see a notation for plate thickness.
You change it there - decimal entry.

alan254
Wed 07 March 2012, 14:38
Hi Sean.

I guess that my theory and wiring is correct then? I will modify the file and load them,

Thanks,
al

smreish
Wed 07 March 2012, 14:42
Yes,
The z touch plate and black button are wired in parallel.
MACH uses the probe input for the routine to work correctly. So make sure you configure Port and Pin #15 accordingly in your set up table under Config / ports and pins menu.
You can edit the M1s file after it' s all uploaded by selecting from the menu bar "operator" then select "edit button script" then select with your mouse on the "auto tool zero" under tool information and a dialog box will open. Edit the value there and save.
Then run the routine. This allows for very finite adjustment of the tool plate and hysteresis of your set up. I think my .375 alum plate ended up being .378 after many tests. Be mindful of your tool speed. It will cause an overrun of the probe sense and change the plate value.

alan254
Wed 07 March 2012, 15:01
thank you, try it tomorrow. hope can help others soon

al

alan254
Thu 08 March 2012, 09:37
Well i tried and here is the results.

This is what I did to set up and load z-zero plate program:

1:Ports & pins>> enable probe>> port 1, pin #15

2: Ports & pins>>General config. >>> turn on micropump

3: Load ZeroSwitch.BRN file into brain folder.

4: Load the Macropump.M1S into the mill folder, in my case my profile folder called “Router”.

5: Load the M615.M1S into Router folder.

6: “Sean quote”, to edit the 615.M1S file.

You can edit the M1S file after it' s all uploaded by selecting from the menu bar "operator" then select "edit button script" then select with your mouse on the "auto tool zero" under tool information and a dialog box will open. Edit the value there and save.
Then run the routine. This allows for very finite adjustment of the tool plate and hysteresis of your set up. I think my .375 alum plate ended up being .378 after many tests. Be mindful of your tool speed. It will cause an overrun of the probe sense and change the plate value.

All went fine to till I got to edit box. Got a “ message not implemented yet”. I manually open the file and chance the Plate Thickness and save to the following.

Call SetDro (2, PlateThickness)

CHANGED Plate Thickness to .253 my plate thickness

Call SetDro (2, .2530)

Reloaded Mech3 “Router” the Black button does nothing.
When I tried to reference home the Z tries to zero and does not stop when the proximity sensor is reached.
Also the Z DRO will not zero the x and y will both zero.

lost again

Al

smreish
Thu 08 March 2012, 10:34
It's okay....I'm always lost.
Let me review your process. In the mean time. NILS #12 - Help!

alan254
Thu 08 March 2012, 11:18
Noticed in the BRN file although it appears to be compiled the top line reads input #4. I am usinginput #15

alan254
Fri 09 March 2012, 05:08
Here is the modifications I made to my 615.M1S. I believe they are correct.

CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then
DoOEMButton (1010)
Code "G31Z-7 F30"
While IsMoving()
Wend
ZProbePos = GetVar(2002)
Code "G0 Z" & ZProbePos
While IsMoving ()
Wend
Call SetDro (0.253, PlateThickness)
Code "G4 P0.25" 'Pause for Dro to update.
Code "G1 Z20 F.5" 'Change the Z retract height here
Code "(Z axis is now zeroed)"
Code "F" & CurrentFeed
Else
Code "(Z-Plate is grounded, check connection and try again)"
Exit Sub
End If
__________________________________________________ _______________

changed lines this should effect

line 3 F30" feed rate
line 10 (0.253,plateThichness) adjust plate thickness
line 12 F.5" Retract cutter after zeroing

Am using the Mach3mill window under name "Router"

Al

alan254
Sun 11 March 2012, 06:36
Been reading the other two sites for the past two days. i guess the auto zero on the mech 3 screen is not funcional. Need to add buttons. Have played with the modified 1024 screen a little. I will be using the spindle controls and don't lose them. I can step throught the 615.m1s program and make it work. But as a whole still trying.

I am a ways away of editing the Mech3 screens. I would like to see three buttons added to the bottom the Mech 3 screen . 1:Auto tool zero. 2: Plate Thickness. 3: Feed rate

Does someone have this or can i get someone to make these change?

To much to learn all at once.

On the lighter side I did cut my first real job yeaterday.

Thanks al

ger21
Sun 11 March 2012, 09:19
i guess the auto zero on the mach 3 screen is not functional.

Mach3 does not come with an auto zero script. You need to find one or create you own, and add it to the button.

alan254
Sun 11 March 2012, 10:03
I have a script but am having trouble adding to the button.

al

ger21
Sun 11 March 2012, 10:17
Go to Operator > Edit Button Script.
Click the Auto Zero Button.
If anything is in the window, delete it, then paste in your script.
File > Save
Close Mach3 and restart it.

That's it.

Gerry

alan254
Sun 11 March 2012, 10:39
I will try. Been playing with gregs script in post #38.

thanks.

al

alan254
Tue 13 March 2012, 11:43
Hi all,

I am using the screen “1024%Zero” I do use my spindle controls. My PMDX- 122 bob that is set to the “probe” input # 15. I do have a green light on the screen when touched and it allows me to enter a value of the plate “.253”.

The 615.mls file is aversion of Greg’s modified as follows:

CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then
DoOEMButton (1010)
Code "G31Z-7 F30"
While IsMoving()
Wend
ZProbePos = GetVar(2002)
Code "G0 Z" & ZProbePos
While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Code "G4 P0.25" 'Pause for Dro to update.
Code "G1 Z1 F20" 'Change the Z retract height here
Code "(Z axis is now zeroed)"
Code "F" & CurrentFeed
Else
Code "(Z-Plate is grounded, check connection and try again)"
End If

When I run I get the following results:
coordinates DRO readings action

reference zero DRO 0.0000 Bottom of cutter at
top of z plate DRO -6.2960 measured distance
user coordinates DRO 1.0010 touches z plate and retracts
machine coordinates DRO -5.3800 touches z plate and retracts


I believe the user coordinates should be the 1” minus the z-plate thickness of .253 that I entered in the screen or .747 and not the 1.001 I am reading.

If this is wrong, then, what have I doing wrong?
Thanks,
Al

ger21
Tue 13 March 2012, 12:54
After the probing, the Z retracts 1" from the "G1 Z1 F20" line, so you're DRO should read 1". You're probably seeing 1.001 due to your steps/unit setting.

Gerry

I replied in the wrong thread, but you should now have your answer.

alan254
Tue 13 March 2012, 13:52
Hi Ger,

Shouldn't the user DRO be corrected to the top of the work or " the user coordinate" and not the top of the z plate.

When the spindle retracts it retracts it 1” from the top of the z plate. That would make the work surface 1.253" below the cutter. I was under the impression that the used DRO would be corrected to work surface and not the top of the Z plate.

I've been wrong before.

On another note, I spent a couple of days trying to get this running correctly. Only to find I had a corrupted compiler in Mech3. Reloaded Mech3 and loaded the first time.

I did learn a lot along the way which is good.

Now that I have it running from the screen I will load the macro and the brain and see if I can get the buttons in the Y car to work.


Thanks

Al

ger21
Tue 13 March 2012, 14:02
No, because you should be in Absolute (G90) distance mode, so the G1 Z1 moves to Z = 1, not 1" above the plate.
It's good practice to check for incremental mode (G91) in the macro and switch to G90 if you are, or bad things are likely to happen.

Gerry

alan254
Tue 13 March 2012, 14:12
I do not have a G90 or a G91 in the program. Have to learn what they are. Just went out and measured the actual distance between the plate and the cutter and it is .750. I feel a lot better. Like i said I've been wrong before.

Guess I got lucky

Thanks.

Al

alan254
Wed 14 March 2012, 08:39
HI Ger,

I hooked up my Y car buttons today. I loaded Greg’s Macro and Brain files and set OEM buttons to input #4 and OEM code 301.

The y car buttons work fine and the DRO user readings the correct readings.

But, there is one glitch I can’t figure out. That is when I press the on screen button the machine does its z-plate routine the final user DRO reading 1.001” and .753 off the z-plate. This is fine. When I press the routine from the Y car buttons I get a User DRO reading of 2.002” and am 1.753 off the work surface. Which is also fine.

The question is why is Y car readings 1” higher than if I use the on screen command?

One other thing my Normal/Abnormal condition led keeps flashing and has done so since I started the z-plate install. When I highlight with mouse I get a message” axis’s not referenced in a normal condition.

I do appreciate all the input I have received it does help could not have done with out all your support.

Thanks,
Al

ger21
Wed 14 March 2012, 09:36
I don't have a Mechmate. What is the Y car button doing? How is Mach3 set up for it?

What does the brain do?

As for the normal/abnormal, just double click it and set it to normal. It's the dumbest thing ever conceived and should be removed from the screen. It has nothing to do with any errors, it just let's you know that settings have changed.

alan254
Wed 14 March 2012, 09:53
Hi Ger,

If you read post #38 of this section all your answers will be answered. In that post are the brain and macro files along with instructions I am using. You need a MechMate!!! to play with.

Thanks Al

Gerald D
Wed 14 March 2012, 10:56
. . . . an external switch to activate the Auto Tool Zero routine . . . .

Ger, the table is so big that we sometimes climb onto it to change tools - then the keyboard is too far away to find an auto-zero button.

ger21
Wed 14 March 2012, 11:51
Try this code:

CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then
DoOEMButton (1010)
Code "G31Z-7 F30"
While IsMoving()
Wend
ZProbePos = GetVar(2002)
Code "G0 Z" & ZProbePos
While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Sleep(250) 'Pause for Dro to update.
Code "G1 Z1 F20" 'Change the Z retract height here
While IsMoving()
Wend
Message "Z axis is now zeroed"
Sleep(150)
Code "F" & CurrentFeed
While IsMoving()
Wend
Else
Message "Z-Plate is grounded, check connection and try again"
Sleep(150)
End If