Page 1 of 3 123 LastLast
Results 1 to 12 of 27

Thread: Limit/Home Switch Question

  1. #1
    Registered
    Join Date
    Feb 2009
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Limit/Home Switch Question

    I'm just now putting the electronics on my DIY 3 axis router (first system, so I've got a lot to learn). Using a G540 with Keling 370 oz motors and EMC2. But I'm confused about the limit switches. The 540 only has 4 inputs, and I have 5 limit switches (1 on z, 2 on y and 2 on x). I've seen suggestions to use one input for two switches, which is simple enough to wire up. But my question is......doesn't the system need to know which switch it has hit? Let's say I wire the X min limit and the Y min limit together, how does the system know which limit switch was hit. Or am I way off base and the system doesn't care?

    I'm using my limit switches to also serve as home switches , so I assume those three should be on separate inputs. So that leaves me one input for my other two limit switches.

    I'm still a newbie according to my post count, but I've been reading and trying to learn from this forum for a couple of months. Lot of good info to be found here.


  2. #2
    Registered Bubba's Avatar
    Join Date
    Mar 2004
    Location
    LaGrange, GA USA
    Posts
    1,494
    Downloads
    0
    Uploads
    0
    JeLC,
    I personally don't use EMC, but I think it would be the same in principle as mine.
    I have a similar situation with the number of switches except I only have one switch on the X axis that will trip in EITHER direction (so you might say it is two switches in you case). My switches are wire NC (normally closed) and in series for the axis's with multiple switches. You want the limit circuit to be NC for safety reasons. The main one being that if you have a wire failure, the machine will stop as it will detect a limit trip. If you wire NO (Normal Open), you will not know about a wire failure until you crash something!

    Ok, that takes care of the Limit switch problem. Now for using them as home switches. You only have to be careful in this situation that an axis switch is NOT tripped in the wrong position. To explain, if you normally home to the X - position and if the X + switch is tripped, the table will move in the wrong direction! Otherwise, things operate normally. So far in my setup, I have not had this situation occur.
    To answer your question on if two axis trip at the same time, the controller doesn't care and usually a visual check of the spindle location will tell which axis is tripped. The only time I have had a problem with this is on occasion I would get a "false" trip for some unknown reason. I think this may be due to noise on the system or a possible "feature" in my control program.

    Hope this helps.
    Art
    AKA Country Bubba (Older Than Dirt)


  3. #3
    Registered
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    487
    Downloads
    0
    Uploads
    0
    The limit/home switches need to be connected to EMC. Does the gecko drive need to have limit switches connected to work?
    By connecting multiple limit switches together makes it so EMC can't know what axis/direction tripped - which means it would be up to you to figure it out. Individual switches makes it more obvious whats wrong.
    For homing with shared switches EMC gets around this by homing one axis at a time and assuming that any tripped switch is the right switch.
    On basic machines the limit/home switches are wired through the parallel port.


  4. #4
    Registered Bubba's Avatar
    Join Date
    Mar 2004
    Location
    LaGrange, GA USA
    Posts
    1,494
    Downloads
    0
    Uploads
    0
    Gecko's don't have anything to connect to home or limit switches. They will work without them if everything else is properly wired and setup.

    I can usually tell at a quick glance which axis is tripped!
    Art
    AKA Country Bubba (Older Than Dirt)


  • #5
    Registered acondit's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1,778
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by JeLC View Post
    I'm just now putting the electronics on my DIY 3 axis router (first system, so I've got a lot to learn). Using a G540 with Keling 370 oz motors and EMC2. But I'm confused about the limit switches. The 540 only has 4 inputs, and I have 5 limit switches (1 on z, 2 on y and 2 on x). I've seen suggestions to use one input for two switches, which is simple enough to wire up. But my question is......doesn't the system need to know which switch it has hit? Let's say I wire the X min limit and the Y min limit together, how does the system know which limit switch was hit. Or am I way off base and the system doesn't care?

    I'm using my limit switches to also serve as home switches , so I assume those three should be on separate inputs. So that leaves me one input for my other two limit switches.

    I'm still a newbie according to my post count, but I've been reading and trying to learn from this forum for a couple of months. Lot of good info to be found here.

    Combine the two on X to one pin, combine the 2 on Y to another pin and then connect the z to another pin. EMC knows which direction it is traveling when homing so it will use the appropriate switch as home. When acting as limits, it is more important to know which axis has hit a limit than which end of 1 of 2 axii.

    Alan


  • #6
    Registered acondit's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1,778
    Downloads
    0
    Uploads
    0
    In response to your pm, I am posting my config files. You can look at them and see if there is anything that is helpful.

    I have a 9" Z axis travel, but I set my limits to be roughly -9 and +9. Part of the secret is getting the homing correct. I home to the top of the Z and then I set G54 based on the homed values then I use G55 offsets for my "cutting home". So I set Z=0 to be the top surface of whatever I am cutting, X=0 and Y=0 are offset to the "home corner" of the piece that I am working on.

    I use the following code to start virtually every file I create:

    For me X is usually offset 1.000" and Y is offset 0.800".
    #<_mat_depth>=0.500 ( Thickness of Material )
    #<_xorigin>=1.000 ( X axis offset for Coordinate sys 2 )
    #<_yorigin>=0.800 ( Y axis offset for Coordinate sys 2 )
    #<_zorigin>=[#<_mat_depth>-8.410] ( Z axis offset for Coordinate sys 2 This calculation is based on setting up my tool to zero at this position )

    (other variables and subroutines)

    G20 G92.1 G61 G17 G40 G80 ( Set Imp. mode, clear offsets, set exact path, set XY plane, turn off tool radius compensation )
    G90 ( Set absolute mode for motion )
    G64 P.002 ( Set limit for segmemt combining )
    (G43 Z1.000 H[#<_toolnum>]) ( Set tool length offset )
    G10 L2 P1 X0.0 Y0.0 Z0.0 ( Set G54 origin to 0.0 )
    G10 L2 P2 X#<_xorigin> Y#<_yorigin> Z#<_zorigin> ( Set G55 work origin )
    G55 ( Set Coordinate system 2 )

    Alan
    Attached Files Attached Files
    Last edited by acondit; 03-15-2009 at 05:54 PM.


  • #7
    Registered
    Join Date
    Feb 2009
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0
    Just to answer your question from the PM, the sample program was only giving me an error for the z axis when I tried to run it.

    I looked over your configs and noticed you were using negative and positive travel limits. Which I assume would cause you to home in the center of X and Y travel. And I wasn't doing that for any of the axis. I was trying to set everything up starting from 0 and going up, except for my z. I was trying to get home set up at the extreme left corner of my machine, with the z moved up as high as possible. And I may not exactly understand what home is yet. Since I'm going to have to change bits manually, it made sense to home it in a corner with the z as high as possible

    But, I finally got the sample 'emc2 axis' program to work with my stepconf. My table is approximately 40" (x) by 32" (y) by 6" (z). So in the config, I split those number using -20 and 20 for x, -16 and 16 for y, and then -2 and 4 for z. Homing to 0 for all axis. It seems to like those numbers, or I'll say it will at least run the sample "emc2-axis' code now.

    Looking at your ini and hal helped a lot. I'm sure I'll refer to them many more times before this thing is up and running correctly. I'll get there, just going to take a while. Thanks for your assistance.


  • #8
    Registered guru_florida's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Posts
    269
    Downloads
    0
    Uploads
    0
    Welcome to EMC2. I two switches connected for each axis, so I have three imputs. I use them for homing too.

    When you have your homing and limits done you should modify HAL to use a usb joystick (like an xbox controller type) as a jogger. I find it invaluable. I also learned a lot about HAL while setting it up. There is a tutorial on the emc2 website.

    Colin


  • #9
    Registered acondit's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1,778
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by JeLC View Post
    Just to answer your question from the PM, the sample program was only giving me an error for the z axis when I tried to run it.

    I looked over your configs and noticed you were using negative and positive travel limits. Which I assume would cause you to home in the center of X and Y travel. And I wasn't doing that for any of the axis. I was trying to set everything up starting from 0 and going up, except for my z. I was trying to get home set up at the extreme left corner of my machine, with the z moved up as high as possible. And I may not exactly understand what home is yet. Since I'm going to have to change bits manually, it made sense to home it in a corner with the z as high as possible

    But, I finally got the sample 'emc2 axis' program to work with my stepconf. My table is approximately 40" (x) by 32" (y) by 6" (z). So in the config, I split those number using -20 and 20 for x, -16 and 16 for y, and then -2 and 4 for z. Homing to 0 for all axis. It seems to like those numbers, or I'll say it will at least run the sample "emc2-axis' code now.

    Looking at your ini and hal helped a lot. I'm sure I'll refer to them many more times before this thing is up and running correctly. I'll get there, just going to take a while. Thanks for your assistance.
    Actually I have zero set at the end of travel for X, Y, and Z. My X axis is 38.5", my Y axis is 24" and my Z is 9.195". I was having the same problem as you, getting errors in exceeding limits when I had the soft limits set to the actual size of the travels, so I just set the soft limits to plus and minus the actual travel. Once I had physical limit switches, I never went back to try and figure out how to actually set the soft limits.

    Alan


  • #10
    Registered acondit's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1,778
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by guru_florida View Post
    Welcome to EMC2. I two switches connected for each axis, so I have three imputs. I use them for homing too.

    When you have your homing and limits done you should modify HAL to use a usb joystick (like an xbox controller type) as a jogger. I find it invaluable. I also learned a lot about HAL while setting it up. There is a tutorial on the emc2 website.

    Colin
    Colin,

    I set up a USB joystick on my lathe. I don't use it much but it was fun playing with it.

    I am attaching a "custom.hal" that has a working config for a Logitech Attack3 joystick. A couple of the values are shifted around so that the joystick work for X and Z on the lathe rather than X and Y, but that is an easy fix to change back for a router.

    It also has the hookup for my spindle encoder plus stuff that is commented out that I was working on for a charge pump.

    If anyone finds it useful, great.

    Alan
    Attached Files Attached Files


  • #11
    Registered guru_florida's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Posts
    269
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by acondit View Post
    I set up a USB joystick on my lathe. I don't use it much but it was fun playing with it.
    hmm. I suppose it might not be as useful on a lathe maybe. I found the keyboard not great for getting my tool over the "mark" accurately. It mostly jumped around, I would have to set the feed rate way down. With my JS I have a fast and super slow setting. I can dial it to the mark pretty well on fast mode and then fine tune on super-slow-mo. I drill PCBs with small vias, so it's handy.

    That reminds me, I've found a strange behavior in EMC2 where sometimes I let go of the jog key and it keeps going for another second. Which could be beyond my limits! 8| Once this happens, it stays like this. It's like having sticky keys. I have to restart EMC2 to get the keys to be responsive again. I've done the RT tests and I am well above my RT limits. Also, the machine still cuts properly and my joystick never does it. Have you had it happen?


  • #12
    Registered acondit's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1,778
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by guru_florida View Post
    hmm. I suppose it might not be as useful on a lathe maybe. I found the keyboard not great for getting my tool over the "mark" accurately. It mostly jumped around, I would have to set the feed rate way down. With my JS I have a fast and super slow setting. I can dial it to the mark pretty well on fast mode and then fine tune on super-slow-mo. I drill PCBs with small vias, so it's handy.

    That reminds me, I've found a strange behavior in EMC2 where sometimes I let go of the jog key and it keeps going for another second. Which could be beyond my limits! 8| Once this happens, it stays like this. It's like having sticky keys. I have to restart EMC2 to get the keys to be responsive again. I've done the RT tests and I am well above my RT limits. Also, the machine still cuts properly and my joystick never does it. Have you had it happen?
    I find that once I home things, I end up typing gcode commands for most of my 1 off type things.

    Alan


  • Page 1 of 3 123 LastLast

    Similar Threads

    1. Is it possible to use the home switch as the limit switch as well?
      By Darc in forum Mach Software (ArtSoft software)
      Replies: 4
      Last Post: 11-02-2012, 01:25 PM
    2. limit switch- home switch
      By normd in forum CamSoft Products
      Replies: 1
      Last Post: 05-16-2008, 07:56 PM
    3. limit switch and home switch setup
      By Runner4404spd in forum General Electronics Discussion
      Replies: 0
      Last Post: 12-15-2005, 08:58 AM
    4. Limit Switch / Home Switch in Software
      By Sanghera in forum General Electronics Discussion
      Replies: 6
      Last Post: 11-01-2004, 06:58 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.