I am using LabVIEW 6.0 and an older Pentium computer (32MB RAM, Windows 95) to communicate with and command three external motion controllers (RS232 conection) that control a 3-dimensional linear translation stage (three stacked, linear translation stages for XYZ motion; each controller controls one stage). In my application, the stage has a photo detector attached to it, and the LabVIEW program is designed to keep the photo detector at the brightest location in front of a light source.
To achieve this, the LabVIEW program commands (ASCII commands) each controller to continuously read the voltage signal from the photo detector (analog input) and move its stage such that the voltage signal is maximized.
The current version of my LabVIEW program consists of three parallel WHILE loops, each commanding the motion of one stage. In each WHILE loop, the voltage signal is read, compared to the previously read voltage signal, and - depending on whether the difference is positive (signal increases) or negative (signal decreases), the stage is moved either back or forth by a given small distance. The program per se works fine, except that the execution is way too slow. It takes about 3 seconds to execute all three WHILE loops once. Thus, a given stage moves only about every three seconds. However, I need each stage to move at least once per second or less (at least 3 times faster). How can I can increase the speed /responsiveness of my feedback loop program? Is there a more efficient way to program the motion? Or is the hardware limiting the speed? When entering motion commands through “Hyperterminal”, the stages respond immediately. Any advice is greatly appreciated.