Yes Andy, I also checked the documentation of pwmgen is wrong.pwm-freq is a hal
pin
I did these steps as suggested by you but the output on CRO is not as it should
be according to frequency of 150 Hz and duty cycle of 29.9% (pulses of T-on =
2ms and T-off = 4.7 ms)
Are below steps correct?
I checked the values of tristate-float.0.in, tristate-float.0.out and
pyvcp.signal-frequency-value .THey are all 150 Hz
net PWM-Freq tristate-float.0.in <= pyvcp.signal-frequency-value
setp tristate-float.0.enable TRUE // Sets the tristate OUT as IN
net PWM-OUT tristate-float.0.out => pwmgen.0.pwm-freq
BRAdit
From: andy pugh <[email protected]>
To: Enhanced Machine Controller (EMC) <[email protected]>
Sent: Tuesday, May 3, 2016 3:26 PM
Subject: Re: [Emc-users] How to assign values to pwmgen parameters(duty-cycle,
frequency, etc, ) from GUI ?
On 3 May 2016 at 13:56, Nicklas Karlsson <[email protected]> wrote:
> Yes you are correct.
No, actually, I am wrong.
I just checked the source and the manual page is incorrect.
https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/pwmgen.c#L503
adit: The pwm frequency _is_ settable as a HAL pin, you _can_ just net
the PyVCP pin to the frequency.
The only wierdness is that the change that swapped a lot of HAL
parameters to HAL pins defined the pins as the HAL_IO type, ie
bidirectional pins. (I think this was a mistake)
This means that you need to use an extra HAL component between the
PyVCP pin and the pwmgen pin:
http://linuxcnc.org/docs/2.7/html/man/man9/tristate_float.9.html
The tristate component is probably not actually intended for this
application, but it works.
--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users