Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

XY-Stage control and xy-coordinates

Hi everyone,

I'm using a 2-axis linear stage from Zaber technologies, and I want to be able to input xy-coordinates to dictate where the stage moves. The problem that I'm noticing is that the stage doesn't wait until it has reached one set of xy-coordinates until it starts moving towards the next one. Can anyone give me some tips on how to improve the timing?

Image of the block diagram here: http://imgur.com/a/9lcwY

Thanks for your help!

0 Kudos
Message 1 of 3
(2,590 Views)

Hi atavasoli,

 

It sounds like you need to have a case that waits for it to read that it has reached the set of xy-coordinates before writing new coordinates. You could do this with a case structure with an "equal? function" and a case selector. A much more scalable way to accomplish this would be to implement a state machine architecture with separate states for writing and reading coordinates.

 

Here is some information on state machine architecture: https://www.ni.com/en/support/documentation/supplemental/16/simple-state-machine-template-documentat... 

Nolan H.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,550 Views)

Hi! Looking at your code, you might want to consider updating your drivers. If you use the T drivers, use request command.vi. there's a previous post by Don_Kirkby (old Zaber engineer) that expands on not using Read Write Commands. If you use Zaber A drivers, you can use the move.VI along with the Check for Idle.VI. that will force each axis to move independently from one another. If you want to move in a coordinated manner, consider setting up a streaming profile. This feature is new to Zaber, so it might help to reach out to them for example code. Good Luck!

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