Dynamotion > Mach3 Defining Axes - Page 2


Page 2 of 3 FirstFirst 123 LastLast
Results 13 to 24 of 31

Thread: Dynamotion > Mach3 Defining Axes

  1. #13
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: Dynamotion > Mach3 Defining Axes

    Yes, I'm using Step/Dir.



  2. #14
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    254
    Downloads
    0
    Uploads
    0

    Default Re: Dynamotion > Mach3 Defining Axes

    What drives are you using?

    If they're set to take CW/CCW, then what you're seeing would be normal if you fed them Step/Dir signals, however it could be a connection issue if they are meant to take Step/Dir.
    Knowing what drives you are using, will help us guide you to the problem.



  3. #15
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    254
    Downloads
    0
    Uploads
    0

    Default Re: Dynamotion > Mach3 Defining Axes

    Just found your other thread, and it's the ClearPath SD drives/motors.

    Have you got a multimeter?
    With everything connected and powered up (be careful not to short anything out when probing!)

    First up, double check you have 5V at the clearpath + terminals - should be pins 2,3&4, according to the diagram in your post at http://www.cnczone.com/forums/dynomo...ml#post2025792

    Next pick an axis, jog it one direction. Measure the voltage at the Dir pin/wire at the drive/motor. Then jog the opposite direction, and re-measure the voltage. The voltage should change from around 5V, to near 0V. If it doesn't change, measure again as near as you can get to the KFlop.



  4. #16
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: Dynamotion > Mach3 Defining Axes

    So all Axis move both directions when commanded by Kflop console. It's something in the C file between Kflop and MACH3.

    Thanks, for you help All.



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

    Default Re: Dynamotion > Mach3 Defining Axes

    You might post your Mach3 XML file and Initialization C file for us to check (add .txt extension to upload to cnczone)

    Regards

    TK
    http://dynomotion.com


  6. #18
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: Dynamotion > Mach3 Defining Axes

    Tom,
    So some progress with the axes,
    I have my limit switches on pins 0-7, but they seem to be floating in my Digital I/O screen, and I'm not seeing any C commands setting them at inputs, except in the axes definitions.... Should there be separate commands even though the set axes parameters for the limit switches?

    #include "KMotionDef.h"

    // Defines axis 0, 1, 2 as simple step dir outputs
    // enables them
    // sets them as an xyz coordinate system for GCode

    int main()
    {
    ch0->InputMode=ENCODER_MODE;
    ch0->OutputMode=STEP_DIR_MODE;
    ch0->Vel=40000;
    ch0->Accel=400000;
    ch0->Jerk=4e+006;
    ch0->P=0;
    ch0->I=0.01;
    ch0->D=0;
    ch0->FFAccel=0;
    ch0->FFVel=0;
    ch0->MaxI=200;
    ch0->MaxErr=1e+006;
    ch0->MaxOutput=200;
    ch0->DeadBandGain=1;
    ch0->DeadBandRange=0;
    ch0->InputChan0=0;
    ch0->InputChan1=0;
    ch0->OutputChan0=0;
    ch0->OutputChan1=0;
    ch0->MasterAxis=-1;
    ch0->LimitSwitchOptions=0x100;
    ch0->LimitSwitchNegBit=0;
    ch0->LimitSwitchPosBit=0;
    ch0->SoftLimitPos=1e+009;
    ch0->SoftLimitNeg=-1e+009;
    ch0->InputGain0=1;
    ch0->InputGain1=1;
    ch0->InputOffset0=0;
    ch0->InputOffset1=0;
    ch0->OutputGain=1;
    ch0->OutputOffset=0;
    ch0->SlaveGain=1;
    ch0->BacklashMode=BACKLASH_OFF;
    ch0->BacklashAmount=0;
    ch0->BacklashRate=0;
    ch0->invDistPerCycle=1;
    ch0->Lead=0;
    ch0->MaxFollowingError=1000000000;
    ch0->StepperAmplitude=20;

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

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

    ch0->iir[2].B0=0.000768788;
    ch0->iir[2].B1=0.00153758;
    ch0->iir[2].B2=0.000768788;
    ch0->iir[2].A1=1.92076;
    ch0->iir[2].A2=-0.923833;
    EnableAxisDest(0,0);

    ch1->InputMode=ENCODER_MODE;
    ch1->OutputMode=STEP_DIR_MODE;
    ch1->Vel=40000;
    ch1->Accel=400000;
    ch1->Jerk=4e+006;
    ch1->P=0;
    ch1->I=0.01;
    ch1->D=0;
    ch1->FFAccel=0;
    ch1->FFVel=0;
    ch1->MaxI=200;
    ch1->MaxErr=1e+006;
    ch1->MaxOutput=200;
    ch1->DeadBandGain=1;
    ch1->DeadBandRange=0;
    ch1->InputChan0=1;
    ch1->InputChan1=0;
    ch1->OutputChan0=1;
    ch1->OutputChan1=0;
    ch1->MasterAxis=-1;
    ch1->LimitSwitchOptions=0x100;
    ch1->LimitSwitchNegBit=0;
    ch1->LimitSwitchPosBit=0;
    ch1->SoftLimitPos=1e+009;
    ch1->SoftLimitNeg=-1e+009;
    ch1->InputGain0=1;
    ch1->InputGain1=1;
    ch1->InputOffset0=0;
    ch1->InputOffset1=0;
    ch1->OutputGain=1;
    ch1->OutputOffset=0;
    ch1->SlaveGain=1;
    ch1->BacklashMode=BACKLASH_OFF;
    ch1->BacklashAmount=0;
    ch1->BacklashRate=0;
    ch1->invDistPerCycle=1;
    ch1->Lead=0;
    ch1->MaxFollowingError=1000000000;
    ch1->StepperAmplitude=20;

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

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

    ch1->iir[2].B0=0.000769;
    ch1->iir[2].B1=0.001538;
    ch1->iir[2].B2=0.000769;
    ch1->iir[2].A1=1.92081;
    ch1->iir[2].A2=-0.923885;
    EnableAxisDest(1,0);

    ch2->InputMode=ENCODER_MODE;
    ch2->OutputMode=STEP_DIR_MODE;
    ch2->Vel=40000;
    ch2->Accel=400000;
    ch2->Jerk=4e+006;
    ch2->P=0;
    ch2->I=0.01;
    ch2->D=0;
    ch2->FFAccel=0;
    ch2->FFVel=0;
    ch2->MaxI=200;
    ch2->MaxErr=1e+006;
    ch2->MaxOutput=200;
    ch2->DeadBandGain=1;
    ch2->DeadBandRange=0;
    ch2->InputChan0=2;
    ch2->InputChan1=0;
    ch2->OutputChan0=2;
    ch2->OutputChan1=0;
    ch2->MasterAxis=-1;
    ch2->LimitSwitchOptions=0x100;
    ch2->LimitSwitchNegBit=0;
    ch2->LimitSwitchPosBit=0;
    ch2->SoftLimitPos=1e+009;
    ch2->SoftLimitNeg=-1e+009;
    ch2->InputGain0=1;
    ch2->InputGain1=1;
    ch2->InputOffset0=0;
    ch2->InputOffset1=0;
    ch2->OutputGain=1;
    ch2->OutputOffset=0;
    ch2->SlaveGain=1;
    ch2->BacklashMode=BACKLASH_OFF;
    ch2->BacklashAmount=0;
    ch2->BacklashRate=0;
    ch2->invDistPerCycle=1;
    ch2->Lead=0;
    ch2->MaxFollowingError=1000000000;
    ch2->StepperAmplitude=20;

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

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

    ch2->iir[2].B0=0.000769;
    ch2->iir[2].B1=0.001538;
    ch2->iir[2].B2=0.000769;
    ch2->iir[2].A1=1.92081;
    ch2->iir[2].A2=-0.923885;
    EnableAxisDest(2,0);

    ch3->InputMode=ENCODER_MODE;
    ch3->OutputMode=STEP_DIR_MODE;
    ch3->Vel=40000;
    ch3->Accel=400000;
    ch3->Jerk=4e+006;
    ch3->P=0;
    ch3->I=0.01;
    ch3->D=0;
    ch3->FFAccel=0;
    ch3->FFVel=0;
    ch3->MaxI=200;
    ch3->MaxErr=1e+006;
    ch3->MaxOutput=200;
    ch3->DeadBandGain=1;
    ch3->DeadBandRange=0;
    ch3->InputChan0=3;
    ch3->InputChan1=0;
    ch3->OutputChan0=3;
    ch3->OutputChan1=0;
    ch3->MasterAxis=-1;
    ch3->LimitSwitchOptions=0x100;
    ch3->LimitSwitchNegBit=0;
    ch3->LimitSwitchPosBit=0;
    ch3->SoftLimitPos=1e+009;
    ch3->SoftLimitNeg=-1e+009;
    ch3->InputGain0=1;
    ch3->InputGain1=1;
    ch3->InputOffset0=0;
    ch3->InputOffset1=0;
    ch3->OutputGain=1;
    ch3->OutputOffset=0;
    ch3->SlaveGain=1;
    ch3->BacklashMode=BACKLASH_OFF;
    ch3->BacklashAmount=0;
    ch3->BacklashRate=0;
    ch3->invDistPerCycle=1;
    ch3->Lead=0;
    ch3->MaxFollowingError=1000000000;
    ch3->StepperAmplitude=20;

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

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

    ch3->iir[2].B0=0.000769;
    ch3->iir[2].B1=0.001538;
    ch3->iir[2].B2=0.000769;
    ch3->iir[2].A1=1.92081;
    ch3->iir[2].A2=-0.923885;
    EnableAxisDest(3,0);

    DefineCS(0,-1,1,2,3,-1);

    return 0;
    }



  7. #19
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: Dynamotion > Mach3 Defining Axes

    Dynamotion > Mach3 Defining Axes-20170624_102026-jpg



  8. #20
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2378
    Downloads
    0
    Uploads
    0

    Default Re: Dynamotion > Mach3 Defining Axes

    Hi toolbag33,

    I don't understand what you are asking.


    First get your limits properly interfaced to some inputs and check out hat they are working using the digital IO Screen.

    Regards

    TK
    http://dynomotion.com


  9. #21
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: Dynamotion > Mach3 Defining Axes

    Quote Originally Posted by TomKerekes View Post
    Hi toolbag33,

    I don't understand what you are asking.


    First get your limits properly interfaced to some inputs and check out hat they are working using the digital IO Screen.

    Regards
    So I have J7 pins 0-7 to Normally closed limit switchs, from j7 5v back to the 0-7 pins. And I dont see where the copy to c program sets them as inputs.



  10. #22
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2378
    Downloads
    0
    Uploads
    0

    Default Re: Dynamotion > Mach3 Defining Axes

    Hi toolbag33,

    I assume you meant to say bit numbers and not pins.

    Please avoid switching input pins directly to +5V. Even though it shouldn't cause damage it should be avoided.

    When the switch opens it will leave the pin unconnected and floating so it will be in an indeterminate state. A pull up or down resistor is needed.

    You might consider using the first 8 inputs on JP4 or JP6 which have pull down resistors and switch them to 3.3V

    KFLOP IO default to being inputs. There is no need to configure them as inputs.

    Regards

    TK
    http://dynomotion.com


  11. #23
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: Dynamotion > Mach3 Defining Axes

    Quote Originally Posted by TomKerekes View Post
    Hi toolbag33,

    I assume you meant to say bit numbers and not pins.

    Please avoid switching input pins directly to +5V. Even though it shouldn't cause damage it should be avoided.

    When the switch opens it will leave the pin unconnected and floating so it will be in an indeterminate state. A pull up or down resistor is needed.

    You might consider using the first 8 inputs on JP4 or JP6 which have pull down resistors and switch them to 3.3V

    KFLOP IO default to being inputs. There is no need to configure them as inputs.

    Regards
    Are the inputs on the KFLOP sinking or sourcing?



  12. #24
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2378
    Downloads
    0
    Uploads
    0

    Default Re: Dynamotion > Mach3 Defining Axes

    Hi toolbag33,

    I'm not sure what you mean. Normally outputs are described as being able to sink or source (or both) current. I suppose you mean to say should they be connected to sinking or sourcing outputs?

    KFLOP inputs are very high impedance (many meg ohms) mosfet voltage sensitive inputs. They must be actively driven high (>2.0V) and actively driven low (<0.4V).

    That is why a pull down or pull up resistor is required when interfacing with a simple switch. Otherwise when the switch is open nothing will be actively driving the input and the pin may float to any random voltage depending on parasitic capacitance to other signals or leakage currents.

    HTH
    Regards

    TK
    http://dynomotion.com


Page 2 of 3 FirstFirst 123 LastLast

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

Dynamotion &gt; Mach3 Defining Axes
Dynamotion &gt; Mach3 Defining Axes