MechMate CNC Router Forum

MechMate CNC Router Forum (http://www.mechmate.com/forums/index.php)
-   70. Control Systems (http://www.mechmate.com/forums/forumdisplay.php?f=28)
-   -   Z-zero plate - for calibrating z-height to workpiece or table (http://www.mechmate.com/forums/showthread.php?t=608)

Marc Shlaes Mon 04 February 2008 20:18

Z-zero plate - for calibrating z-height to workpiece or table
 
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

push button tutorial
 
Ryan,

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

Follow this tutorial
Gerald walked me thru this earlier in the week.
OEM codes 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/ind...6&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

Quote:
Originally Posted by Greolt View Post

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

1 Attachment(s)
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

1 Attachment(s)
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. :)


All times are GMT -6. The time now is 04:29.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.