Question about Soft Limits


Results 1 to 3 of 3

Thread: Question about Soft Limits

  1. #1
    Registered
    Join Date
    Dec 2012
    Location
    USA
    Posts
    34
    Downloads
    0
    Uploads
    0

    Default Question about Soft Limits

    I found an old post regarding soft limits where the code below was used to monitor an axis and set a virtual bit if outside the soft limits.
    It was suggested to use the "Disallow drive into limits" setting to have the axis watch the virtual IO bits for those limits.

    If I already have hard (real) limit switches, and have the "Disallow drive into limits" watching those Input bits, is there any way to also have the axis watching the Soft Limit virtual bits with the "Disallow drive into limits" feature ?

    Can I enter two bit numbers into the "Disallow drive into limits" dialog ?

    Thanks


    #define COUNTS_PER_MM 200.0
    for ( ;; )
    {
    WaitNextTimeSlice();

    if (ch0->Position < 10.0 * COUNTS_PER_MM)
    SetBit(48);
    else
    ClearBit(48);

    if (ch0->Position > 300.0 * COUNTS_PER_MM)
    SetBit(49);
    else
    ClearBit(49);
    }

    Similar Threads:


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

    Default

    Hi czralv,

    No you can't specify multiple limit bits. But I think you could "OR" in the Hard Limit Bit with the Soft Limit Condition. Something like:

    if (ch0->Position < 10.0 * COUNTS_PER_MM || ReadBit(HARD_NEG_LIMIT)
    SetBit(48);
    else
    ClearBit(48);

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  3. #3
    Registered
    Join Date
    Dec 2012
    Location
    USA
    Posts
    34
    Downloads
    0
    Uploads
    0

    Default

    That'll work, thanks so much.



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

Question about Soft Limits

Question about Soft Limits