Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to 1)create a spreadsheet with data logging (commencing from a trigger given by a change in scene determined b

y PCI-1409 and IMAQ function) at accurately (hardware) specified time intervals and then 2)read these values from the file, again at an accurately known rate (real time) in order to synchronise with the video being played through a PCI-1409 frame grabber ?The requirement here is to:

1) log data to file (one serial port RS232 input and 3 or 4 analogue input using a PCI-6024E. A header will also be produced and the file given a corresponding name)
The trigger to start the data logging will be given by a drastic change in scene and this will be provided by IMAQ functionality from a PCI-1409 frame grabber.

2) During the datalogging a video sequence is simult
aneously recorded on digital 8 format

3) Then it is necessary to recreate this DAQ situation by playing the video through a PCI-1409 IMAQ card and
simulataneously read the data from the spreadsheet file at a real time rate, therefore not allowing an out-of-synch situation. the same 'drastic scene change' will be used as the trigger.

A RTSI cable between the 2 boards exists, but i am struggling to accurately timebase all my measurements and synchronise the readback.

I am using win 2000 pro and LABVIEW 6.1

Any ideas ?
0 Kudos
Message 1 of 4
(3,305 Views)
y PCI-1409 and IMAQ function) at accurately (hardware) specified time intervals and then 2)read these values from the file, again at an accurately known rate (real time) in order to synchronise with the video being played through a PCI-1409 frame grabber ?Synchronizing data from a serial port is difficult. That part may not be possible to synchronize accurately. Synchronizing the analog and video data wouldn't be too bad, though. You could get them synchronized within a couple of frames.

For acquisition, set up buffers for the analog and video, with the analog running at the same rate as the video. These should be a few seconds long or more, and the same size. You can start them simultaneously using the RTSI connection. These should run continuously while you wait for your trigger. Once your trigger occurs, go back to your buffers and figure out what index the trigger occurred at. Start logging your analog data from that point on by reading it from the buffer and writing it to a spreadsheet file. Abou
t the best you will be able to do with the serial port is continuously monitor it for changes and update a variable that is written to your file whenever it changes. It won't be synchronous, but it will be fairly close.

For playback, do the video acquisition loop again. In the meanwhile, fill an analog buffer from your spreadsheet file. If you can, read the whole thing, but make sure you always have a few seconds of data ready in memory. Once your video trigger occurs, go back and figure out what the index was. The difference between the start index and the current index gives you the offset for your analog data. You can use a loop to check the current video index, display the image and the appropriate analog data.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 4
(3,304 Views)
y PCI-1409 and IMAQ function) at accurately (hardware) specified time intervals and then 2)read these values from the file, again at an accurately known rate (real time) in order to synchronise with the video being played through a PCI-1409 frame grabber ?Bruce,

Thanks for the reply.

To control the rate of the acquisitions to be as close to video rate as possible do you reccomend using the counter/timer on one of the boards (and synchronised through RTSI)? Is this where the time value will come from as well ?

Thanks,
Fraser
0 Kudos
Message 3 of 4
(3,304 Views)
y PCI-1409 and IMAQ function) at accurately (hardware) specified time intervals and then 2)read these values from the file, again at an accurately known rate (real time) in order to synchronise with the video being played through a PCI-1409 frame grabber ?I believe the framegrabbers will generate a pulse for every frame acquired (STARTFRAME?) that can be sent over the RTSI bus to be used as a timing signal for a DAQ card.

Chances are, your frame rate is fixed and you know what it is or you can measure it once. Then just use that value for your DAQ rate, and they are synchronized, or close enough for practical use.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 4
(3,304 Views)