586,395 active members*
2,734 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > Kflop. Spindle VFD digital control by pulse train
Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2004
    Posts
    22

    Red face Kflop. Spindle VFD digital control by pulse train

    Hello.

    I have a Yaskawa V7 VFD, and I want to use for the spindle motor control for my Bostomatic CNC Mill retrofit.
    I already have it wired and it works great, but the speed is controlled manually using the front panel pot.
    But now I want to control it within the software using Kflop.
    This drive has a lot of options to control, acording to the manual this are the options:
    Attachment 238104

    I know a easy and quick way to control is using 0-10v using Kanalog and a DAC output.
    I already bought a Kanalog, but using it only for the speed control of the spindle is too much.
    So that is why I want to control the VFD using the "Pulse train command control input (option 5 acording to the manual)"
    I read all the manual and I could not find to much information about this option.
    This is what I think is all the relevant information about this control option.
    Attachment 238106
    According with this information and my basic knowledge of electronics, I can't figure if this "pusle train" is compatible and the Kflop is capable of handling that kind of signal.

    So, my questions are:
    The Kflop can generate a signal compatible with this pulse train input of the VFD?.
    According with the characteristics of this pulse train, do you think this is a PWM signal or maybe is more like a Step-Dir pulse train?

    Any help would be greatly apreciated. Thank you very much in advance.

    By the way, this is the Product Webpage and it have all the manuals, just in case you can find something else which can be helpful.
    V7 Drive
    Before you can make it, you need dream it!!!

  2. #2
    Join Date
    Feb 2007
    Posts
    17

    Re: Kflop. Spindle VFD digital control by pulse train

    Quote Originally Posted by Yepez View Post
    Hello.

    I have a Yaskawa V7 VFD, and I want to use for the spindle motor control for my Bostomatic CNC Mill retrofit.
    I already have it wired and it works great, but the speed is controlled manually using the front panel pot.
    But now I want to control it within the software using Kflop.
    This drive has a lot of options to control, acording to the manual this are the options:
    Attachment 238104

    I know a easy and quick way to control is using 0-10v using Kanalog and a DAC output.
    I already bought a Kanalog, but using it only for the speed control of the spindle is too much.
    So that is why I want to control the VFD using the "Pulse train command control input (option 5 acording to the manual)"
    I read all the manual and I could not find to much information about this option.
    This is what I think is all the relevant information about this control option.
    Attachment 238106
    According with this information and my basic knowledge of electronics, I can't figure if this "pusle train" is compatible and the Kflop is capable of handling that kind of signal.

    So, my questions are:
    The Kflop can generate a signal compatible with this pulse train input of the VFD?.
    According with the characteristics of this pulse train, do you think this is a PWM signal or maybe is more like a Step-Dir pulse train?

    Any help would be greatly apreciated. Thank you very much in advance.

    By the way, this is the Product Webpage and it have all the manuals, just in case you can find something else which can be helpful.
    V7 Drive
    A pulse train is the signal a encoder produces for every rpm it moves. Like 1024 pulses per revolution with some encoders. The factory setting is 2500 pulses per revolution
    . Then go to page 99 to learn how to program the parameters i just wrote here.Try going to page 66 of the pdf file manual and set the Noo4 in parameters to setting 5 so Frequency reference is controlled by the Pulse Train Reference terminal RP

  3. #3
    Join Date
    May 2006
    Posts
    4047

    Re: Kflop. Spindle VFD digital control by pulse train

    Hi Yepez,

    I would expect "Pulse Train" to be possible. You would basically connect a KFLOP Step/Dir Generator to the Pulse Train Input. Because they require the Pulse Train to be approximately a square wave shape the standard short step pulses probably would not work. But KFLOP has a A B quadrature output mode that should work well. Add 8+16=24 to the Step/Dir Generator channel number to change to TTL mode and Quadrature. Then just use either of the A or B signals. So for example selecting OutputChan0=27 would output A quadrature on KFLOP JP7 IO6 Pin13. Then for example Jogging the Axis at 120,000 steps/sec will create a 30KHz Pulse Train. See also:
    Step and Direction Setup

    The spec also requires the signal to be at least 3.5V. KFLOP's LVTTL outputs are only guaranteed to be 2.8V. But they are likely to be closer to 3.3V. Adding a pull up resistor (1K ?) to +5V may bring the level to 3.5V. You may want to check with a voltmeter. Otherwise you will need to add a buffer circuit.

    After you have demonstrated that the Spindle is controllable as an axis using Jog commands to the axis then you can use all the standard examples in the SpindleUsingJogs directory. For more info see:
    KMotionCNC Spindle Control

    HTH
    Regards
    TK
    http://dynomotion.com

  4. #4
    Join Date
    Dec 2004
    Posts
    22

    Re: Kflop. Spindle VFD digital control by pulse train

    Thank you cybot and TomKerekes for your kind help.

    Is very good news to know it is possible to control the Spindle in this way.

    The TTL Quadrature signals is exactly how I control the AC ServoDrives (also Yaskawa ) for the 4 axis of the CNC mill, and it has been working flawless for quite long time (more than 2 years).
    I use the Step Generator Chanel 28,29,30,31, for the X,Y,Z,A axis connected to JP5.

    So I am familiar and have some experience on how to configure the Kflop to work in this stepper mode.

    According with your suggestion, I just took the Chanel 31 phase A signal "IO Bit 42" (JP5 pin 7), and connected to the VFD "RP terminal (Pulse train input)" and
    Kflop Ground to " FC terminal (Frequency reference common) ".

    Then I send jog commands through console, and it worked great !!!!
    I set up the VFD for a Max Frequency of 60Hz, so
    Sending command "Jog5=122770" the VFD runs the motor at max speed (60Hz)
    Sending command "Jog5=61385" the VFD runs the motor at half speed (30Hz)
    And everything in between 0 and 122770 is equal to 0Hz to 60Hz

    So I am very happy with the result so far.

    Looking at the signal with the oscilloscope I get the following measurements.

    Attachment 238200

    As you can see, you are correct about the measured signal Voltage, (Vtop = 3.29V).
    Acording to the manual it should be at least 3.5v, and that make me worry about the reliability using the signal as is.

    So I would like to try the pull up resistor to increase the voltage to 3.5v or a little more, but I'm not sure how to make the wiring, would you help me, and tell me if this is correct.

    Click image for larger version. 

Name:	PullUpKflop.jpg 
Views:	4 
Size:	5.0 KB 
ID:	238208

    I don't want to burn something in my Kflop or VFD just making a wrong wiring.

    Thanks in advance.
    Before you can make it, you need dream it!!!

  5. #5
    Join Date
    May 2006
    Posts
    4047

    Re: Kflop. Spindle VFD digital control by pulse train

    Hi Yepez,

    Very good. Nice that you have a scope to look at the signals. Yes your pull up resistor to +5V configuration looks correct. The KFLOP outputs can sink up to 16ma so the smallest resistor to use would be:

    5V/16ma = 313ohms.

    Consider using a 330ohm. Using TTL mode should have faster rise time but will try to hold the output to 3.3V. It looks like a 330ohm pull up should get it slightly over 3.5V. The other option is to use Open-Collector mode (subtract 8 from channel number). This should allow the signal to go as high as about 4V but will have slightly slower rise times. Either should work. See diagram below:

    Attachment 238232

    HTH
    Regards
    TK
    http://dynomotion.com

  6. #6
    Join Date
    Dec 2004
    Posts
    22

    Re: Kflop. Spindle VFD digital control by pulse train

    Hi TomKerekes

    I followed your suggestions, and did make a test circuit with a 330 ohms pull up resistor, and this is the result.
    In TTL mode, the voltage goes up to 3.59v, and in OpenCollector mode is 4.01V.

    Below you can se the result of the signal using the pulse generator in TTL mode, and the result is exactly as you calculated.

    Attachment 238556

    The next image is the signal using Open Collector mode.
    Attachment 238558

    So, Now both signals comply with the specification from the VFD, and this makes me wonder, which mode to choose.
    According with your knowledge, which mode do you recommend to use in this situation, TTL or OpenCollector ?

    And one more question, Where to put the PullUp resistor circuit, near the Kflop output pin, or at the input terminal of the VFD (aprox 10 feet away the Kflop)?

    Thanks in advance.
    Before you can make it, you need dream it!!!

  7. #7
    Join Date
    May 2006
    Posts
    4047

    Re: Kflop. Spindle VFD digital control by pulse train

    Hi Yepez,

    Nice work you are very thorough. I would use Open-Collector for more voltage margin as the rising edges look fine.

    Probably easier and better to put the resistor on KFLOP's end.

    BTW which end did you scope the signal? Sometimes the other end of a long cable can "ring" if it doesn't have some termination. So you might check both ends. The VFD end is what counts (pun intended). In the unlikely event that it does ring badly you might try putting the resistor on that end to see if it makes a difference.

    Regards
    TK
    http://dynomotion.com

  8. #8
    Join Date
    Dec 2004
    Posts
    22

    Re: Kflop. Spindle VFD digital control by pulse train

    Hello TomKerekes,
    Thank you very much for your help, after a busy week with my day job, now I have some time to continue with the CNC Mill.

    About your questions, I put the scope at the VFD end, and the signal looks very nice and stable while the VFD is in off state, but when I send the M3 and the motor start spinning the signal gets very "noisy", but despite the noise, the system responds very well and accurate to the commanded signal from the G-code S command.
    What do you think should I leave it in that way, or put some termination (I don't know what or how to do it) and try to reduce the noise in the signal?

    Best Regards
    Before you can make it, you need dream it!!!

  9. #9
    Join Date
    Dec 2004
    Posts
    22

    Red face Re: Kflop. Spindle VFD digital control by pulse train

    Hello TomKerekes,

    After finishing the permanent wiring and configuration of the Spindle, I would like to move to the next step, and close the control loop of the spindle.

    With respect to the closed loop control of the spindle, I think a "easy" way is to install an encoder, and configure Kflop to use that signal as an input.

    Actually I have similar configuration in my other CNC, using Mach3, but instead of a Quadrature Signal from an Encoder, I use the pulsed signal from a reflective infrared sensor.
    With that signal I get 1 pulse per revolution, and it is assigned to an input of the computer LPT port and Mach3 use that signal to close the loop using PID control.

    But now, instead of Mach3, LPT, and Infrared sensor (tachometer), I want to use KmotionCNC, Kflop and the Pulsed signal from the Monitor Output of the VFD.

    I did read in the manual, that the VFD is capable of output a pulsed signal according to the current value of the frequency output, this is the info about it.
    Attachment 239980

    So, After reading that part I get the scope and watched the signal, and this is what I observed.
    Attachment 239982

    It is a Puled Square Wave from 0-12v.
    The maximum Frequency output to the motor is 60Hz, and configuring the output to be 36x I get 2.16KHz at full speed.

    So, I am wondering if this signal can be used to close the loop of the spindle control, and how configure Kflop to "watch" the instant frequency of the signal and reacts according using PID control.

    I am apologize if I don't express myself clearly, because my english is not good enough.

    Thanks in advance.
    Before you can make it, you need dream it!!!

  10. #10
    Join Date
    May 2006
    Posts
    4047

    Re: Kflop. Spindle VFD digital control by pulse train

    Hi Yepez,

    Here are some ideas:

    #1 - I'm wondering if it really makes sense to "close the loop" if the VFD is already doing this. If you are worried about noise on the pulse stream going to the VFD then I would fix the noise rather than try to compensate for it.

    #2 - KFLOP doesn't have hardware to count a single pulse stream (only A B Quadrature). But you should be able to count those pulses in a KFLOP User Program. If one User thread is running then the User program is guaranteed to execute every 180us. So the high and low pulses of 200+ us should be guaranteed to be detected. You might slow down the pulse rate to allow more than 1 KFLOP User Thread to be running. The User Program could count transitions in the signal and set an Axis position just like a quadrature encoder would (but with lower resolution). Something like:

    Code:
    #include "KMotionDef.h"
    
    #define SIGNAL_BIT 16  // input to count the transitions\
    #define COUNT_AXIS 3   // axis to set the count
    main()
    {
        int Signal,LastState=0;
        for(;;)
        {
            WaitNextTimeSlice();
            Signal=ReadBit(SIGNAL_BIT);  // read the signal
            if (Signal != LastState)	 // changed?
            {
                LastState=Signal;	// Save last state
                chan[COUNT_AXIS].Position++;  // count
            }
        }
    }
    You would need to use a resistor divider or something to convert the signal from 12V to 3.3V.

    #3 - You could probably use a simple circuit to generate a signal delayed by several microseconds that would work as a B phase. You could then connect the two signals directly to KFLOP as if you had a quadrature encoder. To use a resistor and capacitor (RC circuit) to delay a signal something like RC=5us you might use 1K ohm and 0.005uF. Of course both signals would need to be reduced to 3.3V levels.

    HTH
    Regards
    TK
    http://dynomotion.com

Similar Threads

  1. Mach3 + Kflop + VFD = Spindle Speed control?
    By slimneill in forum Dynomotion/Kflop/Kanalog
    Replies: 7
    Last Post: 05-07-2015, 06:22 PM
  2. Kflop spindle PWM control -10 + 10v
    By markder13 in forum Dynomotion/Kflop/Kanalog
    Replies: 8
    Last Post: 06-02-2014, 06:27 PM
  3. control spindle speed by using inverter and pulse train
    By tessen in forum Dynomotion/Kflop/Kanalog
    Replies: 16
    Last Post: 01-18-2014, 10:31 PM
  4. pulse train to vfd, deceleration problem
    By chimpera in forum Mach Software (ArtSoft software)
    Replies: 3
    Last Post: 11-09-2009, 07:55 AM
  5. Spindle RPM control - Do I need an index pulse?
    By Lexx0001 in forum LinuxCNC (formerly EMC2)
    Replies: 8
    Last Post: 03-27-2009, 07:42 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
  •