10-11-2012 07:27 AM
I am using the BPC203 to control the motion of the nanomax 311D/M stage.I was able to change the position of the stage according to step size by writing the code in labview using ActiveX control. I want code to control the speed of the motion of the stage, for example if my step size is 1 micron, I want stage to go as less speed as possible without any jerks (say 10 second to move this step size). I realised that slew rate could control the voltage input of Piezo there by speed and called "setslewrate" method into invoke node of the piezo and set the closed loop slew rate as 0.75 (I assumed here units are: V/sec not volt/millisec) and waited for the loop to go slow with my slew rate as I have not connected the hardware to the labview but loop is running with processor speed not with slew rate. does it indeed possible to simulate the slew rate in Labview without hardware integration? Is there is another mentod to control the speed of Piezo? Replies are highly welcomed. Please find attahced block diagram image FYI..
Solved! Go to Solution.
10-12-2012 04:41 AM
Hi Mahendar,
As mentioned previously, as I'm not able to access the hardware, it's not possible to simulate your program and observe the issues you're having. It is possible to simulate slew rate in labview, however it would be dependent on simulated hardware.The issues you're having seem to be related to transfering data to your hardware. Have you tried contacting Thorlabs at +44-1353-654440 or techsupport.uk@thorlabs.com ?
From your previous post, listing a similar issue (here: http://forums.ni.com/t5/Motion-Control-and-Motor-Drives/How-can-I-make-MG17Piezo-ActiveX-automated-w...) I can see you're still having a similar problem.
In terms of your code, when you say you assumed that the units of slew rate were V/sec, if you're uncertain it's best to try a few different values. Also, if the hardware isn't connected to your software, it's not likely then that you would see the effects of the voltage change within your loop. The voltage change would have an external effect rather than an internal one. Furthermore, if you implement timing in your loop (simply by using a wait function within while loop, no sequence structure required), your program would consume less processing power. Other than that, your program seems functional so it would be best to escalate the issue with thorlabs.
10-12-2012 06:16 AM
Hi Shalimar
Thanks for reply. I did small excercise with slewrate in code and realized that defauld units are V/ms. When I call "setslewrate" method, slew rate is chagning in the activeX control as per my input but I can not realize the speed of motion as I did not connected the hardware to code. I am also thinking to go with substepsize concept to make the motion slow. For example, if my pixel size is 100nm, I want piezo to move 10nm for each step and 10 times to reach pixel size. For this I plan to write the code with two loops. when I tried with while loop in while loop, I could not stop two loops at once. When I tried to stop loop outside, inside loop is still running though I connected stop terminal to loop inside. Please find attahced image and let me know ho can I stop two loops at a time by pressing the stop button of outside loop. Thanks you very much for your help.
Mahendar
10-12-2012 07:13 AM
Hi Mahendra,
Glad to hear you've sorted out alot of the issues. The stop button problem is fairly straightforward. You've put in 2 stop buttons, which means you'll need to press each button to stop each loop. Seeing as you want to stop them both simultaneously, what you need to do is create a local variable. (Search 'Local Variable' in the labview help folder for more information on what they are).
To create the local variable in this case, remove one of the stop buttons. Then, right click on the remaining stop button and go to Create>Local Variable from the drop down menu. Then, simply attach this new variable to where your deleted stop button was.
10-23-2012 03:36 AM
Hi Shalimar
I have written code for 1D motion now I want it converted to be 2D (X and Z directions). I have been given by Thorlabs 3 different input modes for 3 axes motion with 3 seperate serial numbers. After moving along X-axis, I want it to move along Z-axis for one step size and continue in X-axis for 20micron distance in reverse derection (if not possible, like a raster scanner also okay for me). I expect suggestion from you about labview code to make it 2D. Please find attached image of my code.
Mahendar
10-23-2012
08:13 AM
- last edited on
04-27-2025
10:38 PM
by
Content Cleaner
Hi Mahendar,
I have a couple suggestions. The first is that you can have a parallel loop that does the same as your initial loop, but change the channel so that it works with the Z direction.
Or, you could create a new VI that deals with your Z direction. Then, you can create sub VI's out of your 2 vi's. Then, call your sub VI's from a main VI so that it executes one after the other. Here's a labview help link that shows you how to create sub VIs: https://www.ni.com/docs/en-US/bundle/labview/page/creating-subvis-from-sections-of-a-vi.html