Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: kolias on January 18, 2011, 10:43:27 AM

Title: Wiring Limit & Home Switch
Post by: kolias on January 18, 2011, 10:43:27 AM

I started wiring my limit switches. The Y axis is driven by two motors and I will have 2 limit switches which will be used to home this axis. On the X axis I will also have 2 limit switches and on the Z axis the same.

I plan to use one cable with two wires (black and red) per axis and wire the 2 limit switches of each axis to the BOB in series. I have attached a picture of the BOB for reference

Is this a good wiring method?


Title: Re: Wiring Limit & Home Switch
Post by: Tweakie.CNC on January 18, 2011, 11:22:50 AM
Just a suggestion,
You should really be using screened / shielded cable (grounded at the BoB end only) for connecting these switches in order to avoid any future problems with possible noise pickup and false triggering.

Tweakie.
Title: Re: Wiring Limit & Home Switch
Post by: brtech on January 18, 2011, 01:18:15 PM
I think you want separate switches for the home operation of Y and A.  Depends on how rigid your system is, and how little noise you get, but generally, you home A separately from Y.

You can, if you want to, wire all the limit switches for X, Y and Z into one input, and even include the opposite (from home) A in that loop, and have one input for A, a total of 2 inputs on your BoB.  A more conventional setup is 4 inputs, one each for X, Y, Z and A. 

You really, really want to use shielded cable as Tweakie says.  It used to be that the recommendation for shield grounding was one end only.  Today, the recommendation is earth all metal really well and ground both ends of the shield.

Your basic wiring  idea is sound.  If you want to use 2 inputs, you can use a single conductor shielded cable running all the way around the machine, or you can use the 2 conductor shielded running per axis, and series them close to the BoB.  If you use 4 inputs, then your basic idea works. 

To put them in series, on the "near" switch, you cut one of the wires and put the switch on the two ends of, say, black, leaving the other intact and not connected.  On the "far" switch you connect the two wires to the switch.   

Title: Re: Wiring Limit & Home Switch
Post by: kolias on January 18, 2011, 02:09:47 PM
Thank you both, I should have been more specific but my cable is shielded.

brtech now you mentioned it I agree that the Y and A should have separate switches and I will follow this since my BOB has 4 input connections.

Regarding grounding both ends of the shield I agree that there is a controversy about this and therefore I will start by grounding the end at the BOB and see how she works.

Your last paragraph explanation is perfect
Title: Re: Wiring Limit & Home Switch
Post by: kolias on January 18, 2011, 06:15:55 PM
I made the attached simple schematic

Can someone let me know if it looks ok?

Thanks
Title: Re: Wiring Limit & Home Switch
Post by: brtech on January 18, 2011, 06:35:19 PM
Sure.  Looks fine.  Why wouldn't you put 2 switches on Y?  It's probably overkill for A, but if you are taking the trouble, put one on the "far" (opposite of home) on Y.
Title: Re: Wiring Limit & Home Switch
Post by: kolias on January 18, 2011, 08:10:09 PM
Sounds like an excellent idea brtech, thanks for pointing out to me

I also revised my schematic
Title: Re: Wiring Limit & Home Switch
Post by: Tweakie.CNC on January 19, 2011, 02:53:00 AM
Quote
Today, the recommendation is earth all metal really well and ground both ends of the shield.

Brtec,

I would be grateful if you could tell me your source for the recommendation to ground both ends of the shield.

Tweakie.
Title: Re: Wiring Limit & Home Switch
Post by: Hood on January 19, 2011, 02:58:26 AM
Often one switch is all that is needed on an axis as it can be triggered at either end of the travel, just depends on your setup.
Hood
Title: Re: Wiring Limit & Home Switch
Post by: kolias on January 19, 2011, 07:47:49 AM
Often one switch is all that is needed on an axis as it can be triggered at either end of the travel, just depends on your setup.
Hood

Good point Hood and I will follow it
Title: Re: Wiring Limit & Home Switch
Post by: Overloaded on January 19, 2011, 08:05:48 AM
Quote
Today, the recommendation is earth all metal really well and ground both ends of the shield.

Brtec,

I would be grateful if you could tell me your source for the recommendation to ground both ends of the shield.

Tweakie.
Hi Tweakie, this is from an AB drive manual regarding an auxiliary encoder application. (5vdc)
Sort of confusing, I've seen somewhere, where both ends connected can cause a loop and never really drain.
Title: Re: Wiring Limit & Home Switch
Post by: Tweakie.CNC on January 19, 2011, 08:51:04 AM
Thanks Russ, I think Brtec is getting confused between 'earth' and 'ground' which are essentially and should be treated as two separate circuits.

Tweakie.
Title: Re: Wiring Limit & Home Switch
Post by: kolias on January 19, 2011, 09:10:41 AM
Thanks Russ, I think Brtec is getting confused between 'earth' and 'ground' which are essentially and should be treated as two separate circuits.

Tweakie.


I'm confused too LOL, so what is the difference between "earth" and "ground"?

To me they are both the same but then again I'm probably wrong
Title: Re: Wiring Limit & Home Switch
Post by: brtech on January 19, 2011, 09:42:45 AM
I will admit to still getting myself accustomed to this new strategy, but a very good buddy of mine has been telling me that it's now the only way to achieve FCC B in modern computer systems or even embedded systems, which he works on.

One interesting read is:
http://www.automation.siemens.com/do.../emv_r.pdf?p=1

chapter 6 I believe.

The old problem with grounding both ends was that if you didn't correctly tie earth ground to the frame of the enclosure, and have a proper star ground inside the frame, then you would get a current in the shield due to unequal potential between the two ground points.  The new advice is to make sure you do tie the frames to good earth ground, so that there is no possibility of current flow through the shields.

While "earth" and "ground" are different, the advice is to make sure they are at the same potential everywhere.  If you do, you don't have to treat them as separate.
Title: Re: Wiring Limit & Home Switch
Post by: 7654321 on January 19, 2011, 11:57:53 AM
Hi hope its ok to break in to this thread? I have simple HCNC using 2 limit switches each on x,y,x cause there is much noise that is activating the switches. I got RS 2 conductor 24ga shielded cable and want to wire them properly. How to utilize the two wires in the cable?
Thanks
Title: Re: Wiring Limit & Home Switch
Post by: 7654321 on January 19, 2011, 01:41:51 PM
Am using a SS
Title: Re: Wiring Limit & Home Switch
Post by: brtech on January 19, 2011, 02:10:38 PM
How many inputs will you use.  Let's assume 3, one each for X, Y and Z.

Wire the "far" end to the two wires.  Wire the "near end" by breaking into the outer cable, grab one of the wires, cut it, and attach the two cut ends to the switch.  Doesn't matter which wire.  This is for a Normally Closed (NC) switch.  At the SS, wire one side of each of the 3 cables to ground, and the other wire to the SS input.
Title: Re: Wiring Limit & Home Switch
Post by: Hood on January 19, 2011, 02:11:32 PM
Check out the noise thread on the SS part of the forum and see if your SS has the resistor and capacitor.
Hood
Title: Re: Wiring Limit & Home Switch
Post by: 7654321 on January 21, 2011, 09:52:31 AM
Do you have a diagram of wiring the 6 limit switches using shielded cable with 2 conductors w one end grounded thanks
Title: Re: Wiring Limit & Home Switch
Post by: brtech on January 21, 2011, 10:03:52 AM
How many inputs will you use?  1 or 3?
Title: Re: Wiring Limit & Home Switch
Post by: 7654321 on January 21, 2011, 10:06:59 AM
all in series 2 inputs pin11 and Ground and the shield grounded at AC Green
Title: Re: Wiring Limit & Home Switch
Post by: kolias on February 07, 2011, 08:41:48 PM
ok all my Limit / Home Switches are installed and I have 4 cables coming into my control station as per schematic on page one of this thread. I also have the 4 cables from my 4 motors and therefore I have a total of 8 cables coming into my control station and each cable has a shield.

My question is: do I connect all shields together from all 8 cables and go to the ground or only the shields from the motors or only the shields from the Limit / Home switches.

Thanks
Title: Re: Wiring Limit & Home Switch
Post by: brtech on February 07, 2011, 09:47:56 PM
All 8 shields go to ground
Title: Re: Wiring Limit & Home Switch
Post by: kolias on February 07, 2011, 10:17:20 PM
Sounds good my friend, thanks
Title: Re: Wiring Limit & Home Switch
Post by: kolias on February 08, 2011, 04:23:30 PM
I finish all wiring and connected all shields to the ground. I have configured the input pins as per attached pictures and it was very impressive for me to see the Y / A axes squaring by Mach3. First it hit the limit on the A and then the Y advance by about 1/8” and it stopped.

However the X and Z did not go to the home position. Perhaps I should change the minus limit switch on the X and Z to Home and put 0 on the minus?

Another question I have is how Mach knows how big my table is? I have input in the Homing Limits screen the Soft Max / Min but lets say if all axes are in the middle of the table and I hit the Ref All Home button Mach will move all axes to the minus direction until it hits the limit switch on each one but that doesn’t mean Mach knows the table size. So what is the purpose of inputting the table size on the Homing Limits screen?
Title: Re: Wiring Limit & Home Switch
Post by: Hood on February 08, 2011, 04:59:25 PM
You do not have X and Z home switches set up so they will not home ;) All that will happen is Mach will set machine zero for X and Z in the position they are sitting at when you press the Ref All button.

When you reference the machine that sets the machine zero coordinates and because of that Mach knows you are at the machine zero position and thus knows the size of table due to the numbers you have entered into Homing and limits.

If your home is at a position other than X and Y fully negative and Z fully positive then you will need to enter a Home off value so that Mach knows how far it is away from machine zero when homed.
Hood
Title: Re: Wiring Limit & Home Switch
Post by: kolias on February 08, 2011, 06:31:18 PM
Very good Hood, thanks
Title: Re: Wiring Limit & Home Switch
Post by: kolias on February 09, 2011, 07:45:53 AM
I don’t really understand the Homing of the Z axis

I’m reading the .PDF document from RICH “Homing a Mill without Limit Switches”

On this document the Z=0 is 0.25” and Z= minus 2.5” I will assume this is when the head is plunged 2.5” below the table surface. On the Homing / Limits screen he has for the Z axis Soft Max = 0.00 and Soft Min = -2.25

Assuming that I will use the same numbers as above, when I hit the button “Ref All Home” will the Z axis move to -2.25” or 0.25” ?

And why?
Title: Re: Wiring Limit & Home Switch
Post by: Tweakie.CNC on February 09, 2011, 08:14:48 AM
Quote
Assuming that I will use the same numbers as above, when I hit the button “Ref All Home” will the Z axis move to -2.25” or 0.25” ?

And why?

That Sir is an absolutely brilliant question of which I have no idea of the answer without actually trying it. I am concerned about the Z= minus 2.5 part though, is that correct ?

Tweakie.
Title: Re: Wiring Limit & Home Switch
Post by: kolias on February 09, 2011, 08:23:48 AM
Here is the document I try to follow

http://www.machsupport.com/forum/index.php/topic,11409.0.html

Title: Re: Wiring Limit & Home Switch
Post by: Hood on February 09, 2011, 08:46:24 AM
Do you have a Z Home switch? If yes then you wont be screwing about with Homing without Home switches ;)
If you dont then the axis will not move when you do a RefAll.
Not read the doc but if you want to home without switches you need to manually move the axis to a known position before you press the Ref All.
Hood
Title: Re: Wiring Limit & Home Switch
Post by: kolias on February 09, 2011, 12:03:42 PM
Sorry Hood, my mistake

I do have two limit switches on the Z axis but they both share the same pin number on the BOB and so I cant consider one of them as a Home switch

Thank you
Title: Re: Wiring Limit & Home Switch
Post by: Hood on February 09, 2011, 12:12:00 PM
You can use one as a home switch :) Just set the Z home to same port and pin as the Z Limits use.
Hood
Title: Re: Wiring Limit & Home Switch
Post by: Tweakie.CNC on February 09, 2011, 12:16:18 PM
You can use your limit switch as a home switch because when set-up the axis will only home in the one direction.

Tweakie.

(In answer to your earlier question re soft limits - the axis would home to the 0.25" position because that is the figure Rich specified in his setup).
Title: Re: Wiring Limit & Home Switch
Post by: kolias on February 09, 2011, 01:05:25 PM
You can use one as a home switch :) Just set the Z home to same port and pin as the Z Limits use.
Hood

 I did this but the axis moves in the plus direction when I hit the Home button. I switched on the Active Low but then I get a message that one limit is one and I have to press reset

The keyboard arrows move the axis correctly.

How can I get the axis to Home in the negative direction?
Title: Re: Wiring Limit & Home Switch
Post by: Hood on February 09, 2011, 01:36:47 PM
The Z should move in the positive direction when you home, ie up the way. Homing down the way is not a good thing to do as it would cause problems with the spindle fouling clamps. work pieces or even the table.
Hood
Title: Re: Wiring Limit & Home Switch
Post by: kolias on February 09, 2011, 07:21:13 PM
The Y and Z axis are Homing ok now but the X axis was Homing in the wrong direction

So I went to the Motor Home/Soft Limits and un ticked the Home Negative like the Z axis

I wonder why the X axis was Homing in the wrong direction

Also on the same screen I have set the Slow Zone to 2.00 and the Speed % to 20. I understand that the Slow Zone means when the axis approaches the 2.00 the speed will be reduced to 20% until she hits Home. But this does not happen, no matter where the axes are when I Ref Home they start moving to Home at the 20% speed. What I do wrong?


Title: Re: Wiring Limit & Home Switch
Post by: ger21 on February 09, 2011, 07:41:12 PM
Slow zone is for soft limits, not homing.