06-06-2013 02:12 PM
Hi,
I have a Labview program slightly modified from a Thorlabs example for controlling the APT DC Servo Controller (TDC001), which is connected to a motorized actuator. Depending on which button you click on the front panel, you can home the motor, set the moving parameters (velocity, final position, etc.), or move the motor according to the parameters. As the motor moves, the current position of the motor is displayed on the MG17Motor panel.
Everything works perfectly except for one small annoying problem: about 10-15 seconds after the motor starts moving (either homing or moving to a desired position), the front panel would freeze and the title would say "not responding". The MG17Motor panel would also stop updating the current position. Meanwhile, the motor continues to move at the pre-set pace until it reaches its destination, so the motor is unaffacted by the freeze. Once at the destination and the motor stops, the front panel would unfreeze and the display would show the updated current position, which is of course the pre-set final position.
When the motor starts moving, the front panel is still not frozen. It's only after about 10 seconds that the panel starts to freeze. The CPU and memory don't seem to go up much. The CPU is at several percent in total and the memory is about 40% in total.
I'm wondering, what's causing this problem and what can be done to solve it? I'm planning to run long scans and would very much like to have the current position of the motor shown to me as the motor moves. Any suggestion would be much appreciated!
-ywli
06-07-2013 12:45 PM
Hi Ywli,
I opened up that VI but I'm not sure how to see the same MG17 motor panel that you show in the attached .jpg's, as it's not showing up on my end. Where did you get the driver for it, as I couldn't find one on the ni.com/drivers page.
06-07-2013 04:10 PM
Hi Basil,
Thanks a lot for you reply! You need to download the APT software for the MG17 motor and the related methods to show up. You can download it through Thorlabs here:
http://www.thorlabs.com/software_pages/ViewSoftwarePage.cfm?Code=APT
I downloaded the Software for 64bit Windows version.
Under the "software and Support" tab, they also have an APT support package in case you would like to know more details.
Thanks again and looking forward to hearing from you again.
-ywli
06-10-2013 02:19 PM
Hi Ywli,
Thanks for that information. While I download that could you go into NI MAX and create a technical report and attach it on reply? You can go into file and press create technical report. Then save the report and attach it. Also, does the original piece of code work but the modified one doesn't or do both not work properly? Do you know what changes you made?
06-11-2013 09:40 AM
Hi Basil,
Please find attached the report. The only change I made is adding the "SetVelParameter" method and the controls connected to it. However, the same problem exists in the original example VI too, so I don't think it's due to the change I made.
Thanks,
ywli
06-12-2013 02:38 PM
Hi Ywli,
I have downloaded it and I'm not sure why it would do that with you. It's responding fine with me but of course I don't have the hardware so that might be an issue. Have you tried it on a different computer?
06-19-2013 12:04 PM
Hi Basil,
Sorry for the late reply!
I recently had a chance to try on a different computer, and the result was inconsistent: sometimes it worked smoothly, and sometimes it froze like what had happened to my computer before. Generally, it tends to freeze (same for both computers) when the scan is slow and long, eg. maximum velocity of 0.005mm/s over a range of 2mm. Do you think this inconsistency has to do with the computer itself or somthing in the methods?
Another thing: if I press the stop button in the middle of a motor movement, the front panel would definitely freeze. Sometimes, even moving the mouse around without clicking on anything would trigger a freeze. I thought maybe the computer is very busy during a motor run, but when I checked the task manager, the labview program isn't really taking much memory, and definitely very little CPU. I'm not quite sure where this freezing problem comes from.
Thanks again,
Ywli