Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

how to detect a video spot with PCI6602

I have a PCI 6602 counter card under LV7 and DAQmx.
I want to detect a "wandering" light spot with the help of a camera with a composite (VBS) signal with 50 pictures per second. I get a digital information (TTL signal for triggering) whether the part of a row is light or dark i.e. when the spot begins and when it ends.

With the CO Pulsgeneration VI of DAQmx I drive both the picture (50Hz) and the row frequency (15.625 kHz), both counters are cascaded and the VI works fine.

Now I want to detect the centre "x" of the spot at a certain row of a picture (e.g. row nr 100) and detect within this row when the light is on or off (in my schema point 1 and 2).

row----------------------------
-------------------------------
---
---------o--o---------------
----------o------o-------------
100---1---x----2------------
----------o------o-------------
------------o--o---------------
-------------------------------

I have no idea how to do that.
How can I perform with DAQmx and the counters of the PCI 6602
a) to count the rows up to 100 in my example
b) to start a counter when a row begins and to to stop when point 1 (light) is reached
c) to start a counter when a row begins and to stop when point 2 (dark) is reached

Then I would be able to estimate the centre "x" of the spot as the difference of the counter values of point 2 minus point 1.

Thanks Ruediger
0 Kudos
Message 1 of 2
(3,098 Views)
Sorry for being a bit provocative but I think using a counter board for this task is one of the worst ideas.
Acquiring the data with a framegrabber detecting the spot would be fairly simple. Even (fast)analog acquisition would be easier than using the counter board.

If you really need to use the 6602 for some reason then maybe "Two edge Seperation Measurement" (see shipping examples) could be a solution.
With this type of measurement you can measure the distance between two edges on two different signals (row signal and pixel signal going to high or low). You would have to use two counters for both transitions and one counter that generates an edge after counting 100 rows.

Best regards,


Jochen
NI-Germany
[SRQ212300]
0 Kudos
Message 2 of 2
(3,098 Views)