06-29-2011 08:50 AM - edited 06-29-2011 08:50 AM
Hello,
i want to measure PWM came out of controller. i use labwindows to develop this task.
but when iam searching example of DQAMX inside counter examples i had found that i can measure pulse width OR i can measure period
iam asking now i need to detect PWM (pulse width and period ) and i couldn't create the two handels on the same task......
So please tell me what i can do to measure the twice at the same time
thanks in advance
06-30-2011 11:32 AM
Hello,
Characterizing the frequency and duty of a PWM signal will require 2 separate tasks. A task for pulse width measurement and frequency/period will need to be created. Each of the 2 tasks will require separate hardware counters to do this measurement; you will have to wire the PWM signal into both sets of counters for the 2 measurements to occur simultaneously.
Eric
06-30-2011 05:12 PM
you mean that i have in my NI two counters CTR0 and CTR1 and i will apply the signal on both pins and start to detect task by task then handel the both tasks to return the width and period ........but in this case i will not be able to make pwm output from bench and input at the same time as i have two counter only ...IS IT right ??
if yes .....that is the only way to implement the pwm measure but what semiperiod function means ???? i C it can detect the both levels periods but it will draw them not get them as values....???
thanks alot for your help
and waiting your reply
07-01-2011 12:59 PM
Hello,
Since you only have 2 counters, you can only perform 2 counter tasks at a time. If the PWM signal is not quickly changing, you can measure the pulse width, close the task, and then use the same counter to measure the frequency. I am unsure of your measurement requirements, but this is a possibility.
Eric
07-05-2011 09:27 AM
Hello
thanks alot for your help .....