I've written a program to control a THORLABS 50mm translation stage with an incorporated optical encoder using an activeX control in labVIEW 7.1, the problem is - everytime I execute it labview crashes. The motor controller is a THORLABS BSC103 (3-channel)
This stage is going to be used to postion a lens for a laser so I have included in the program an option to calibrate the encoder the first time the program is run, then a rough scan across the stages' range to determine the rough area where the laser is focused, this is stopped manually by the user when this area is reached. The next part allows the user to jog forwards and backwards to focus the laser more finely and then there's a manual stop control when the best focus is acheived.
I know my program gets as far as verifying communication with the hardware but unfortunately i can't tell which part is causing the crash.
So far I've tried:
1) Using probes, but for some reason they are greyed out when i right click a wire so I can't do that
2) The MG17logger control to display the event log in the front panel, except that when it crashes that no longer displays
The stage does move when I execute the program but I have no idea what it's doing, the first thing it should do is move home whether 'calibrate' is selected or not and it moves so slowly (you can't tell unless you touch it that its moving at all) I doubt its functioning correctly.
I've attached my code for inspection in case anyone can spot something I've done thats crashing it.
Thanks
Jen