586,345 active members*
3,417 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > I'm stuck getting my Gecko G540 up and running
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2013
    Posts
    18

    I'm stuck getting my Gecko G540 up and running

    Tom et al,

    My existing gecko G540 + steppers. 10 ustep driver with 1.8' steppers giving 2000 usteps per rev, leadscrew is 1mm per rev.
    Trying to get a minimal config going, simply drive the X-axis, so I do the following:-

    1. Fire up the KFlop
    2. Set up and Download the channel 0 so it becomes enabled

    Code:
    	ch0->InputMode=NO_INPUT_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=8;
    	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;
    3. Power on the gecko, 10kHz watchdog/charge pump is disabled
    4. Confirm I have a green signal and holding torque - yes!
    5. In the Step Response screen I have step at 3s and 1000 size, press Move and I'm getting nothing

    Minimal connector is:

    KFlop powered directly from USB on a desktop machine (not a laptop)

    2 control pins
    IO8, JP7 Pin 15 (axis 0 step) is connected to DB25 pin 2 X-axis step
    IO9, JP7 Pin 16 (axis 0 dir) is connected to DB25 pin 3 X-axis dir

    Pins 25 and 26 are connected to DB25 GND
    DB25 Pins 18-25 are all connected together as GND
    I'm not running any other ground to the connector

    I wondered if some kind soul could confirm this minimal, single axis configuration should work, or am I missing something obvious?

    Many thanks
    - Paul

  2. #2
    Join Date
    Apr 2013
    Posts
    18

    Re: I'm stuck getting my Gecko G540 up and running

    To answer my own question. The simplest configuration is:-


    KFLOP JP7 Pin Gecko G540 DB25 Pin
    15 (IO8) 2 X-Axis Step
    16 (IO9) 3 X-Axis Dir
    17 (IO10) 4 Y-Axis Step
    18 (IO11) 5 Y-Axis Dir
    19 (IO12) 6 Z-Axis Step
    20 (IO13) 7 Z-Axis Dir
    21 (IO14) 9 A-Axis Step
    22 (IO15) 9 A-Axis Dir
    25 (GND) 24
    26 (GND) 25

  3. #3
    Join Date
    Apr 2013
    Posts
    18

    Re: I'm stuck getting my Gecko G540 up and running

    Just in case anyone is curious as to the configuration, here it is, slightly generified so that you can change the main params for all 4 axes. On my mill with all the same Nema 23 steppers and identical lead screws this makes sense, although its quite scary to watch Z rapidly plunge at full speed.

    Code:
    #include "KMotionDef.h"
    
    // Defines axis 0, 1, 2 as simple step dir outputs
    // enables them
    // sets them as an xyz coordinate system for GCode
    
    const int X=0, Y=1, Z=2, A=3;
    const double VEL=88000;
    const double ACCEL=160000;
    const double JERK=4e+006;
    const double PIDP=0, PIDI=0.01, PIDD=0;
    
    int main() {
    	FPGA(STEP_PULSE_LENGTH_ADD)=32+0x80;
    
    	ch0->InputMode=NO_INPUT_MODE;
    	ch0->OutputMode=STEP_DIR_MODE;
    	ch0->Vel=VEL;
    	ch0->Accel=ACCEL;
    	ch0->Jerk=JERK;
    	ch0->P=PIDP;
    	ch0->I=PIDI;
    	ch0->D=PIDD;
    	ch0->OutputChan0=X+8;
    	ch0->LimitSwitchOptions=0x100;
    	ch0->LimitSwitchNegBit=0;
    	ch0->LimitSwitchPosBit=0;
    	ch0->SoftLimitPos=1e+009;
    	ch0->SoftLimitNeg=-1e+009;
    	ch0->BacklashMode=BACKLASH_OFF;
    	ch0->BacklashAmount=0;
    	ch0->BacklashRate=0;
     
     	ch1->InputMode=NO_INPUT_MODE;
    	ch1->OutputMode=STEP_DIR_MODE;
    	ch1->Vel=VEL;
    	ch1->Accel=ACCEL;
    	ch1->Jerk=JERK;
    	ch1->P=PIDP;
    	ch1->I=PIDI;
    	ch1->D=PIDD;
    	ch1->OutputChan0=Y+8;
    	ch1->LimitSwitchOptions=0x100;
    	ch1->LimitSwitchNegBit=0;
    	ch1->LimitSwitchPosBit=0;
    	ch1->SoftLimitPos=1e+009;
    	ch1->SoftLimitNeg=-1e+009;
    	ch1->BacklashMode=BACKLASH_OFF;
    	ch1->BacklashAmount=0;
    	ch1->BacklashRate=0;
    
    	ch2->InputMode=NO_INPUT_MODE;
    	ch2->OutputMode=STEP_DIR_MODE;
    	ch2->Vel=VEL;
    	ch2->Accel=ACCEL;
    	ch2->Jerk=JERK;
    	ch2->P=PIDP;
    	ch2->I=PIDI;
    	ch2->D=PIDD;
    	ch2->OutputChan0=Z+8;
    	ch2->LimitSwitchOptions=0x100;
    	ch2->LimitSwitchNegBit=0;
    	ch2->LimitSwitchPosBit=0;
    	ch2->SoftLimitPos=1e+009;
    	ch2->SoftLimitNeg=-1e+009;
    	ch2->BacklashMode=BACKLASH_OFF;
    	ch2->BacklashAmount=0;
    	ch2->BacklashRate=0;
    
    	ch3->InputMode=NO_INPUT_MODE;
    	ch3->OutputMode=STEP_DIR_MODE;
    	ch3->Vel=VEL;
    	ch3->Accel=ACCEL;
    	ch3->Jerk=JERK;
    	ch3->P=PIDP;
    	ch3->I=PIDI;
    	ch3->D=PIDD;
    	ch3->OutputChan0=A+8;
    	ch3->LimitSwitchOptions=0x100;
    	ch3->LimitSwitchNegBit=0;
    	ch3->LimitSwitchPosBit=0;
    	ch3->SoftLimitPos=1e+009;
    	ch3->SoftLimitNeg=-1e+009;
    	ch3->BacklashMode=BACKLASH_OFF;
    	ch3->BacklashAmount=0;
    	ch3->BacklashRate=0;
    
    
        EnableAxisDest(X,0);
        EnableAxisDest(Y,0);
    	EnableAxisDest(Z,0);
    	EnableAxisDest(A,0);
    
    	DefineCoordSystem(X,Y,Z,A);
    
    	printf("4 Axis init done!\n");
    
        return 0;
    }

  4. #4
    Join Date
    May 2006
    Posts
    4046

    Re: I'm stuck getting my Gecko G540 up and running

    Hi Paul,

    Sounds like you got things moving. Thanks for the parallel port to KFLOP wire list.

    When moving from the Step Response Screen the settings in the screens must be set properly for your system. You can normally Import the settings from a C Program using the "Import" button on the Config program. However if you use variables instead of constants that will not work.

    Regards
    TK
    http://dynomotion.com

  5. #5
    Join Date
    Apr 2013
    Posts
    18

    Re: I'm stuck getting my Gecko G540 up and running

    Thanks Tom, Yes I'm basically up and running, it's all fine tuning from here on in. The performance of my machine is amazing compared to running off XP/Mach3/Parallel port. The motors stall much earlier than the spec sheets show, my scope shows my poorly rigged up cable has noise issues. I've just designed some basic circuit boards with the pinout above. Hopefully have those in a week or so. Once I have the basic boards tested I'll add headers for the various Gecko and KFlop pins allowing jumpers or any other use. I'll also post the Eagle CAD/CAM files as open source fairly soon, probably start another thread that is easy to find and reference all the details.

    I did worry about the loading vars from the C code, but I actually find it as convenient to just run the code and then upload the vars directly from the KFlop. The code is also tied to the init button in KMotionCNC.

    I'm not brave (stoopid) enough to trust my test cable to a long running G Code program so will wait for a few more days to get my boards, but a hugely successful few days.

    Thanks for all your help. As many others have said, one of the main deciding factors was the support you give on here.

    - Paul

Similar Threads

  1. Gecko G540 Faults When plasma fires. PLEASE HELP!! I'm running out of time.
    By HIDesigns in forum CNC Plasma / Oxy Fuel Cutting Machines
    Replies: 13
    Last Post: 04-15-2013, 02:03 PM
  2. Gecko G540 Faults while running multiple axes
    By petterman in forum Gecko Drives
    Replies: 0
    Last Post: 02-25-2012, 09:58 AM
  3. Replies: 1
    Last Post: 06-25-2010, 04:13 AM
  4. GECKO G540 - Stuck in "FAULT" mode.. HELP!?!
    By CNC74 in forum Benchtop Machines
    Replies: 5
    Last Post: 02-06-2010, 09:37 AM

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
  •