LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Efficient descan method?

Hi,

 

I am using PCI-6259 to generate a waveform the drive a 2-D laser scanner and acquire data from a photodetector.

After acquiring 500x500 points, I reshape the data to a 2-D array. 

As the scanning directions of the odd and even rows are different, I have to reverse the data row by row.

 ( Row 1,3,5,...: from left to right, Row 2,4,6,...: from right to left)

Is there an efficient way to do this?

 

In addition, I want the card to acquire data after the scanner stablize at the new position.

(the sampling rate of the output and input are the same, but I want the the acquistion to start slightly later than the output ) 

  

Please advise. Thanks!

 

Best,

Carson 

 

 

0 Kudos
Message 1 of 3
(2,141 Views)

You can take your 2D array and pass it into a FOR loop. If the loop counter is even, pass the autoindexed row back out unmodified. In the loop counter is odd, reverse the autoindexed rowand then pass it out. Given that you aren't adding or deleting data this operation should be done inplace and so be reasonable efficient.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 3
(2,128 Views)

Hi,

 

Mike's approach is probably the most efficient way of manipulating your 2D array. As for the timing of your input and ouput, take a look at one of the examples in LabVIEW. You can find it via Help» Example Finder. From here look in the folder Hardware Input and Output » DAQmx » Synchronization » Multi-Function and you'll find the example called Multi-Function-synch AI-AO.vi. Here, the example synchronizes the two functions. For your application add a DAQmx Trigger Property Node and use the delay property to specify a delay between the output and input. 

 

0 Kudos
Message 3 of 3
(2,103 Views)