05-09-2016 06:07 AM
Hello all!!
I am trying to control the XPS Q8 linear translation stage (300mm) through labview 11. I constructed a VI which communicates my translation stage and moves according to target position which I set. For your reference I have attached my VI.
Present VI runs the translation stage towards the target position continuosly. Once it reaches the target position, the program will end.
Now I need to modify my VI such that stage should moves towards the target position with some time interval instead of running continously.
for example, my target position is to reach 100 mm and I need to stop the stage at every 5 mm for 5 sec.
1 to 5mm with velocity 1 mm/s and stay at 5mm for 5 sec,
Again 5 to 10 mm with velocity 1 mm/s and stay at 10 mm for 5 sec.
Again 10 to 15 mm with velocity 1mm /s and saty at 15mm for 5 sec.......like this.
could you please help to modify my VI.
05-09-2016 07:13 AM
Hi,
I used this Control. To know if stage move is finished, I used the VI "Single Axis Group Motion Status Get" and analyse the out value of motion.status.
You must read the documention about this VI.
1. Set Speed 1 mm/s
2.Start relative Move of 5 mm
2 Get and Analyse the Status until Status value is Ready
3 Waiting user time
4. Last move Yes :Goto point 2 No : goto ppoint 5
5. End
Use the State Machine Framework to code this.
Best regards.
05-09-2016 07:50 AM
Thank you for your reply sir
In relative move, what is the value i should give in " target displacement"? Target position value( 100 mm) or interval value (5mm).
then how to give waiting time??
05-09-2016 07:59 AM
Hi,
Yoiu can also make an absolute move.
Iterate in a loop
1. initial position 0mm
2; Counter = 1
3. Move absolute to Counter * 5
4. Wait standby using Get axis Status
5 Wait 5 seconds
6 Increment counter
6 Counter* 5 > 100 ? Yes : Goto point 7 NO : Goto point 3
7: End
I recommend again to use the State Machine Framework to code this.
Best regards.
05-09-2016 08:03 AM
Sir, could you please explain me about state machine framework. I am not aware of that.
05-09-2016 08:08 AM
You can find help on NI Forum.
To start you can create a new LV project using the template of standard State machine.
tutorial at this link : http://www.ni.com/tutorial/7595/en/
In other case you can use a simple while loop,
Best regards.
05-09-2016 08:17 AM
I could not find " get axis status". Is it " group status get"?
05-09-2016 08:22 AM
I use "Single Axis Group Motion Status Get"
and that analyze the motion status value: See documentation about the value.
Best regards.
05-09-2016 08:32 AM
05-09-2016 08:43 AM
Sorry ,
I have no time acutally to do this.
I recommend you to read the manual at first ( Single axis section),
For my code I used Classes to wrap all necesary VIs to do my functions.
Start to code A VI with absolute move and then a while lopp with GetGroup Status to see the value.
Sorry again best regards.