It's difficult to pinpoint without any code posted. However, a sluggishness that increases with run time can be a symptom of a program that keeps resizing and/or copying fairly big arrays. Can you post some of the code?
Also, there may be a different approach that will let you hardware-capture excess data, then extract the subset of interest in a post-processing step. This way you can be sure not to miss any points.
The idea would be to perform a buffered analog acquisition of your photocell(s), using the encoder pulses as an external scan clock. There are shipping examples that show how to do such things, and I think the Lab-PC-1200AI should support them.
You could set up an acquisition buffer a bit bigger than the # of encoder pul
ses in your boom's range of travel. After collecting one scan for each encoder position, you can then extract data at or around the positions of particular interest. Just note that the data at index i corresponds to your previous method's position i+1.
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.