587,012 active members*
3,626 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2014
    Posts
    27

    Help configuration kflop- snapamp

    hi, I have a controller kflop ​with snapamp and differential encoder, I can not make the move dc servo motor, as I have to configure the controller? I connected the encoder j7 snapamp pin 15 16 17 18, the motor channel 0 greetings dalmazio

  2. #2
    Join Date
    May 2006
    Posts
    4047

    Re: Help configuration kflop- snapamp

    Hi dmoglianesi,

    Yes you must configure KFLOP.

    The Encoder connections you describe will show up as Encoder Input Channel #8 in KFLOP. See here for the SnapAmp Channel number definitions:

    Using SnapAmp

    You might start with the example motor configuration:

    BrushServoMechanism.mot

    Load it with the Load Channel Button on the KMotion.exe Config/Flash Screen. Then change the InputChannel Number to 8.

    Download this configuration (with motor power off) and verify that the encoder Position on the KMotion Axis Screen changes correctly when the encoder moves.

    Regards
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Oct 2014
    Posts
    27

    Re: Help configuration kflop- snapamp

    thanks Tom , now works, dalmazio

  4. #4
    Join Date
    Mar 2015
    Posts
    10

    Re: Help configuration kflop- snapamp

    Hello, I'm in the same situation but the solution provided by Tom didn't work. I can see the position changes though. I'm using a rotary encoder.

    From what I've read in the help section, the output signal for a DC Brushed servo is PWM so I have to use I/O26-33, right? For output channel 8, must I use I/O 26? I'm using that pin and the motor doesn't start.

    I'm not using SnapAmp.

  5. #5
    Join Date
    May 2006
    Posts
    4047

    Re: Help configuration kflop- snapamp

    Hi MaxPrezas,

    KFLOP doesn't directly support that type of PWM servo output. To use the KFLOP on-board PWMs you must utilize a small C program. Set the Axis output type as "No Output" and run a C program to write the Servo Output to the PWM in a format necessary for your drive type (Sign and Magnitude, antiphase, etc...) See the OutputToPWM3axis.c example:


    Code:
    #include "KMotionDef.h"
    
    main()
    {
        SetBitDirection(26,1);  		// Set bit 26 (PWM 0 as an output)
        SetBitDirection(27,1);  		// Set bit 27 (PWM 1 as an output)
        SetBitDirection(28,1);  		// Set bit 28 (PWM 2 as an output)
        FPGA(IO_PWMS_PRESCALE) = 1;  	// set pwm period to 30 KHz
        FPGA(IO_PWMS+1) = 1;			// enable the PWM0
        FPGA(IO_PWMS+3) = 1;			// enable the PWM1
        FPGA(IO_PWMS+5) = 1;			// enable the PWM2
    
        for (;;)  //loop forever
        {
            WaitNextTimeSlice();
            if (ch0->Enable)
                FPGA(IO_PWMS+0) = ch0->Output + 128;  // +128 converts to anti-phase
            else
                FPGA(IO_PWMS+0) = 128;  // whenever not enabled put 50% duty cycle
    
            if (ch1->Enable)
                FPGA(IO_PWMS+2) = ch1->Output + 128;  // +128 converts to anti-phase
            else
                FPGA(IO_PWMS+2) = 128;  // whenever not enabled put 50% duty cycle
    
            if (ch2->Enable)
                FPGA(IO_PWMS+4) = ch2->Output + 128;  // +128 converts to anti-phase
            else
                FPGA(IO_PWMS+4) = 128;  // whenever not enabled put 50% duty cycle
        }
    }
    HTH
    Regards
    TK
    http://dynomotion.com

Similar Threads

  1. Questions about Kmotion (Kflop+SnapAmp)
    By Buruhazard in forum Dynomotion/Kflop/Kanalog
    Replies: 58
    Last Post: 05-26-2017, 06:48 PM
  2. Replies: 158
    Last Post: 12-08-2014, 05:41 PM
  3. Axis stop moving - KFlop - SnapAmp - Mach3
    By PapstDFrisco in forum Dynomotion/Kflop/Kanalog
    Replies: 11
    Last Post: 04-11-2014, 09:56 PM
  4. Problems with configuration tool Kflop
    By Dimecsl in forum Community Club House
    Replies: 1
    Last Post: 01-31-2014, 07:40 PM
  5. KFlop/SnapAmp - BDC Servo Beginning Tuning - Oscillations - Tracking Errors
    By PapstDFrisco in forum Dynomotion/Kflop/Kanalog
    Replies: 9
    Last Post: 04-03-2013, 11:09 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
  •