Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: kthomson on April 28, 2008, 10:08:49 PM

Title: Reset
Post by: kthomson on April 28, 2008, 10:08:49 PM
Is there any way to turn off the D*** Reset function in Mach3? I'm trying to write a macro that will accurately set zero on the X and Y axis. I have a program that would work perfectly, except that every time it hits any home limit it locks the machine up until I press the 'Reset' button.

It makes sense that hitting a limit would stop a running program, and stop it from running any further in that direction. It makes NO sense that it has to lock up the entire machine until you press the 'Reset' button. I already have the 'Auto LimitOverride' turned on, but it still locks it up until I hit the button. Is there a function that can override that setting?

Thanks
Ken

Title: Re: Reset
Post by: Chaoticone on April 28, 2008, 10:38:31 PM
It is doing exactly what it should do. Limits are just as the name implies, limits. You can disable your limits but I don't recommend it. You can jog off of your limits and zero your work cord. and then when you want to go to your work 0 you can press the go to z button.

Hope that helps,
Brett
Title: Re: Reset
Post by: Chip on April 28, 2008, 10:41:18 PM
Hi, Ken

If your using the same sw for Home/Limit, Turn the Limit function off till you get your program working.

When homing Mach treats the sw as a home sw, After there homed and have moved off the sw's there treated as Limits, If turned on in ports/pins, inputs.

Hope this Helps, Chip
Title: Re: Reset
Post by: kthomson on April 28, 2008, 11:20:38 PM
Chaoticone,

I disagree. A limit is supposed to stop any further incursion past the limit switch.  It is exacly that, a limit. It should allow no further movement in that direction, on that axis. It should stop any running program (if you hit a limit you have already screwed up), and it should stop any further movement on that axis, in that direction. It should NOT stop movement on that axis in the other direction, or movement on any other axis in ANY direction.

Chip,

If I change those settings, the limit doesn't do anything. It needs to stop the axis movement, it just doesn't need to lock up the entire machine. After hitting the limit, I need to move off the limit 1/2 " , then move back to the switch at a lower speed.

I switched from WinCNC to Mach3, including buying and installing a bunch of new hardware, because I thought there would be more flexibility with Mach3. So far, there seems to be an indecipherable bunch of codes, from VB, to Mach3, to GCode, with poor documentation (this coming from someone who has taught himself 3 other programming languages). Yes, there is documentation out there, but it is so scattered, and poorly documented that it is pretty much worthless. There are very few syntax examples for accessing Mach3 codes from VB, or GCode from VB. I have spent over 20hr in the past few days just trying to make this stuff make sense. I still haven't found a way to make a limit switch do what it should, limit movement in that direction without killing the entire machine.
Title: Re: Reset
Post by: Chip on April 29, 2008, 12:46:14 AM
Hi, Ken

Just what is it you really want Mach to do.

Mach has a settable Home speed's, When Mach is in Homing mode it doesn't turn off or E-stop anything. You may need your vb script/code in the "Reff All Button" that controls homing, Or Setup some home sw's inside your limit sw's.

It's under Operator, Edit Button Scripts, the Ref All button will flash click on it.
 
"Limits shuts every thing down", It depends how you wire your system it doesn't have to shut down everything.

Many machines you need to set a override sw or hold a reset sw to move off the limit sw's Mach has that also.

Documentation, In the last year or so there have been many features added to Mach. Theres allot of info.

There are sections hear for, vb, macro, braines, With many people to help.

Hang In There, Chip

Title: Re: Reset
Post by: Chaoticone on April 29, 2008, 12:57:29 AM
Quote
I disagree. A limit is supposed to stop any further incursion past the limit switch.  It is exacly that, a limit. It should allow no further movement in that direction, on that axis. It should stop any running program (if you hit a limit you have already screwed up), and it should stop any further movement on that axis, in that direction. It should NOT stop movement on that axis in the other direction, or movement on any other axis in ANY direction.

Industry standard is to stop all movement and the program when any limit is hit. Also a refrence all axis is demanded by any machine manufacturer I have ever dealt with in the past 15 years if a limit is hit. As you said, If you have hit a limit you have allready screwed up. Mach allready has a homeing routine in which you can control the homeing speed. You can also set a home off value so that when you hit go to z it will go a predetermined distance. I'll try to help you get it doing what you want, but the limits work exactly as they should.

Brett
Title: Re: Reset
Post by: Hood on April 29, 2008, 02:10:03 AM
Ken
 Limits stop all movement, what you want are softlimits, get them set up and I think they will do what you are wanting.
Hood
Title: Re: Reset
Post by: kthomson on April 29, 2008, 07:48:26 AM
What I'm wanting to do is:

Click on 'Ref XY'
Approach the X axis limit at a fairly slow feedrate (e.g. F20)
When it hits the limit, move off the limit to say .5"
Approach the limit again at a slower feedrate (e.g. F 5)
Reset the readout to 0
Repeat these steps on the Y axis

The reason I want to do this is that the current 'Ref XY' button moves the heads too fast, and the stop is not consistent. I know that you can change the jog speed, but the only setting I have found to do that slows the jog rate all the time. I know that you can override that by holding the shift key (not crazy about having to do that either), but it is already slower than I would prefer the rest of the time. There may be other ways to change that speed, I only started working with Mach3 a couple of days ago, so I'm still learning how to use it.

I have been using WinCNC, and just changed my machine to CandCNC controllers and Mach3. For the most part I like Mach3, but WinCNC had two macros built in that I really liked and I'm trying to duplicate them for Mach3. The first is the function just mentioned. It worked beautifully, and was exceptionally accurate for it's repeatability.  The second, is a 'Z' axis 'Touch Top' function. When you click on this button, the Z axis lowers until it touches a touchpad, then raises to a known height and resets the reading. I have that one working, and will attach it to another message (someone else was looking for that function in another message), I'm not on that computer right now.
Title: Re: Reset
Post by: stirling on April 29, 2008, 08:17:46 AM
Hi Ken - Let's draw the distinction between limits and home - As has been said, they perform two totally different functions regardless of whether you're using the same physical switches or not.

Homing: As Chip has already said you can set home speed on the Home/limits dialog - this is totally independant of jog speed.

Regarding your home twice idea. If you could do that, it simply wouldn't make any difference. The home position as far as I know is set on the backoff stroke - not the approach stroke.

Limits: As has also been said - if you hit a limit - something has gone wrong - the only thing that is safe is to stop all motion. You're then free to check out what's occurred, jog off the limit and then ref all axis. IF you could get the system to ref all axis after you hit a limit what would it tell you? - you come back to the machine, find the job incomplete and the system homed - what was the problem? - you'd have no clues.
Title: Re: Reset
Post by: kthomson on April 29, 2008, 08:42:43 AM
We seem to be getting confused. I agree, if you are running a program, yes, a limit should stop the program, stop the machine from moving, and do nothing else until the fault is corrected. My complaint is that, while jogging, when you hit a limit, or a home switch, you are not allowed to jog off the limit without hitting a reset. If you are jogging in the X- direction, and you hit either a home, or direction limit, the machine should not allow you to move that axis any further in that direction, but I don't see any reason it should stop you from jogging that axis in the other direction, or to jog any other axis in any direction until you hit a reset button. Again, I used Mach3 for the first time 2 days ago, so I'm sure there are a LOT of things I don't know about it yet. Again, I'm trying to recreate 2 macros that I have been using in another program that worked very well.

I guess what I'm asking is, is there a way to tell the machine that hitting the limit was not a fault. I want to move the X axis until it hits the limit, then move off the limit a programmed amount, then move to the limit again at a slower speed and repeat this on the Y axis, all without having to hit the Reset button.
Title: Re: Reset
Post by: stirling on April 29, 2008, 09:17:24 AM
I think the problem may be that we're looking at limits from different perspectives. I'm going to take a flyer and guess your machine is smallish because if you hit a limit on a large heavy machine you really don't want to do it again. I see them as the equivalent of airbags in a car - I really don't want them to go off but if the sh*t hits the fan I'd rather they did. Forgive me - but you seem to see them as a tool to aid positioning and perfectly ok to hit whenever you like. Try that too often on a large heavy machine and you'll most likely wreck it. All sorts of nasty things happen when you stop a machine dead. Inertia - both mechanical and electrical has to be dumped big time - not nice on anything involved. That's why Mach has soft limits - at least then the potential for damage is reduced. Just my opinion.
Title: Re: Reset
Post by: Chaoticone on April 29, 2008, 01:29:28 PM
kthomson

    As Hood said earlier, you want to set up your softlimits. This will give you what you want I think. This isn't going to change the homeing routine or what happens when you hit a limit but it will allow to jog in a given direction until you hit a softlimit and be able to continue jogging from there and not putting you in Reset (e-stop) mode. You can even set up the deccel ramp. Have a look at config, homeing and limits. The way homeing works is this. It jogs the z in the direction of its home switch at the % speed of your rapid jog (you determine this) untill it sees it change states then reverses untill it has cleared the switch and then zeros your machine coord. DRO. It then repeats this for x then y. If you are homing in the posotive directions, do me a favor and set you homeing and limits to look like this and try it. Ref all axis and then turn on your softlimits. Now jog to extremes. This is assuming you have at least 2 inches of tavel on each axis.

    The shift key is your rapid jog button. Again, works like it should. You can open the mpg page by pressing the tab key and set your slow jog rate. When you hold the shift key then press a button is now jogs at rapid determined by your motor tuning settings.

    As far as an auto tool touch off, it is covered in several thread here. Do a search for a wealth of info. on it.

Brett   

(EDIT)
Change your homeoff values in the screenie to 0.  ::)
Title: Re: Reset
Post by: kthomson on April 29, 2008, 02:04:33 PM
Yeah, we may be confusing terminology. My machine has three limit switches which function both as 'Home' sensors, and travel limits. I guess I've been using the terms interchangeably, and they are really not. Anyway, I've found what I was looking for. After reading through all of the available codes I found that I can send a reset command from within the macro, so it's not a problem. I can send a reset when it hits the switch, then continue the code.

I'm using this on a 5' X 9' router.

Thanks for the input guys ...
Title: Re: Reset
Post by: Chaoticone on April 29, 2008, 02:18:06 PM
OK, set your max softlimits accordingly and give it a go. I think you'll love it. If it is all set correctly you can leave your softlimits enabled even during homeing.

Brett
Title: Re: Reset
Post by: Chip on April 29, 2008, 04:47:18 PM
Hi, kthomson

Are you using your code in the "Reff All Home" button script ?

Show us the code if you get time.

Thanks, Chip