584,858 active members*
4,497 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > UCCNC Control Software > Unerstanding the UCCNC PWM settings for VFD/Spindle
Page 1 of 2 12
Results 1 to 20 of 28
  1. #1
    Join Date
    Oct 2015
    Posts
    17

    Unerstanding the UCCNC PWM settings for VFD/Spindle


    Please help me understand how to configure the PWM settings correctly for my VFD/Spindle using UCCNC.
    I've read the docs, but a little extra theory/understanding would help.

    Do I set the “PWM Frequency” setting based my motor’s “basefrequency” or “max frequency” or lowest frequency my spindle is suggested to run. And how does this related to the min/max duty % settings?



    I understand that 1 rpm = 60 HZ... so sending a 200 Hz signal from UCCNC to my BOB to my VFD should have 12,000 rpms.

    I have a .75KW Delta VFD S1 and a .75KW Teknomotor, or at least will have soon from Damen CNC!

    For example is my understanding below correct?
    Based on my spindle specs (Base frequency 200Hz = 12000 RPMand Max 400 Hz = 24000 RPM, the lowest operating is at 100 Hz = 6000RPM). Motor plate pic below.

    UCCNC Settings

    PWM Frequency = 400Hz
    PWM min duty(%) = 50%
    PWM maxduty(%) => 100%

    Then does min duty at 50% translate to 400 Hz?

    g-code S24000 would trigger UCCNC PWM signal spindle to runat 400 Hz? (this is 100% duty?)

    g-code S12000 would trigger UCCNC PWM signal spindle to runat 200 Hz? (this is 50% duty?)

    With this configuration, anything below 200 Hz or less than12000 RPM UCCNC will not let to go lower than that limit and anything over 400Hz 24000 rpm, uccnc will limit it to a max of 24000 rpm.

    I guess I could lower my PWM min duty to 25% since I can runspindle at 6000 rpm.. but 12000 is where it gets peak torque and horse power on the power curve charts.



  2. #2
    Join Date
    Oct 2015
    Posts
    17

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    I was WAY off track on my understanding with the UCCNC PWM Frequency. CNC Drive quickly answered my questions... posted below.


    I'll admit, this is still confusing to me, but certainly points me in the right direction. I truly want to understand this... and not just stick some numbers in the fields and have them work. I'll post any additional answers I get from CNC drive.

    If it helps...my controlling stack is

    UCCNC =>UC400ETH (max 400kHz) => Leadshine MX4660/BOB (0-10v output) => Delta S1 VFD (0-10v analog input)


    Reply from CNC Drive

    The PWM frequency has nothing to do with the base frequency of the motor.
    What the UCCNC output is a PWM signal which is a signal changing between logic 0 and 1 in cycles.
    The length of one cycle is t=1/f, so for example for a 400Hz frequency it is 0.0025seconds.
    The duty cycle means the % of how much part of the cycle the signal is logic 1. The rest of the cycle is logic 0.
    For example a 50% duty cycle means that for half of the cycle the signal is logic 1. and for the rest 50% it is logic 0.

    How your VFD controls your motor is a totally different thing. The VFD inputs the PWM signal from the UCCNC and the VFD understands this signal as the control lead signal,
    usually a breakout board is used which low-pass filters this signal, so the signal will be no more PWM, but an analog signal.
    For example if the signal has 50% duty cycle and it has 0V and 5V logic low and high levels then a 50% duty cycle signal low pass filtered will be a 2.5Volts analog signal.
    Also in breakout boards this signal is often isolated and the amplitude is changed, gained from 0-5Volts to 0-10Volts, however some VFDs has options to accept 0-5V signals also,
    but 0-10V is the more common, the industry standard.
    Also most VFDs themselves low-pass filters the analog input signal, so the PWM coming from the UCCNC is read by the VFD as an analog signal, because the VFD has the low-pas RC filter, so then no need to low-pass filter the signal to get an analog input voltage.
    So, the VFD is setup to accept this signal from the UCCNC and then it controls the motor based on the analog input signal level.
    How the VFD runs the motor can be setup in the VFD with parameters, like with what base frequency the VFD will drive the motor,
    but this PWM has nothing to do with the PWM of the UCCNC, this is a totally different thing!


    And no, the UCCNC does not vary the PWM signal frequency, you setup the frequency of the PWM signal and it will have always that frequncy, with any S words programmed,
    what varies is the duty cycle of the PWM with the different S words.
    The UCCNC scales the min. and max. S range to the min. and max. PWM value range, so the min. S will give the min.PWM duty cycle and the max. S will give the max.PWM duty cycle and the inbetween values will be proportinal in the range.
    The higher than S max. will give the max.PWM duty cycle and the lower the S min. will give the min.PWM duty cycle since these are the set limits.

    In practice what value you set the PWM frequency in the UCCNC only depends on what your breakout board can handle, because if the BOB isolates the signal with optocoupler that has a bandwidth limit,
    so it can't throughput any fast signals, so there is a limit in frequency where the signal will be distort, because the optocoupler can't switch any fast, so it will distort the signal if it is changing too fast.
    So, you want to set the PWM freq. lower than that bandwidth limit. Usually a few hundred Hz works, and mostly tens of kiloHertz not works without distortion most optocouplers.
    Ofcourse there are so called fast optocouplers in the market, but they are expensive and not really used in commercial breakout boards, because they are an overkill and have a higher price than what is nessessary.
    Also if the PWM frequency is set lower means it switching slower, so a longer time constant low-pass filter is required and then the slower the signal will respond to changes.
    For example if the PWM frequency is 0.1Hz only then the signal will switch only once per every 10 seconds, to low pass that properly about 100 seconds time constant filter is required and that is way too slow compared to how fast you want to spin up and spin down your spindle, so you don't want to set the PWM freq. too low either.

    And yes, VFDs mostly need a digital start input for safety (at least it is configurable), so the analog (PWM) input change itself can't start the motor, the M3 relay can be used as the start signal,
    so the motor will only start running if the analog signal is in range for the VFD to start plus it has the active M3 digital input signal.

  3. #3
    Join Date
    Oct 2015
    Posts
    17

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Here's another thread from CNC Drive, they have been great at responding to my questions... so I'll eventually get it.

    I'm certainly a lot further in my understanding from how a program code of S12000 is executed in UCCNC which then is calculated based on the spindle settings, ultimately output to my BOB which then goes to VFD and actually runs the spindle at the right RPM.


    My follow up question/understanding...

    So I get the PWM Frequency isn’t related to the frequency the motor is running at… that’s just for how fast it communicates.

    And I get that the 0-5v which is amplified on my MX4660 BOB to 0-10v so volts between 0-10v to my VFD is what sets the RPM of the sp

    What I didn’t get was how it converted the min duty to max duty and ranges in between to RPM and then converted that to the right volts to my VFD.

    I see now that I have to set that min and max RPM in UCCNC… that’s how it can translate S codes to the right output volts for the VFD.

    I thought that the min/max rpm was just for a setup with pulleys, but I think that to be necessary in all cases.

    For example:
    Min RPM = 12000
    Max RPM = 24000

    S18000 => 5 volts (halfway between 0-10v) to VFD and that will be a 50% duty cycle?


    CNC Drive Response


    Yes, exactly, the UCCNC PWM frequency is just the PWM frequency of the signal which the VFD will receive as the input control signal.
    And the base frequency you were talking about is a VFD parameter, it sets the carrier frequency of the PWM signal which the VFD outputs to the spindle motor.
    And basically the higher the VFD base frequency is the quieter your motor will be, but the more your motor coils and VFD's IGBTs will heat, because they will switch more frequently.
    The 2 PWMs are totally different things, they have no relations at all.

    >Min RPM = 12000
    >Max RPM = 24000

    >S18000 => 5 volts (halfway between 0-10v) to VFD and that will be a 50% duty cycle?

    Yes, correct if the PWM min is 0% and PWM max. is 100%.


    >My MX4660 BOB on Pin 14 transforms the PWM signal from my UC400ETH to an analog signal on my “0-10v out. All the inputs and outputs have a max of 200 kHz so I’m guessing that would be the MAX for my base “PWM Frequency” >in UCCNC setup. But I’m not sure that’s even related to my analog outputs on my BOB.

    That 200kHz frequency limit of the I/Os is again a different thing.
    Note that it is 200kHz, not 200Hz ... it is 200 000 Hz.
    And that is basicly how fast signals the I/Os can accept. If the signal is faster then the optocoupler on the input may distort the signal so much that it does not get through or the internal logic can't read, write signals faster than that, so it may miss faster/shorter signal pulses.

    >What I don’t get is how it translates the S12000 command to the right analog volts so my spindle runs at the desired RPM.

    It probably translates it in a very simple way using a transistor and a resistor and capacitor.
    OK, it is a bit more complicated, but I don't want to describe this all day long, so just the basics now...
    So, the signal drives the base of the transistor and it switches on/off with the PWM which is sent by the UCCNC.
    And the transistor amplifies the signal 2 times, so the 0/5V PWM will become a 0/10V PWM.
    And then they place a resistor and a capacitor there, so this simple RC network will smooth the signal out producing the duty cycle proprtional analog signal, and that's it, you have a 0-10V analog signal which can be input to your VFD.
    If the PWM duty cycle will be 10% will then translate to a 1V analog signal, if it will be 50% will be a 5V signal, a 90% duty cycle will translate to 9V signal and so on.
    The VFD reads this signal and will spin your motor based on this input voltage.

  4. #4
    Join Date
    Apr 2013
    Posts
    1899

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Perhaps everything is clear by now, but I see that nobody tried to clarify this to you, so I make a quick effort. Sorry, but it is not entirely clear to me what you are asking, so if my answer is not the answer to your questions then start over.

    The way I understand is that you have a UC400ETH which you are trying to control the spindle speed with. I made some quick sketches, and the first is showing the connections you must have.

    Attachment 342174

    You need the BOB because the UC400 does not have analog output, so you can not control the spindle speed with 0-10V unless you have a BOB (or a separate 0-10V PWM card) which provides analog output. The 0-10V is generated from a 10VDC which can be created internally from the 5VDC, or through a regulator circuit from a voltage higher than 10V. My BOB creates the 10V from a separate 12VDC input, isolated from the 5VDC used for the rest of the logic. The principle of PWM is really simple. I made a quick sketch which explains the basics.

    Attachment 342176

    A constant square wave frequency is continually sent to the analog voltage generator circuit, the one which generates the 0-10V necessary for the VFD. Call this the PWM frequency. This frequency has a duty cycle which controls the voltage output. The duty cycle can be anything between 0% and 100%, and since the actual PWM voltage is 10V, it is easy to calculate the output voltage if you know the duty cycle, 50% means 5V out, 25% means 2.5V out and so on.

    The PWM frequency is generated by the UC400. This is set up in the UCCNC software. I am not at the right place right now, and can't help with the details but it is in the Configuration menu, Spindle tab, if I am not wrong. Anyway, 1000Hz is a good value, but if you prefer something else, you can use that as well. Don't confuse this frequency with the frequency sent from the VFD to the spindle, we can leave that out for now. The PWM frequency here is only to generate a 0-10VDC analog signal. This voltage can be connected to anything, not just a VFD. In theory, you can control the intensity of a light bulb with it as well. For test and veryfication, it is best to connect the BOB analog output to a multimeter. Verify that the output voltage is what it supposed to be when you give an S command.

    Set up UCCNC so that the spindle is set to minimum rpm 0 and maximum rpm to 24,000. Ignore the spindle minimum rpm value right now. That rpm is just for the actual spindle running condition, has nothing to do with the PWM for now. Just test that the multi meter shows approximately right values (you will probably NOT get 10.00VDC exactly) so when you enter S24000 the multi meter shows 10V, and when you enter S12000 you should get 5V, S6000 should give you 2.5V.

    You must read the manual of your VFD and connect the BOB accordingly. I don't know that VFD, but normally there are some parameters, and the default is usually set for control panel control, so you must change that to 0-10V and digital input control. Once that is done you can test again and check that the spindle is spinning with the set rpm. Don't worry about the 6,000rpm minimum, if you never send an S command with less than that, it will never spin slower. Also, in some VFD you can configure that inside the VFD, which results in the spindle never spinning slower, every time the spindle is started it starts with minimum that speed. But if you decide to set that up in UCCNC then you can do that there also, but...

    If we follow your example, and you set the minimum rpm in UCCNC to 12,000 then:

    Min RPM = 12000
    Max RPM = 24000

    S18000 is NOT 5V but 7.5V.

    That is because the analog output is still a 0-10V output, or at least it should be. UCCNC should logically behave the way that if you set a minimum rpm it should never output a voltage below that rpm, but it should still handle it as a 0-10V signal, otherwise your VFD will not work correctly. If the VFD receives 5V then it will set the spindle rpm to 50%, which is 12,000rpm, not 18,000rpm as you wanted. 12,000 is 50% or 24,000rpm all the time, regardless what you set as minimum rpm. I don't know why Balazs gave you that answer, or perhaps we misunderstand each other. Note that I don't use analog signal to control the VFD, but I am pretty sure that this is the way it works. While 18k is the middle between 12k and 24k, it is not the middle value in a 0-10V because 0V will not be equal to 12k rpm. It should just mean that if you enter S3000 or anything below S12000 the UCCNC software should generate a 50% duty cycle PWM signal, and that 50% should increase accordingly after S12000 to match the 0-10V to the rpm.

    Anyway, if I wanted to set up a minimum rpm I'd do that in the VFD, just to make sure it is ALWAYS right, and would not care about setting it up in UCCNC.

    I don't know if all that is clear or if you are still looking for answers, but just ask if you want to know more. I can't check the above right now, but can do that later on this evening, though I don't actually have the UC400, I have the UC300USB and ETH versions.

  5. #5
    Join Date
    Oct 2015
    Posts
    17

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Thanks for the full reply...

    I have it all setup now and it's working, but still not sure I fully understand why it's working. At first I totally didn't realize that the PWM Frequency had nothing do to with VFD frequency which drives RPM. But then I wanted to fully understand how or what the calculation was in UCCNC from converting a S12000 or similar call to what the duty cycle was that translated into an analog signal of 0-5v. I now get that PWM duty cycle it just a way to go from digital signal to mimic an analog signal.

    My PC/CCNC to UC400ETH then goes to my MX4660 (BOB) which will amplify my PWM signal which is 0-5v to 0-10v which is what my VFD expects.


    Here's what I've set

    UCCNC settings
    PWM Frequency (Hz): 200
    PWM min duty %: 0 (5v on my VFD is 200Hz => 12000 RPM)
    PWM max duty%: 100
    Spindle Velocity Min: 6,000
    Spindle Velocity Max: 24,000


    In UCCNC, I originally had my min duty % set to 25% and my min RPM to 0 RPM, but then calling S12,000 didn't cause my VFD to run at 200Hz.

    I thought that setting my min duty cycle to 25% would tell UCCNC to never output anything less that 2.5v and min rpm in UCCNC, but that was not the case.

    Here's my VFD settings (there are other options on my VFD, a DELTA S1 to control which input volts translate to which frequencies, but I've left the default.)




    Here was my thinking on how UCCNC translated an S code for spindle RPM to duty cycle... but aftward trying a couple things. I think, and as you indicated, the output volts/duty cycle is not a range between min and max rpm set. IE, if min rpm is 12,000, that does not equal 0v.

    Calculation that appears to be working, basically the same as my original, except you don't care about min rpm set in UCCNC. That is just for setting the lowest possible limit.

    Desired RPM / Max RPM = Duty % (which translates to 0-10v output)


    My ORIGINAL (but wrong *I think*) calculation…

    (Desired Velocity – Min Velocity) / (Max Velocity – Min Velocity) = Duty Cycle %

    Example 1: (6000 – 10) / (24000 – 10) = 25% (2.5v)
    Example 2 (12000 – 10) / (24000 – 10) = 50% (5v)
    Example 3 (24000 – 10) / (24000 – 10) = 100% (10v)
    Example 4 (3000 – 10) / (24000 – 10) = 13% (1.3v… overridden to 25%/2.5v because of min duty %)

    If the PWM Duty Cycle % is below or above my min and max, it’s reset to the limit... example # 4.

    Example IF min velocity is 6000 and max is 24000…
    Example 1: (6000 – 6000) / (24000 – 6000) = 0% (0v)
    Example 1: (12000 – 6000) / (24000 – 6000) = 33% (3.3v)

  6. #6
    Join Date
    Apr 2013
    Posts
    1899

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    There is no 0-5V amplified to 0-10V. That's a misunderstanding, don't use that word because it means something totally different. The UC400 pulses at 5V level. Those pulses control a 10V, which internally in the BOB pulse between 0V and 10V with a certain duty cycle. It is that duty cycle which generates the 0-10V analog output. The UC400 does not have an analog output, only digital, so there is no 0-5V analog signal involved at all, and definitely no amplification. PWM stands for Pulse Wide Modulation, and is simply averaging the amplitude (voltage level) of the 10V, which is at the input to the modulator circuit. There is a large capacitor on the output of the 0-10V, that capacitor is charged to the level of what the PWM duty cycle matches and keeps that at an fairly even level, averaging out the pulses so it appears to be an analog voltage. That is the output voltage you get.

  7. #7
    Join Date
    Oct 2015
    Posts
    17

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Thanks for the clarification.

    I do understand that the eventual 0-10v analog output on my BOB is derived from the PWM / duty cycle which is from a digital signal... UCCNC => UC400ETH => BOB/Leadshine MX4660.

    From your explanation, when it eventually get's to a simulated 0-10v analog signal, it's NOT being amplified but the UC400 digital PWM signal is just controlling a 10v digital signal on my BOB.

    That makes a lot of sense now, since my BOB needs a 10v power input (which in my case comes from my VFD)... and then my 0-10v output from my bob (leadshine mx4660) to my VFD... which controls frequency and ultimately the spindle RPM.


    I'm sure I'm not using the proper terms since this is all new for me... but I'm getting there.

    Thanks for the follow up.

  8. #8
    Join Date
    Apr 2013
    Posts
    1899

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Yes, that is why your BOB needs 10V, but be careful, I am not sure that it is OK to take that 10V from the VFD. That depends on the VFD as well as the PWM circuit of your BOB. The 10V output of your VFD may not be able to cope with the current consumption of your PWM circuit, so you must check that up. I don't know your BOB or VFD, so I can't give you a help with that.

    Another thing is that I read up in another post that you have a PWM frequency of 200Hz. I think that is not optimal, even if it works. Personally I'd use more than that, but maybe I am wrong. It depends on your PWM circuit, the capacitor I mentioned before. Some times it is better to have a higher PWM frequency, an I personally would use something like 1kHz. Check out if it makes a difference in your output, if the spindle RPM is better, more accurate, smoother or if the output voltage is more stable in one case or the other. I know for sure that my BOBs don't like too low frequency, I tested this before, even if I am not using them.

  9. #9
    Join Date
    Oct 2015
    Posts
    17

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    I'll try a higher frequency, 200Hz it was just the default in UCCNC.

    From what I can tell, just by observation is that my spindle doesn't run any differently when I controlled the frequency from VFD potentiometer or from the 0-10V coming from my BOB.

    For reference, my BOB is an all in one BOB, with inputs, outputs, 4 axis stepper drivers, etc...

    I'm getting my input voltages for my BOB from the VFD just because the documentation for my BOB indicated it as such, as seen in picture.

    I know that input +10vdc can come from anywhere, I can even pull it from my on BOB's on board +12vdc outputs as that's how the manufacturer provided test results in their documentation.

    Attachment 342284

  10. #10
    Join Date
    Jul 2007
    Posts
    139

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    I'm in the process of wiring up a Delta VFD and Tekno spindle too. I'm definitely going to use this post as a reference when I get to that point. Looking at your last diagram, can you confirm you're hooking up to M1, ACI and ground?

  11. #11
    Join Date
    Oct 2013
    Posts
    20

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Thanks to A_Camera, I have a far better understanding of the PWM.

    I have Gecko G540 and it's wiring is the same as skcncx mentioned, to connect to VFD. My understanding was that the Gecko could handle up to 10K PWM frequency. Default in UNCNC is 5K (and I think Maximum).

    Anyway, I was getting wild ranges of speeds, S4000 would show maybe 7000 on VFD, S12000 would show some other ridiculous number. Not having read A-Cameras comments yet, I tried the only think that mad sense, the base frequency settings. So I slowly dialed it back, 4500, 4000, 3500 and stopped at 1200 and started to get much better matches of SXXXX and actual VFD readings. S12000 gave VFD around 12384, S16000 - VFD 16400 (or so).

    Would I be right in assuming that PWM is never going to be accurate, unlike when I was running a RS485 connection, S12345 have 12345 on VFD (trying PWM as no plugin for UNCNC for RS485 - DAN911 is working on one)

  12. #12
    Join Date
    Jun 2015
    Posts
    943

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Not the PWM is inaccurate but it could be distorted by the external stuff (BOB) it goes through.
    If your PWM frequency is high and there are slow optos in your BOB then the PWM will get to your VFD distorted.
    If your PWM freq. is low and the VFD and BOB has not enough filtering then you will see the motor following the PWM fluctation.
    You should find the golden mean with the frequency where it works good.

  13. #13
    Join Date
    Oct 2015
    Posts
    17

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    My Delta VFD (my model is VFD S1 (110v .75Kw)

    For Spindle RPM
    I'm connecting from my BOB to the +10V, AVI and GND on the VFD.

    On my BOB (Leadshine MX4660) I have a GND, 0-10V (pwm signal) and a +10V connectors. The VFD get's it's 10V power from my BOB. The AVI on the Delta get's the 0-10 pwm signal from my BOB.


    For On/Off (M3) clockwise

    I'm using an output from my BOB to make the connection between M0 and GND on the Delta. You mention M1, but on my Delta M1 is for counter clockwise motion which I believe is the M4 software control code.

    Now, Damen CNC did advise I put a relay between my BOB and the M0 and GND on the Delta VFD to isolate my BOB. On my Delta VFD in order to turn it on, all you need to do is close the circuit (make the connection) between M0 and GND if you plan to turn it on and off from software. How that connection is made from your BOB and outputs may be different.



    You will want to make sure in your Delta VFD setup that it's programmed to take the RPM PWM 0-10v signal to drive RPM...otherwise you may have it hooked up right.


    Things I have found when I increased the PWM Frequency in UCCNC is that it did slightly change the frequency being display on the monitor of the VFD by 10-20hz higher.. so it's not exactly, but if I run a code of S12000 my Hz display on the VFD will read out around 215 so if all is perfect, I'm actually running my spindle at 12,900 since 215Hz * 60 = 12,900... as mentioned in this thread the PWM signal may get distorted... but for my purpose this is good enough.

  14. #14
    Join Date
    Oct 2013
    Posts
    20

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Quote Originally Posted by OlfCNC View Post
    You should find the golden mean with the frequency where it works good.
    I'll admit I was using a very long unshielded cable when testing. I'll make a short shielded cable and stick with PWM. I like the fact that the spindle on/off relay will drop if there is a fault.

    It can't HERTZ to be a tad over / under

  15. #15
    Join Date
    Apr 2013
    Posts
    1899

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Quote Originally Posted by zymurgy42 View Post
    Thanks to A_Camera, I have a far better understanding of the PWM.
    You're welcome, I am glad it helped you.

    Quote Originally Posted by zymurgy42 View Post
    I have Gecko G540 and it's wiring is the same as skcncx mentioned, to connect to VFD. My understanding was that the Gecko could handle up to 10K PWM frequency. Default in UNCNC is 5K (and I think Maximum).
    I don't know the Gecko but yes, for UCCNC the maximum is 5kHz. Generally, that's good enough, and you should be fine with something between 1-3kHz.

    Quote Originally Posted by zymurgy42 View Post
    Anyway, I was getting wild ranges of speeds, S4000 would show maybe 7000 on VFD, S12000 would show some other ridiculous number. Not having read A-Cameras comments yet, I tried the only think that mad sense, the base frequency settings. So I slowly dialed it back, 4500, 4000, 3500 and stopped at 1200 and started to get much better matches of SXXXX and actual VFD readings. S12000 gave VFD around 12384, S16000 - VFD 16400 (or so).

    Would I be right in assuming that PWM is never going to be accurate, unlike when I was running a RS485 connection, S12345 have 12345 on VFD (trying PWM as no plugin for UNCNC for RS485 - DAN911 is working on one)
    You are both wrong and right.

    PWM in itself can be very accurate, but PWM means only the actual digital signal. That signal is converted through a digital/analogue converter circuit into an analogue voltage. The resolution depends on the PWM signal generator, which in the case of Mach3 is depending on Mach3, but in UCCNC I am not sure if it is just UCCNC software or motion controller dependent or a combination of both. I am not using PWM, so I have no details about that.

    However, regardless of which software you are using the actual analogue voltage stability and linearity depends on the digital-analogue converter circuit. I tested my 2 BOBs and it was not that great. I also tested the UC300ETH and the UC300USB which have built in 0-10V outputs, and they were not better. Linearity means that the output voltage is linear to the PWM signal, so that for example 10% PWM => 1.00V, 30% PWM => 3.00V, 50% => 5.00V, 70% => 7.00V and 100% => 10.00V. This is not the case, and 10.00V is never reached, and the voltage increase from zero to maximum was not linear. I measured the actual PWM signal output as well, and that was very good, so the voltage linearity and stability issues were due to the digital-analogue converter circuit. With a high quality digital to analogue converter the voltage levels should have a MUCH better linearity and accuracy than with these cheap hardware.

    I am using Modbus, and with Modbus, or any other serial communication protocol, the accuracy and resolution is as good as the VFD allows, so my own VFD expects the RPM frequency commands with two decimals, so the maximum theoretical resolution is 0.6RPM with the 24,000 RPM motor I have.

    Both Mach3 and UCCNC has a built in Modbus plugin, but the Hunayang VFD is not Modbus compatible which is why it needs a special plugin, or a macro, at least some of the HY models.

  16. #16
    Join Date
    Mar 2010
    Posts
    813

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Hey zymurgy42,

    I didn't read through this thread but if you already have a RS485 connection try this plugin for Hunayang VFD for UCCNC. Been using the Matty Zee Hunayang plugin for Mach3 for years and had no reason to look further for control of my spindle through Mach3,. Now I have this for UCCNC and works great.

    HYPLUGIN1.zip

    Dan

  17. #17
    Join Date
    Mar 2014
    Posts
    10

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Quote Originally Posted by Dan911 View Post
    Hey zymurgy42,

    I didn't read through this thread but if you already have a RS485 connection try this plugin for Hunayang VFD for UCCNC. Been using the Matty Zee Hunayang plugin for Mach3 for years and had no reason to look further for control of my spindle through Mach3,. Now I have this for UCCNC and works great.

    HYPLUGIN1.zip

    Dan
    Many thanks for the plugin Dan, only slight problem I have is that in order for the plugin to run my spindle in uccnc, I must first run it in mach3 ! do you have any idea why this might be?

  18. #18
    Join Date
    Mar 2010
    Posts
    813

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Quote Originally Posted by needleworks View Post
    Many thanks for the plugin Dan, only slight problem I have is that in order for the plugin to run my spindle in uccnc, I must first run it in mach3 ! do you have any idea why this might be?
    Hmm, sounds like a com port issue. Did you go to the HYPLUGIN config and set up your port? Did you get a "connected window" on start up after you restarted?

  19. #19
    Join Date
    Mar 2014
    Posts
    10

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Quote Originally Posted by Dan911 View Post
    Hmm, sounds like a com port issue. Did you go to the HYPLUGIN config and set up your port? Did you get a "connected window" on start up after you restarted?
    Yeah, all was good with the plugin, and the macro before that, it's definitely connected ok.
    When I say "run it in mach3" I mean I only have to turn the spindle on and then off in mach 3 (which is using the Le royaume d'éole plugin) then go back to uccnc, and all is good?

  20. #20
    Join Date
    Mar 2010
    Posts
    813

    Re: Unerstanding the UCCNC PWM settings for VFD/Spindle

    Quote Originally Posted by needleworks View Post
    Yeah, all was good with the plugin, and the macro before that, it's definitely connected ok.
    When I say "run it in mach3" I mean I only have to turn the spindle on and then off in mach 3 (which is using the Le royaume d'éole plugin) then go back to uccnc, and all is good?
    As safety feature, if there's no response from the VFD the plugin will continually send off commands than close port and reopen connections. When UCCNC starts the plugin starts running before UCCNC is completely loaded and may be triggering this safety feature. This sounds like your problem. This was a problem I thought I tweaked/fixed and tested on Win8.1 and XP. I will post a revised plugin in the UCCNC forum section here and would appreciate if you let me know if it fixed you problem.

    Are you getting a connected window on start up with UCCNC?

    Dan

Page 1 of 2 12

Similar Threads

  1. Spindle settings
    By muamerb in forum LinuxCNC (formerly EMC2)
    Replies: 0
    Last Post: 03-30-2015, 12:36 PM
  2. Spindle Speed Settings
    By kolias in forum Mastercam
    Replies: 3
    Last Post: 01-30-2014, 04:13 AM
  3. vfd and spindle installation and settings
    By shreifali in forum Spindles / VFD
    Replies: 1
    Last Post: 11-25-2013, 09:40 PM
  4. Please check my Spindle settings. I can't get Mach 3 to run my spindle
    By TheProCreator in forum Mach Software (ArtSoft software)
    Replies: 8
    Last Post: 09-07-2013, 05:50 AM
  5. Water cooled spindle 2.2kW settings
    By lolos1979 in forum DIY CNC Router Table Machines
    Replies: 9
    Last Post: 08-27-2010, 07:23 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
  •