Hello Guest it is December 21, 2024, 12:16:04 PM

Author Topic: zeroing axis while it is moving  (Read 8257 times)

0 Members and 1 Guest are viewing this topic.

zeroing axis while it is moving
« on: April 28, 2006, 12:07:52 PM »
Hello,
Does anyone know if it is posible to zero an axis while it is moving? I need this not for a machining operation. I am building a machine, and i want to control it with Mach3.
What I need is Mach3 to move a servo that servo will take a piece of stock, and I want to zero the DRO of that axis when the stock passes trough a sensor and keep moving in the same direction, let me see If i can explain myself better:
the DRO is now at 10 and it is moving in the +direction, when the DRO reaches 12 the stock triggers a sensor, when that happens I need the DRO to reset at 0 and keep moving on he +direction.
Is this possible?
Regards
Fernando
Re: zeroing axis while it is moving
« Reply #1 on: April 28, 2006, 01:51:24 PM »
I guess I could do this this way instead, when the sensor trips, the movement stops, zeroes, and then starts moving again with another code
Makes sense?
Re: zeroing axis while it is moving
« Reply #2 on: April 28, 2006, 07:50:11 PM »
I think you can do it with the Macropump... Call setDRO(0,0) will zero the X axis...
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: zeroing axis while it is moving
« Reply #3 on: April 28, 2006, 09:29:17 PM »
Brian,
How would you program the code as for the Call setDRO(0,0) would be run when the sensor is tripped?
Regards
Fernando
Re: zeroing axis while it is moving
« Reply #4 on: April 29, 2006, 07:14:54 AM »
Now that I sit and think about it I think it why not set it up as the probe input :) That would make the maro very simple to write!
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: zeroing axis while it is moving
« Reply #5 on: May 01, 2006, 02:38:56 PM »
I am a newbie regarding VB programing and wizard writing, so using the probe input as you said is not ringing any bells, is it possible to set a code to do the following:

If "sensor-is-tripped" then
      Stop movement
      Zero x-axis
      Send a signal that the axis has been stopped and zeroed
End if

How would this be coded into Mach3 VB?
Hope you can help, trying to incorporate Mach3 into OEM equipment other than machining is a lot more difficult
Thanks
Fernando

I would assume this would be done better using the macro pump and setting a code like this:
IF IsActive(sigNo as Integer) as Boolean then
      Stop movement
      Zero x-axis
      Send a signal that the axis has been stopped and zeroed
End if
« Last Edit: May 01, 2006, 03:18:08 PM by fer_mayrl »
Re: zeroing axis while it is moving
« Reply #6 on: May 01, 2006, 04:20:32 PM »
Is this an event that you KNOW is going to happen Like you have something pushing in the stock after the cutoff?
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: zeroing axis while it is moving
« Reply #7 on: May 01, 2006, 05:07:48 PM »
Yes Sir,
Lets say its part of the process, I need to know when the "conveyor" gets the part, as to tell it how far to move to determine the lenght of the stock.
Thanks
Fernando
Re: zeroing axis while it is moving
« Reply #8 on: May 01, 2006, 06:09:54 PM »
How often does the macropump run?

How many times a second would it monitor de activation of an input?
Thanks
Fernando
Re: zeroing axis while it is moving
« Reply #9 on: May 01, 2006, 07:32:48 PM »
I think it is about 1/4 Sec or so...
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com