Homing using limit and encoder index pulse?


Results 1 to 4 of 4

Thread: Homing using limit and encoder index pulse?

  1. #1
    Member
    Join Date
    May 2013
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default Homing using limit and encoder index pulse?

    Hi,

    Does anyone have any sample code showing how to use the limit switchs and encoder index pulse to generate an accurate home position?

    Currently I have my limit switches set to kill drive I assume I need to change them to Dissalow drive into limit so I can run them to the limit then back off slowly until I see the encoder index pulse?

    Cheers

    Chris

    Similar Threads:


  2. #2
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default

    Hi Chris,

    To home to an index is pretty basic. It just involves an extra step after detecting the Limit to continue (or reverse) and wait for the index input.

    I've attached a parameterized function that should do this. Add the function to your home.c program and call it specifying all the listed parameters.

    HTH
    Regards

    Attached Files Attached Files
    Regards
    TK http://dynomotion.com


  3. #3
    Member
    Join Date
    May 2013
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default

    Hi Tom,

    So
    axis = 0 for x, 1 for y, 2 for z etc (if channel 0 is x axis etc)
    speed = is in encoder counts per second? (encoder for position feedback)
    dir = +1 or -1?
    bit = 136 for first opto in? (do I remove the ! if my limits are active low?)
    indexspeed = is in encoder counts per second? (encoder for position feedback)
    indexbit = how do i reference this when it is connected to JP2 CHA_DIFFPLUS_4 etc?
    Polarity = I dont see this used?
    offset = is in encoder counts?

    Cheers

    Chris



  4. #4
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default

    Hi Chris,

    axis = 0 for x, 1 for y, 2 for z etc (if channel 0 is x axis etc)
    yes

    speed = is in encoder counts per second? (encoder for position feedback)
    yes

    dir = +1 or -1?
    yes

    bit = 136 for first opto in? (do I remove the ! if my limits are active low?)
    yes, depends how it is wired

    with the ! it reads "wait while bit is not true"
    without the ! it reads "wait while bit is true"

    try both ways

    indexspeed = is in encoder counts per second? (encoder for position feedback)
    yes

    indexbit = how do i reference this when it is connected to JP2 CHA_DIFFPLUS_4 etc?
    IO bit 36...43

    Polarity = I don't see this used?
    oops, see new attachment

    offset = is in encoder counts?
    yes

    HTH
    Regards

    Attached Files Attached Files
    Regards
    TK http://dynomotion.com


Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Homing using limit and encoder index pulse?

Homing using limit and encoder index pulse?