--- On Wed, 3/16/11, Viesturs Lācis <viesturs.la...@gmail.com> wrote:

> From: Viesturs Lācis <viesturs.la...@gmail.com>
> Subject: Re: [Emc-users] pwm AD converter
> To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net>
> Date: Wednesday, March 16, 2011, 9:51 AM
> 2011/3/16 Klemen Dovrtel <klemen_dovr...@yahoo.com>:
> > Hello everybody,
> >
> > I would like to measure some analog signals using emc
> (for PID control). I think the easiest way would be to
> measure the pwm signal.
> >
> > Is there a hal module/component which could i use or
> can assemble one from existing hal modules/components?
> >
> > I was thinking i could use two oneshot functions, one
> to trigger on rising edge and one to trigger on falling
> edge. What i need is a function to measure the time between
> those two events - is there a hal function for that?
> 
> 
> I am not sure, if I understand correctly, what is the goal
> You want to
> achieve and what signals do You want to measure, but I
> think that You
> can:
> 1) use voltage-to-frequency converter chip like this:
> http://www.national.com/mpf/LM/LM231.html#Overview
> or use already assembled Mesa's THCAD board
> Both if them take 0-10V on input and outputs frequency
> signal
> 2) use encoder module in HAL to treat the frequency signal
> and provide
> an input to PID loop.
> 
> Viesturs
> 
> 

Thank you, this is what i was looking for :) But i am still not sure how to 
measure the pulse width with the encoder module.

So i should use the stepgen module to generate pulses as fast as possible and 
count them using encoder module. I should reset the encoder module on rising 
edge of PWM signal and count pulses till the falling edge of PWM signal occurs.

What i am missing is some function to hold the value of the encoder at time of 
falling edge.

Regards
Klemen


      

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to