585,931 active members*
5,275 visitors online*
Register for free
Login
Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2015
    Posts
    9

    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?

  2. #2
    Join Date
    May 2006
    Posts
    4045

    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
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Dec 2003
    Posts
    24221

    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
    Join Date
    Dec 2015
    Posts
    9

    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]

  5. #5
    Join Date
    May 2006
    Posts
    4045

    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:

    Attachment 384314

    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
    TK
    http://dynomotion.com

  6. #6
    Join Date
    Jan 2013
    Posts
    73
    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
    Join Date
    May 2006
    Posts
    4045

    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;
    TK
    http://dynomotion.com

Similar Threads

  1. G540 Limit Switch issue, no Limit Switches fitted!
    By Imagineering in forum Gecko Drives
    Replies: 0
    Last Post: 09-22-2017, 08:21 AM
  2. Replies: 3
    Last Post: 11-05-2013, 02:54 AM
  3. E-Stop,Limit Switches - Car door open switches ?
    By TrickyCNC in forum DIY CNC Router Table Machines
    Replies: 14
    Last Post: 04-19-2012, 09:55 PM
  4. limit switch override
    By swarfmacdaddy in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 5
    Last Post: 12-12-2004, 10:47 AM
  5. The relationship of limit switches to home switches.
    By MikeAber in forum CNC Machine Related Electronics
    Replies: 4
    Last Post: 11-04-2004, 08:28 PM

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
  •