Jump to content

cFP DI frequency


thieumat

Recommended Posts

Hi everybody!

I have a cFP DI that reads a pseudo-periodic pulse

how could I put this signal on a timeline to measure the length of the 1 pulse ?

I've tried to put it on a digital waveform but it seems to need an array of 8 signals, I don't realy understand

Any others methods are welcome

I have lavbiew 8.2 dev suite

Regards

matthieu

Link to comment

How fast is this pulse? I seem to remember that the cFP poll cycle of its I/O module is relatively slow (I think it was a few ms), so if you have a faster pulse you might have a problem.

As for measuring the length, all you need is an FP Read VI which will output a single boolean and a loop with two shift registers - one to remember the previous value of the DI and one to remember the last time of the change. When you detect that the input changed (by comparing it to the previous value), you use the Tick Count primitive to get the current time and substract from it the previous time to get the number of ms that passed and that's your pulse length.

You might get higher accuracy with a timed loop, but I'm not sure if it's supported on the cFP.

Link to comment

QUOTE(Yen @ Nov 29 2007, 12:26 PM)

...

You might get higher accuracy with a timed loop, but I'm not sure if it's supported on the cFP.

Yes it is supported but it is not any faster.

For fast signals I have used a counter timer module to measure the period.

It also sounds like the original questioner, is reading from all of the DI lines and not just one. If this is the case, either change the code to read only the single DI line or use an index array to pull out the channel of interest and then follow Yair advice.

Ben

Link to comment

another little question ;p

suppose that the frequency of my pulse is knowed, said 1Hz, easy to count

in MAX I can see it easealy on the specified channel of my cFP DI : 1 ... 0 ... 1 ... with the good frequency

but when I put a fp read and a indicator in a simple while loop the frequency is shorter and realy instable, sometimes 10Hz, sometimes 200Hz ...

I've tried with a delay between eatch loop, in a timed structure ... always the same

but in MAX it's still good !

is there is a diffrence between MAX reading and the fp read ?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.