Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Davek0974 on March 20, 2016, 12:30:53 PM

Title: PWM output...
Post by: Davek0974 on March 20, 2016, 12:30:53 PM
Is there an adjustment for the PWM output from Mach3?

I've got my Huanyang 2.2kw VFD running on the 0-10v signal from my BOB and the speed on the VFD shows correct at 24000 rpm when commanded by Mach3, this also tallies with the speed take by a hand-held laser tacho.

However, at lower speeds it's off and generally runs lower than commanded.

Is there an adjustment for this?
Title: Re: PWM output...
Post by: Davek0974 on March 22, 2016, 03:11:04 AM
Anyone?
Title: Re: PWM output...
Post by: Tweakie.CNC on March 22, 2016, 04:31:14 AM
If it’s any help to you (or others) some while back I wrote a brief description of PWM which describes the terms / attributes of the actual signal (although it relates to lasers it is all the same really). http://hobbycncart.com/publ/cikkek/elektronikai_temaju/pwm_pulse_width_modulation/4-1-0-44

Within Mach3 you can set / adjust…
 
PRF (base frequency) from Spindle Setup. This could be adjusted to provide the best linear performance from the external digital to analogue converter used to generate the 0-10Volt signal for a VFD.

Min.PWM % from Spindle Setup. In some instances it may not be desirable to attempt to run a spindle motor too slowly. It should also be noted that 0%PWM can be the equivalent to TTL(L) and 100%PWM equivalent to TTL(H).

Min.PWM, Max.PWM and Gear Ratio from Spindle Pulleys. By careful adjustment of these figures we should be able to scale the available PWM to fit the range of spindle speeds required and also obtain a reasonably accurate RPM readout between Mach3 and a spindle tacho.

(If the two Min.PWM settings conflict is unknown (obviously one takes precedence)).

So to answer your question, yes there is an adjustment but it is very much 'trial and error'.  :-\

My advice is just jump in and experiment.

Tweakie.
Title: Re: PWM output...
Post by: Davek0974 on March 22, 2016, 06:19:25 AM
Thanks for that, will have a play.
Title: Re: PWM output...
Post by: Davek0974 on March 23, 2016, 02:59:22 PM
Has anyone achieved this?

I was kindly sent a document written by Art concerning tuning the output but it was written for step/dir VFD not PWM.

I tried it out as far as i could but not only did some of it not make sense, it did not work properly.

It involves tweaking the motor tuning steps per, velocity, spindle pulleys but there is not much that seems to relate to PWM.

What it DID prove was that the answer DOES lie in there somewhere - i set the steps per to 50 as it stated, velocity to max, spindle pulley to 1000 and tried S1000 which gave me 24000 rpm, S1 gave me 1000 so it does make differences.

I also did not have a linearity.dat file which was supposed to be deleted?

Has anyone actually achieved tuning of the PWM output??
Title: Re: PWM output...
Post by: Davek0974 on March 24, 2016, 03:05:10 PM
Well, spent an hour messing tonight, i have no doubt it can be done, but its not going to happen by trial and error i think - too many variables and unless you know what effect each one has your'e just pissing in the wind ;)

Pretty certain now that steps/per and acceleration does nothing, this makes sense as we are on PWM so I think that can be taken out of the equation.

That just leaves Min PWM, base frequency, pulley min and pulley max.

Unless there is a setting on the VFD, i guess there might be, might be worth checking that 5v does give 50% speed.
Title: Re: PWM output...
Post by: Davek0974 on March 25, 2016, 11:44:53 AM
Well, been messing - it all seems relative to the spindle pulley settings.

I set the min as whatever I got after setting a M03 S1 command - this was 1500rpm.

The max was then tried setting above the actual limit - this made things worse.

Then I went below the limit - 20,000 actually did a good job at the 5,000 to 15,000 range and was pretty close BUT it means you cannot command full speed as you have limited it to 20,000 so not good :(

I am leaving this at present as I am unsure it actually be done without a lot more knowledge and maybe some VFD tweaks too.
Title: Re: PWM output...
Post by: olf20 on March 25, 2016, 07:15:26 PM
Not sure if this will help. I had it bookmarked.
http://www.machsupport.com/forum/index.php/topic,18580.0.html
olf20 / Bob
Title: Re: PWM output...
Post by: Davek0974 on March 26, 2016, 04:49:03 AM
Hi

Yes, I had a copy of that setup, it relates to step/dir drive though and does not seem to play with PWM so well as the step/velocity stuff does nothing.

Title: Re: PWM output...
Post by: Davek0974 on March 26, 2016, 10:00:24 AM
Should it be possible to measure the 0-10v signal?

I thought so, but I tried measuring the input to the VFD from the BOB and as soon i touched the VI & ACOM pins in the VFD the motor stopped as if the input was being shorted out?

This was with an expensive Fluke DMM on DC volts, i was expecting to see something 0 and 10v here??

Odd?
Title: Re: PWM output...
Post by: Davek0974 on March 28, 2016, 12:26:30 PM
I have now measured the 0-10v signal but only by disconnecting the VFD?

Odd.

Is the a way of editing linearity.dat manually?
Does anyone know whats in it?

I have listed volts to speed requested now and also speed requested to speed obtained.

Obviously i can use a manual lookup table but thats  not the point ;)
Title: Re: PWM output...
Post by: Davek0974 on April 01, 2016, 02:56:34 PM
SUCCESS!

I changed the VFD from the Huanyang to a UK Schneider Altivar12 unit.

It measures correctly now, the motor sounds better, smoother, draws less current. Sensorless-Vector seems to be unstoppable even at 100rpm!

According to the tech guy at the suppliers, with sensorless-vector drives it is 100% vital to run an auto-tune sequence once all the parameters are set.

I also managed to calibrate the speed to Mach3 successfully :)

In the end, all it took was taking the minimum spindle pulley to -6500 and max to +24000 - I now have usable calibration from 5,000 to 24,000 rpm to within 200 rpm.