On 3 May 2016 at 16:12, adit bhargava <[email protected]> wrote: > 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.
You should add it to the servo-thread really, there is no need to update the value at base-thread speed. > Duty-Cycle = ( 2 ms / Period )( where Period = 1/ Signal freq) > > How should I implement this formula in .HAL file? That simplifies to DutyCycle = 2mS * frequency (which passes a units check, but doesn't seem right) You would use the HAL "scale" component: http://linuxcnc.org/docs/2.7/html/man/man9/scale.9.html (It is probably worth a skim through all the real-time components listed in the section near the bottom of http://linuxcnc.org/docs/2.7/html/ ) net PWM_freq scale.0.in setp scale.0.gain 0.002 net dc scale.0.out pwmgen.0.value Or similar. -- 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
