Thank you very much Andy. I forgot to add tristate_float to thread. Now, I 
addeed to my base-thread and the output comes now on CRO.
However, now I also want the duty cycle to be calculated,
My T-On is always 2 ms
I have to use the Signal frequency (which I got through GUI ) Every time to 
calculate Duty cycle and should be assigned to PWMGEN duty cycle parameter.
Duty-Cycle = ( 2 ms / Period )( where Period = 1/ Signal freq)
How should I implement this formula in .HAL file? 

BRAdit




      From: andy pugh <[email protected]>
 To: adit bhargava <[email protected]>; Enhanced Machine Controller (EMC) 
<[email protected]> 
 Sent: Tuesday, May 3, 2016 4:39 PM
 Subject: Re: [Emc-users] How to assign values to pwmgen parameters(duty-cycle, 
frequency, etc, ) from GUI ?
   
On 3 May 2016 at 15:30, adit bhargava <[email protected]> wrote:

> 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)

I assume that you addf-ed the tristate float to a thread? (If you
hadn't then I think that the output would be zero).

could you try disabling and the re-enabling the pwmgen, to see if that
is necessary to force a frequency recalc (the code looks to already do
that, though)

-- 
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

Reply via email to