586,117 active members*
3,606 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 34
  1. #1
    Join Date
    Dec 2007
    Posts
    52

    Home/ Limit switch bounce

    Is there anything in EMC2 that compensated for home and limit switch bounce. I get errors often when trying to home saying that the switch was active before homing once it hits the switch the first time.
    Also, for the limit switches, they always seem to trip when the table is in operation even though the table is nowhere near them. I've used capacitors across the switch and at the connection on the controller but they still falsely trip. I've tried NO and NC with the same results.
    Dan

  2. #2
    Join Date
    Dec 2005
    Posts
    596
    Quote Originally Posted by spokes View Post
    Is there anything in EMC2 that compensated for home and limit switch bounce. I get errors often when trying to home saying that the switch was active before homing once it hits the switch the first time.
    Also, for the limit switches, they always seem to trip when the table is in operation even though the table is nowhere near them. I've used capacitors across the switch and at the connection on the controller but they still falsely trip. I've tried NO and NC with the same results.
    Dan
    Afraid I'm not much help on the first problem, but something has to be tripping your limit switches. How much vibration is present when the table is in operation? What kind of limit switches are you using?

    Mark

  3. #3
    Join Date
    Dec 2005
    Posts
    596
    Ah, just thought of something - on your first problem - are your home/limit switches combined?

    Mark

  4. #4
    Join Date
    Dec 2007
    Posts
    52
    Right now I have the limit switches disabled and am only using home switches. They still bounce and are occasionally difficult to get a good home with them.

  5. #5
    Join Date
    Dec 2005
    Posts
    596
    Quote Originally Posted by spokes View Post
    Right now I have the limit switches disabled and am only using home switches. They still bounce and are occasionally difficult to get a good home with them.
    Are you setting your home right on top of your home switch? If so, do you really need your home on top of the home switch? Can you offset your home position say, maybe .2500" from your home switch?

    Walk me through what is actually happening in your home sequence.

    Mark

  6. #6
    Join Date
    Dec 2007
    Posts
    52
    Right now the home is triggered by the switch going from off to on so I guess it is right on top of the home. Is there an offset setting in EMC2 that I missed? I will get details of the exact error message generated when homing later today.

  7. #7
    Join Date
    Dec 2005
    Posts
    596
    What I meant was what is your homing sequence? Post your ini file segments for homing on each of your axes.

    Here's a good section in the docs that deals specifically with homing, and the variables you can use in each of the homing sections:

    LinuxCNC.org - Homing Configuration

    Look at sections "0.1.3.6 HOME_OFFSET" & "0.1.3.7 HOME" for information on how to set your "home" position.

    Mark

  8. #8
    Join Date
    Dec 2007
    Posts
    52

    Home offset

    I'm showing an offset of 1" on Z which is causing the most trouble. However, when the unit homes it stops right on the switch.
    I'll read up on the document you linked to.
    Thanks
    Attached Files Attached Files

  9. #9
    Join Date
    Nov 2004
    Posts
    260
    Quote Originally Posted by spokes View Post
    I'm showing an offset of 1" on Z which is causing the most trouble. However, when the unit homes it stops right on the switch.
    I'll read up on the document you linked to.
    Thanks
    Just guessing here, Home and home offset are set to 1." on the z-axes.
    If your switch is located all the way up, then 1." would be outside of travel?
    Did you try diffferent Values here for example Home = 0. and Homeoffset=-.25" seams to make sense to me.
    As in hit the switch then back of .25 and call this 0.
    May be worth a Try.
    Good Luck

  10. #10
    Join Date
    Dec 2007
    Posts
    52
    I sent the wrong file by mistake. The offset is 0 currently. I tried it at .125 and .250 but all that did was move the axis by that amount after the homing was completed.
    The error I get when zero fails is "Home switch active before start of latch move"
    I changed the velocity to a lower value and will see how it goes. I still think the switch is bouncing causing the error above. I have some circuits that I will try to filter the bounce and see how that goes.

  11. #11
    Join Date
    Nov 2005
    Posts
    496
    here is EMC's software debounce component:
    DEBOUNCE
    the homing error is intermittent?
    try shielded wire on your limit switches properly grounded.

  12. #12
    Join Date
    Dec 2007
    Posts
    52
    The wire is shielded and grounded as it should be, I think I just have cheap switches. Where do you put the debounce code, do you need to use Classicladder or just add it to the ini file on the home line?

  13. #13
    Join Date
    Nov 2005
    Posts
    496
    You need to add commands to the HAL file.

    loadrt debounce cfg=4 # change the 4 to the number you want
    addf debounce.0 base-thread
    setp debounce.0.delay 200 # this sets the delay 200 iterations of the base thread

    look for pins like:

    net min-x <= parport.0.pin-10-in
    net max-home-x <= parport.0.pin-11-in

    and changed to something like this:

    net debounce.0.0.in deb-min-x <= parport.o.pin-10-in
    net debounce.0.0.out => minx
    net debounce.0.1.in deb-max-home-x <= parport.o.pin-11-in
    net debounce.0.1.out => max-home-x

    hope I got that right.

  14. #14
    Join Date
    Dec 2007
    Posts
    52
    Thanks, I'll let you know how it goes tomorrow.

  15. #15
    Join Date
    Dec 2007
    Posts
    52
    I don't see anything like that in my HAL file. I have attached a copy, this is the correct file this time.
    Attached Files Attached Files

  16. #16
    Join Date
    Nov 2005
    Posts
    496
    Yes it seems with that config no homing or limit switches were selected.
    only probe input was selected.

    either that is the wrong one or you didn't add limit switches in the parport screen

    Chris M

  17. #17
    Join Date
    Dec 2007
    Posts
    52
    I'll upload the right one later today. I have so many iterations of my setup floating around I picked the wrong one again.
    I'll go right to the machine this time.

  18. #18
    Join Date
    Dec 2007
    Posts
    52
    Here is the HAL file taken from my CNC machine. Got the right one this time.
    Attached Files Attached Files

  19. #19
    Join Date
    Nov 2005
    Posts
    496
    Try this one in its place:
    not tested.
    these changes will be erased if you run stepconf again.
    Attached Files Attached Files

  20. #20
    Join Date
    Dec 2007
    Posts
    52
    Thanks Chris, I'll give it a try tomorrow. I know it will be overwritten if I run stepconfig, that's why I have so many saved configs ;-)
    Sure wish I knew as much about EMC as you do.
    Dan

Page 1 of 2 12

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, 06:25 PM
  2. limit switch- home switch
    By normd in forum CamSoft Products
    Replies: 1
    Last Post: 05-17-2008, 12:56 AM
  3. limit switch and home switch setup
    By Runner4404spd in forum CNC Machine Related Electronics
    Replies: 0
    Last Post: 12-15-2005, 02:58 PM
  4. Limit Switch / Home Switch in Software
    By Sanghera in forum CNC Machine Related Electronics
    Replies: 6
    Last Post: 11-02-2004, 12:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •