LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving a stage controller

Hi all,

 

I'm new to LabVIEW and I'm trying to move a stage controller so that it can scan a sample in the x and y direction (in a certain pattern - see attached screenshot) and then move one increment up in the z direction and move in the same pattern mentioned previously but in the opposite direction. This is then repeated for the user's input for their desired number of points in the  z direction they wish to achieve, however I'm a bit stuck on what my stop condition should be. Currently I have it at i = number of points in the z direction and not getting much success with this.

 

I am using LabVIEW 2019 64-bit and a Sigma Koki SHOT-204MS stage controller. 

 

Any help would be appreciated 🙂

0 Kudos
Message 1 of 2
(2,006 Views)

Some tips.

 

1.  An 12 frame stacked sequence structure is crazy.  You should turn this into a state machine.  You can problem narrow this down to perhaps 4 or 5 states.

2.  Your number of points should be an integer and not a double.  I don't think it's a problem in this case, but comparing a double float to another number for equality can cause problems because some numbers can't be represented exactly.

3.  You are using Bytes at Port which is wrong 99% of the time.  And you are not giving any time delay between the Write and the check for the number of bytes.  That means you haven't given the device any time to respond.

4.  When your constants or controls or indicators are in \code mode, you should make the display style visible to make it obvious that \r is a carriage return and not a backslash and an "r".

5.  You shouldn't' need any local variables.

0 Kudos
Message 2 of 2
(1,946 Views)