585,973 active members*
4,151 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > Kflop/Kstep to G0704 KBIC spindle speed control help.
Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2016
    Posts
    13

    Kflop/Kstep to G0704 KBIC spindle speed control help.

    Currently I have connected JP33 Pin 7 to KBIC P3 and JP33 Pin 5 to KBIC P1 on Kstep. Measuring voltage across Pin 5 and 7 I have 11.09V, From Pin 6 to Pin 7 I have 3v instead of 5V. From this point I'm not sure what my next step is.


    #include "KMotionDef.h"
    #include "CorrectAnalogFunction.c"

    #define RefVoltage 11.09f

    main()
    {
    float V=5.0;

    FPGA(KAN_TRIG_REG)=4; // Mux PWM0 to JP7 Pin5 IO 44 for KSTEP
    SetBitDirection(44,1); // define bit as an output
    FPGA(IO_PWMS_PRESCALE) = 46; // divide clock by 46 (1.4 KHz)
    FPGA(IO_PWMS+1) = 1; // Enable

    FPGA(IO_PWMS) = CorrectAnalog(V/RefVoltage); // Set PWM
    }

  2. #2
    Join Date
    Feb 2016
    Posts
    13

    Re: Kflop/Kstep to G0704 KBIC spindle speed control help.

    Do I need to add this C program to get my voltage corrected, or am I missing something else?


    // PWM->Analog Correction

    //

    // assume very non-linear for first few count and linear thereafter

    //

    // Measure output ratio for first 0-7 counts then at 240



    float V[]=

    {

    0.001, // count = 0

    0.031, // count = 1

    0.044, // count = 2

    0.054, // count = 3

    0.062, // count = 4

    0.069, // count = 5

    0.074, // count = 6

    0.079 // count = 7

    };



    float V240=0.970;



    int CorrectAnalog(float v)

    {

    int r;

    float v2=2.0f*v;

    // compare with half way points to determine closest count

    if (v2 < V[1]+V[0]) return 0;

    if (v2 < V[2]+V[1]) return 1;

    if (v2 < V[3]+V[2]) return 2;

    if (v2 < V[4]+V[3]) return 3;

    if (v2 < V[5]+V[4]) return 4;

    if (v2 < V[6]+V[5]) return 5;

    if (v2 < V[7]+V[6]) return 6;



    // must be 7 or higher do linear interpolation



    r = (int)(7.5 + (v-V[7])/(V240-V[7])*(240.0f-7.0f));

    if (r>255) r=255;

    return r;

    }

  3. #3
    Join Date
    May 2006
    Posts
    4045

    Re: Kflop/Kstep to G0704 KBIC spindle speed control help.

    Hi RootbeerFLHX,

    It should be much closer to 5V. I'm not sure what is wrong. Are you sure you measured 11.09V as the supply voltage? That seems very coincidental that it was the exact default value in the file.

    Does it remain 11.09V after running the program?

    Is the output voltage measured with no load or other connections except your meter?

    If you command voltages other than 5V what do you get?

    The #include "CorrectAnalogFunction.c" statement includes the CorrectAnalog() function (code is more readable if you paste it into CODE tags from the cnczone Advanced page).

    Regards
    TK
    http://dynomotion.com

  4. #4
    Join Date
    Feb 2016
    Posts
    13
    Hi Tom.

    The 11.19v on pin 5 and 7 was before the program runs. Checking with the program running it is 4.462v on pin 5 and 7, 3.472v on pin 6 and 7. I changed the RefVoltage to 4.462f, and attached pin 6 to the speed controller, but I'm still only able to get 1248 rpm with a S2500 command.

  5. #5
    Join Date
    Feb 2016
    Posts
    13
    Ok, I'm not sure what I did, but now it's running at 2184 with a S2500, maybe the program needed to be restarted? Anyway, is there a way to fine tune the numbers a little closer?

  6. #6
    Join Date
    May 2006
    Posts
    4045

    Re: Kflop/Kstep to G0704 KBIC spindle speed control help.

    Hi RootbeerFLHX,

    I think you should go back and repeat the previous experiment. KStep only puts a max of a 1Kohm load on the reference voltage from the KBIC drive. The reference voltage out from the drive should remain relatively constant otherwise I suspect things will be very nonlinear. Do you have a specification on the drive?

    Regards
    TK
    http://dynomotion.com

  7. #7
    Join Date
    Feb 2016
    Posts
    13
    Specs on the board are:

    Model: JYMC-220B-II
    Input: 115VAC-50/60 HZ
    Output: 0-90 VDC
    Rated: 13.5 ADC
    Yangzhou Jiayi Mechano-electronics Institiute

  8. #8
    Join Date
    Feb 2016
    Posts
    13
    the original Potentiometer is 4700ohms.

  9. #9
    Join Date
    May 2006
    Posts
    4045

    Re: Kflop/Kstep to G0704 KBIC spindle speed control help.

    Hi RootbeerFLHX,

    Can you find a link to the full manual including the analog Reference output voltage specification and analog input requirements?

    Regards
    TK
    http://dynomotion.com

  10. #10
    Join Date
    Feb 2016
    Posts
    13

    Re: Kflop/Kstep to G0704 KBIC spindle speed control help.

    http://www.kbelectronics.com/manuals/kbic_manual.pdf
    KBIC-125 is very similar to what I have. I have been unable to track down a manual using the other part number.

  11. #11
    Join Date
    Dec 2003
    Posts
    24221

    Re: Kflop/Kstep to G0704 KBIC spindle speed control help.

    That other part number appears to be a totally different drive to the KBIC?
    With the KBIC you should also be using the I1 & I2 terminals to inhibit if reversing etc or stopping by removing motor power, as this resets the drive and allows the drive to use the accel setting to come up to speed.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

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

  12. #12
    Join Date
    Feb 2016
    Posts
    13
    Quote Originally Posted by Al_The_Man View Post
    That other part number appears to be a totally different drive to the KBIC?
    With the KBIC you should also be using the I1 & I2 terminals to inhibit if reversing etc or stopping by removing motor power, as this resets the drive and allows the drive to use the accel setting to come up to speed.
    Al.

    Somewhere else I had read they were a Chinese knockoff of the KBMM or KBIC, but that's a good point about the Inhibit connections that I hadn't thought about.

Similar Threads

  1. KStep Spindle Control Example - UserData[1] array is empty
    By kdoske in forum Dynomotion/Kflop/Kanalog
    Replies: 4
    Last Post: 12-31-2015, 02:13 AM
  2. G0704 KB120 Spindle Speed Control C41 Board
    By tpks in forum Spindles / VFD
    Replies: 0
    Last Post: 08-17-2015, 05:25 PM
  3. Mach3 + Kflop + VFD = Spindle Speed control?
    By slimneill in forum Dynomotion/Kflop/Kanalog
    Replies: 7
    Last Post: 05-07-2015, 06:22 PM
  4. C6 Spindle control for KBIC
    By zerodegreec in forum Benchtop Machines
    Replies: 29
    Last Post: 04-22-2013, 11:02 PM
  5. Spindle Control Inhibit and reversing KBIC
    By zerodegreec in forum Benchtop Machines
    Replies: 5
    Last Post: 02-14-2013, 01:05 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
  •