Steve Blackmore wrote:
> On Sat, 26 Sep 2009 11:27:05 -0400, you wrote:
> 
> 
>>> I want spindle-on to enable pin14 AND pwmgen.0.enable - how do I do it?
>> You need to create one signal that is driven by motion.spindle-on and
>> drives both pwmgen.0.pwm and parport.0.pin14. 
> 
> Thanks John & Alex - got that sorted, spindle now reverses. A couple of
> queries regarding pwmgen though.
> 
> Why for an MDI command of M3 S500 does it output 23.4kHz in forward
> speed (which is correct for 500rpm), and M4 S500 only gives me 20.5kHz
> in reverse, which is slow?
> 
> Another anomaly, with no speed set, in axis on the manual screen,
> clicking spindle cw button, it outputs 19kHz and clicking ccw it outputs
> 25.7 kHz - surely it shouldn't output anything until I click the +
> button?
> 
> Clicking the + button then lowers the speed to a crawl then works as it
> should incrementing the speed.
> 
> Steve Blackmore

This is the kind of thing that you can investigate using halmeter.  Open
a halmeter, and start poking around at the various signals.  Start with
"spindle-cmd", which I believe is in RPM.  Verify that it is does the
right thing for both forward and reverse.  (To be honest, I don't know
what it is supposed to do without consulting the manual - it might give
you a negative value for reverse, or it might be the absolute value of
the commanded speed.)

Once you know that emc proper (the motion controller) is asking for the
right speed, then you can focus on the pwm generator.  There are
probably a few parameters associated with it (scroll thru the parameters
listing in halmeter).  Again, I don't have a manual in front of me, but
one of the parameters is probably the final duty cycle, after all
scaling, etc, has been applied.  Check to see if that is correct.

One thought just occurred to me - you are using pwmgen, but in your
message you talk about frequencies like 23.4KHz.  pwmgen is NOT intended
to generate any specific frequency.  It generates a duty cycle that you
filter into an analog value to run your VFD.  It will choose whatever
frequency lets it get closest to the desired duty cycle, given the
constraints of software generated PWM with a relatively slow "clock".

Anyway, take a look at things with halmeter and/or halcmd.  Something
like "halcmd show pin pwmgen" will show all pins associated with the pwm
generator, and "halcmd show param pwmgen" will show the parameters.

Post your results (especially halcmd show output) if you need more help.

Regards,

John Kasunich

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to