Jump to content

measuring pule width


Moran

Recommended Posts

hellow,

i need to measure the width of 1 squre pulse . this pulse is 50ms and about 20V amplitude ( which i have to measure ).

i am using V570 and V200, i thought using the V200 digital input and start timer , and when the pulse is at low state stop the timer.

can i do that? how?

if someone has a better idea i will be happy to hear.

thanks,

Moran

Link to comment
Share on other sites

  • MVP 2023

If it's only one pulse you won't be able to measure the frequency - the HSC input averages the pulse counts over a period settable from 100 ms to 1s. As soon as your pulse is gone the frequency register will reset itself back to zero.

A timer won't work well for this; the best resolution you can get is +/- 10 ms plus the scan time which is typically 3 -10 milliseconds (depending on your program size).

Read the Help on the 1.25 ms interrupt routine and set it up to to use an immediate input to increment a counter as long as the pulse is high. The routine solves every 1.25 ms, so you move the count value to another MI when the input goes low. Then it's a matter of multiplying this count by 1.25 to get the pulse width in milliseconds.

Joe T.

  • Upvote 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.