How do I override the limit switches?


Results 1 to 7 of 7

Thread: How do I override the limit switches?

  1. #1
    Registered
    Join Date
    Dec 2015
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default How do I override the limit switches?

    ]Hello. For my machine you need 10 limit switches.
    For this I wanted to use I/O 26-35.
    Code:
    ch4->LimitSwitchNegBit=32;              //32-00100000
    ch4->LimitSwitchPosBit=33;            //33-00100001
    Does not work. Why?
    I/O 12-13 is working.
    How do I override the limit switches?

    Similar Threads:


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

    Default Re: How do I override the limit switches?

    Hi Lotreck,

    How did you interface the switches?

    How did you configure the Limit Options?

    Take care not to drive any KFLOP IO above 3.8V.

    Did you test to see if the Inputs change on the Digital IO Screen when activated?

    To override Limits set the Limits Options to zero (turn off Watch Limit options). See:
    Configuration Screen

    Regards

    Regards
    TK http://dynomotion.com


  3. #3
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24220
    Downloads
    0
    Uploads
    0

    Default Re: How do I override the limit switches?

    Quote Originally Posted by Lotreck View Post
    ]Hello. For my machine you need 10 limit switches.
    how do I override the limit switches?
    What is the function of the switches? Over travel?
    Why the need to input them all?
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  4. #4
    Registered
    Join Date
    Dec 2015
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default Re: How do I override the limit switches?

    The switch is an inductive sensor connected via an optocoupler board with a pull-up resistor.

    If I use such a connection scheme, then everything works fine.

    [CODE#include "KMotionDef.h"

    main()
    {
    ch4->InputMode=NO_INPUT_MODE;
    ch4->OutputMode=STEP_DIR_MODE;
    ch4->Vel=40000.000000;
    ch4->Accel=400000.000000;
    ch4->Jerk=4000000.000000;
    ch4->P=1;
    ch4->I=0.010000;
    ch4->D=0.000000;
    ch4->FFAccel=0.000000;
    ch4->FFVel=0.000000;
    ch4->MaxI=200.000000;
    ch4->MaxErr=1000000.000000;
    ch4->MaxOutput=200.000000;
    ch4->DeadBandGain=1.000000;
    ch4->DeadBandRange=0.000000;
    ch4->InputChan0=0;
    ch4->InputChan1=0;
    ch4->OutputChan0=4;
    ch4->OutputChan1=0;
    ch4->MasterAxis=-1;
    ch4->LimitSwitchOptions=0xD0C001F; //00001101 00001100 00000000 00011111
    ch4->LimitSwitchNegBit=12; //12-00001100
    ch4->LimitSwitchPosBit=13; //13-00001101
    ch4->InputGain0=1.000000;
    ch4->InputGain1=1.000000;
    ch4->InputOffset0=0.000000;
    ch4->InputOffset1=0.000000;
    ch4->invDistPerCycle=1.000000;
    ch4->Lead=0.000000;
    ch4->MaxFollowingError=1000000000.000000;
    ch4->StepperAmplitude=20.000000;


    ch4->iir[0].B0=1;
    ch4->iir[0].B1=0;
    ch4->iir[0].B2=0;
    ch4->iir[0].A1=0;
    ch4->iir[0].A2=0;


    ch4->iir[1].B0=1;
    ch4->iir[1].B1=0;
    ch4->iir[1].B2=0;
    ch4->iir[1].A2=0;


    ch4->iir[2].B0=1;
    ch4->iir[2].B1=0;
    ch4->iir[2].B2=0;
    ch4->iir[2].A1=0;
    ch4->iir[2].A2=0;
    EnableAxisDest(4,0); //
    DefineCoordSystem(-1,-1,-1,4); //


    return 0;
    }


    ][/CODE]

    And if this, then when you press the move button, the axis is deactivated, the color turns yellow.


    [CODEch4->LimitSwitchOptions=0x2120001F; //00100001 00100000 00000000 00011111ch4->LimitSwitchNegBit=32; //32-00100000
    ch4->LimitSwitchPosBit=33; //33-00100001][/CODE]

    Attached Thumbnails Attached Thumbnails How do I override the limit switches?-222-jpg   How do I override the limit switches?-555-jpg   How do I override the limit switches?-666-jpg  


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

    Default Re: How do I override the limit switches?

    Hi Lotrek,

    Thanks for the clear information.

    The first 8 IO on JP4 and JP6 have 150 ohm pull down resistors. See:
    KFLOP Connectors

    So the 1Kohm pull up resistor to 3.3V will only provide:

    3.3V x 150 / (1000 + 150) = 0.43V

    You could verify this with a voltmeter.

    If the transistor can conduct 16ma you might do something like:

    How do I override the limit switches?-source-png

    But I see your optocoupler board probably connects all the emitters together to the same pin. Is that your design?

    IO34 and IO35 do not have the 150ohm pull down resistors. But they do have a weaker pull down option. It is actually more of a constant current sink of between 0.1 - 0.75ma. Changing the opto coupler resistor to ~3K and connecting it to 5V should work for those 2 inputs.

    Or you could use a Konnect

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  6. #6
    Member
    Join Date
    Jan 2013
    Location
    Canada
    Posts
    73
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by TomKerekes View Post
    Hi Lotreck,

    How did you interface the switches?

    How did you configure the Limit Options?

    Take care not to drive any KFLOP IO above 3.8V.

    Did you test to see if the Inputs change on the Digital IO Screen when activated?

    To override Limits set the Limits Options to zero (turn off Watch Limit options). See:
    Configuration Screen

    Regards
    Hi Tom, what is the best option to disable limit/homing switch watching after the machine is homed? I am getting HF spindle noise and would like to disable the switches when machine is cutting so I dont get interruptions in the middle of the job.



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

    Default Re: How do I override the limit switches?

    Hi Lotrek,

    It would be better to eliminate the noise.

    But to disable limits see my previous post.


    Code:
    ch0->LimitSwitchOptions=0x0;


    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

How do I override the limit switches?

How do I override the limit switches?