LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

rotate a stage using SMC100 in LabWindows

I am trying to control a rotating stage through the newport SMC100 motion controler with Labwindows. I manage to move the table and read the output angle. My problem is that, when the stage is rotating, it doesn't wait to have finished the rotation before sending the next command.

Therefore, I implemented a while loop for it to wait the end of the motion before continuing in the program:

 

while(Tout>valueplus || Tout<valueminus)
     Tout=read_position();

 

 

It works fine from angles 20-360 but is very slow in reading values of angles from 0-20 degrees! I suppose there is a problem with my read_position function.

 

Anyone would have a function that works fine for EVERY angle?? There are LabView drivers but I wasn t able to find any for LabWindows..

 

Thanks

0 Kudos
Message 1 of 3
(3,166 Views)

Hi,

 

While I don't a function I would suspect that the difficulty might be related to your interval valueplus...valueminus: how large are these values? And what value will you get back for an angle of 365 degrees, 5 or 365?

0 Kudos
Message 2 of 3
(3,165 Views)

Hello,

 

I did not write it myself nor in labwindows. However I have seen source for the SMC100 where the TS? command is used inside a loop until the controller state "Ready from moving" (33)

 

Succes, Jos

 

0 Kudos
Message 3 of 3
(3,141 Views)