LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

1ms Time Loop / Event Trigger from Counter

Hi.  I'm pretty new to LabView so I'm am hoping this is an easy question:

 

I need to read the pulse signal from some reluctors (toothed wheels that pulse a signal with each passing tooth).  The amplitude of each pulse is above 2.2V so I was planning on using TTL counters.

 

I need to record the status of 5 counters with each increment of one of the counters  For the RPM and tooth count, I can do this with a 1ms timed loop.

 

Question:  Can windows successfully give a 1ms (accurate) timed loop?  I know this depends on how much I am doing inside the loop but, for now, I just need to read 5 counters and store the data with a timestamp.

 

Is it possible to make a counter throw an event?  If the counter is incrememented, can LabView be notified to then go off and handle a block of code?

 

Thanks for any help you can offer!

0 Kudos
Message 1 of 5
(2,540 Views)

What hardware are you using?

0 Kudos
Message 2 of 5
(2,536 Views)

I have driven multiple timed loops under Windows XP (LV 7.1) at 1KHz.

 

It requires carefully tailoring of the OS environment but it does work.

 

As an alternative a counter borad that supports bufering may aleviate that requirement.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 5
(2,533 Views)

I'm using the four timers on the 9188 chassis (read through a 9401 Digital card).

0 Kudos
Message 4 of 5
(2,530 Views)

I assume you also have an analog input card for the chasis?

 

So, it's probably possible to get 1ms timing with software timed loops, however based on my quick check of the manual for your chasis

 

http://www.ni.com/pdf/manuals/372780c.pdf (see section 2-2 for example)

 

You can use an Analog Comparison Event or a PFI channel to trigger a sample (i.e. your generated pulse is the sample clock). This could allow you to use your pulse to trigger an analog sample. Now, this doesn't get you timing information (it just gets you the value of the analog input at the time the event occurs). To get a time, you can use the counters on the digital card in the same way. You have the counters be driven by a fast sample, on-board clock. Then you can use your pulse events again to sample that clock. So each pulse, you get one analog voltage sample and one time sample from the counter. The resolution on this counter will be great, depending on how fast your counters can be driven (sometimes NI counters can actually be driven faster than the fastest available clock on the card or chasis). 

 

Or you can just do the software loop.

0 Kudos
Message 5 of 5
(2,526 Views)