LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

incorrect pulse reading

Hi Tom

 

Your work of art was a great help. Thanks Smiley Happy

 

The 6008 has a 32 bit counter which counts edges only (because it doesn't have a gate). This means that the device cannot perform period/frequency measurement directly in hardware.

You can however use edge counting and measure the time period between two events. This is done using a shift register to ensure a change of counter value has occurred. You then need to take the time difference divided by the number of counted edges which will equal the approximate period of the signal

 

There is an example VI at this link that should help, just connect the input pulse to the PFI line (pin 29 on the USB 6008) and hit run. I tried it with a square wave input and it seems to work fine.

 

USB-6008 for Period Measurement

http://digital.ni.com/public.nsf/websearch/14966D5D3A9AB75F8625700E00412DA1?OpenDocument

 

Hope the foot recovers quickly so you can get to a computer and try this out.

 

Best Regard

 

Tim

 

AE NI UK and Ireland

Message 11 of 13
(658 Views)

You were right! I wired my input to line 29 and now i have an accurate counter source. I have looked at the example vi, but would ideally like to construct my own in my own manner. I have tried to do this using a timed loop which gives the counted pulse and the RPM using a formual, updated every second. However this increments every second as well. I need a way to reset the value every time the loop is run, i.e every second. I dont really want to put a time delay on the indictaors, RPM and counts, as accuracy is deemed to be important.

also, what is line 29 on the 6008?youmentioned PFI? what does that stand for?

0 Kudos
Message 12 of 13
(648 Views)

I don’t really understand what you are trying to say or ask in your first paragraph. If you want to reset some vales every time you enter the loop then you could just initialise it before it enters the loop.

If you could post your code then I might get a better idea of what you are trying to do and how you are trying to do it.

What does that stand for? Programmable Function Input predominantly used for triggering and event counters.

Regards

Tim

NI UK AE

0 Kudos
Message 13 of 13
(631 Views)