Hello Guest it is April 19, 2024, 10:49:47 AM

Author Topic: Challenge question regarding Homing & Limit Switches  (Read 9332 times)

0 Members and 1 Guest are viewing this topic.

Offline mhdale

*
  •  130 130
  • Knowledge is the Treasure.
    • View Profile
    • Black Dragon Technologies
Challenge question regarding Homing & Limit Switches
« on: April 20, 2007, 02:20:08 PM »
Hello all, I am currently working on an automation project and since I love MACH3 and happened to have a GREX sitting on my shelf we decided to use the GREX for the motion control of this little project. My question/problem is thus: I Have 2 Unique Axis's each of these axis has 4 Stepper Motors and a limit switch for each motor. The 4 Motors all share a step and direction signal. I need to be able to "HOME" these motors. The simple solution has been forwarded by a respected colleague who suggested homing them to a hard stop but I am not sure how MACH3 would "know" then that they are homed. I am looking for an elegant reliable solution but I have a tendancy to OVERTHINK these problems and end up chasing my tail. All suggestions would be welcomed.
 I had thought to wire the 4 limit switches in series so that when ALL the motors have tripped the limit switches I get a limit signal, but I need to disable the motors as they trigger the limits so they dont move past the limit... again simple to do, but How do I get MACH to RE-ENABLE the motors after the limit has been triggered? It seems that the Homing process is embedded in MACH so I cant Modify it, I suppose I could write a Modified "probing" macro and use the limits as the probe switch, but is it possible to have 2 separate probes?..... O Hey theres my tail!  :D
Thanks in Advance

Mike

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: Challenge question regarding Homing & Limit Switches
« Reply #1 on: April 20, 2007, 05:05:42 PM »
Hi, Mike

The hard stop sounds simple, 4 NC switch's wired in Parallel, Mach drives all 4 steppers home at a slow rate, When last switch opens Mach

will move them off the same amount of steps, Till the first switch closes.

Sounds OK, Chip

Offline Scott

*
  •  139 139
    • View Profile
Re: Challenge question regarding Homing & Limit Switches
« Reply #2 on: April 20, 2007, 08:19:33 PM »
Hey Mike,

Can you give a little more info about the setup.  Are these four motors all moving the same thing at the same time?  Could you use just one limit switch for the four.  If so, while referencing an axis, Mach3 will come to the switch, trigger it and then move off the switch slightly.  At that point, if the axis is zeroed, your good to go.  If there is some distance from that point to the actual zero, then you can put a home offset for that axis in "Homing and Limits", then issue a G28, and then zero that axis.  A more graceful way would be to use a script.  I have my 'Ref All' button coded to do a G28 and then zero all axis after homing to the switches.

Someone else may have a better way.  I was just intrigued by what it is that you may be doing and just thought I'd give my 2 cents.   ;)

If I'm way off base from what you're trying to do, then disregard.  ;)
Scott

Offline mhdale

*
  •  130 130
  • Knowledge is the Treasure.
    • View Profile
    • Black Dragon Technologies
Re: Challenge question regarding Homing & Limit Switches
« Reply #3 on: April 21, 2007, 10:00:55 PM »
Scott, All 4 of these motors are moving together, they will all share the step and dir signals from the grex. The motors position a 50' long "jig", and initially they will not be positioned correctly in relation to each other. Once Synced up they should never loose position but I want the system to correct any problems that may occur should a belt break or something jam one of the motors. Basically its like having a single controller controlling 4 Machines(for this axis). Does that make sense? If I have a single limit switch then all 4 will move together but only the one with the limit will be correct in relation to the home position the other motors may be out of position. All suggestions and questions are welcome. Sometimes the dialogue can trigger the solution or pehaps someone else out there has done something similar, a different perspecitive is allways welcome :)

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Challenge question regarding Homing & Limit Switches
« Reply #4 on: April 22, 2007, 06:42:54 AM »
Just a quick thought. Could you use 4 switches. one for each motor to enable and disable your drives? Or three and one home switch? With this, you would also need some code added to your home button and a bypass on a relay. Just thinking out loud. I'll post more later, got to go.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline mhdale

*
  •  130 130
  • Knowledge is the Treasure.
    • View Profile
    • Black Dragon Technologies
Re: Challenge question regarding Homing & Limit Switches
« Reply #5 on: April 23, 2007, 10:55:54 AM »
Brett, That is the direction I have been trying, I have 4 Limit/Home switches with adjustable positions so we can get whole length dialed in. My challenge is in designimng the homing code and creating the bypass circuit to re-enable the motors after they have hit thier respective limits. I am also waaay over my inputs and outputs on this system, I think I will just have to bow down and put together a preliminary I/O handler using a Microcontroller or PLC... I do have a Modbus MODI/O but I havent set it up yet.....trying to get the fundamentals worked out first.
Any suggestions on a simple enable bypass which will allow me to re-enable all 4 motors? I was thiinking of using a set of relays linked to the limit switches to control the motor enable and limit info and the 5th relay to bypass the motor enables. Or is that getting too complex? My first inclination is allways to put together a microcontroller board customizzed for my application but I wanted to keep this system servicable by the average shop floor guy, relays are pretty straightforward arent they?
Mike

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Challenge question regarding Homing & Limit Switches
« Reply #6 on: April 23, 2007, 11:37:05 AM »
Mike,
  I have sent you a personal message.


Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline mhdale

*
  •  130 130
  • Knowledge is the Treasure.
    • View Profile
    • Black Dragon Technologies
Re: Challenge question regarding Homing & Limit Switches
« Reply #7 on: April 23, 2007, 01:06:55 PM »
Brett, Got your message, I will try and contact you most likely this afternoon. Hopefully thats convenient.
Mike

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Challenge question regarding Homing & Limit Switches
« Reply #8 on: April 23, 2007, 01:21:53 PM »
That will be fine.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Challenge question regarding Homing & Limit Switches
« Reply #9 on: April 23, 2007, 03:52:45 PM »
mhdale:

   The solution, is simple, (If I understand what you want). Goto  "www.cncbuildingblocks.com", order an "Accustep board", this board has 4 axis on it (as a breakout), and it has a CLPD.  You can set the number of encouder counts, off the home/index postion, each axis is independandly adjustable for how far off of home/index it will travel. I can repeat 1-2 Tenths!! off the encouders.  The count per axis, to move off ref is set by a 8bit binary wieghted switch block.

Very easy to use, good price, good documentation. The guy that sells them is:  Ed Gilbert of "Gilbert Engineered systems".

BTW: Ones the various axis home (to what ever count you decide), it then sends the "Home Signal" to mach, Mach thinks it is home, and the lights say so, but the axis doesn't move any further than what you set it for.

Scott
fun times