Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel Port Event Counter

Hi
 
I am quite new to labview and I am stuck in this part of quite a complex project
 
I have to interface a ON/ OFF Sensor to a parallel port and record the amount of event triggers . Till now everything is fine and everything seems to work ..
 
I am using a sequance structur to wait for a 0 then wait for a one then finally use a for loop  and shift register in the successive sequance to add the pulse changes.
 
My problem is how can I reset the shift register say every 100 ms to now how many pulses I am receivingin on a give time span
 
Thanks Alot to anyone who replies
 
0 Kudos
Message 1 of 2
(3,218 Views)
Ok
You need to time how many pulses come from the port.
Each start of pulse can be measured (timestamp) and stored in an array
This array can be limited to say 100 elements, and if its full you start replacing elements.
from this array you could calculate how many pulses have been sent in n miutes or seconds.
 
You should have a parallel while loop for the inspection of the array and in the existing program
ony use the first two elements of the sequence in a total while.
PS
If you know how fast pulses come you may add a while of say 1ms inside your while to preserve computing power..
 
play a little and ask further questions.
 
greetings from the Netherlands
0 Kudos
Message 2 of 2
(3,209 Views)