LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to do a XYZ Scanning?

Solved!
Go to solution

Hi all,

I want to do a xyz scanning by a xyz stage, and wrote a vi to mimic the scanning process (without hardware part). When the scanning is starting, the stage would move to the x,y,z starting position. And the xy scan order as follows,

Capture.JPG

My vi is redundancy, but I do not know how to simplify it. Can anyone help me to optimize it?

 

Thanks,

Mei

0 Kudos
Message 1 of 16
(5,145 Views)
  • Create three ramps (x, y, z) using "ramp pattern".
  • Create a stack of three FOR loops, indexing into the ramps from the beginning or the end based of odd/even index [i] and N.
  • Place all indicators in a location where they change, no local variables or case structures needed.

See how far you get.

0 Kudos
Message 2 of 16
(5,126 Views)

Here's a very simplified version that does YX. Expanding to XYZ is trivial, just another loop and tweak boundary conditions as desired.

 

You would use the current X,Y(,Z) integers to index into your ramp arrays using "index array".

 

ScanXY.png

Message 3 of 16
(5,098 Views)

For point to point translations like that, i typically use while loops and compare the current position to the desired.  It makes it easier to interrupt but you could just use a conditional terminal on the for loop.  Having the points calculated prior to execution probably makes the code look a little cleaner, but is a little less intuitive looking at the diagram in my opinion.  But I'd definitely use a cluster and typedef it for the scan paramters.



Bruce K

Not as smart as many other peepz on here....
0 Kudos
Message 4 of 16
(5,086 Views)

@altenbach wrote:
  • Create three ramps (x, y, z) using "ramp pattern".
  • Create a stack of three FOR loops, indexing into the ramps from the beginning or the end based of odd/even index [i] and N.
  • Place all indicators in a location where they change, no local variables or case structures needed.

See how far you get.


Thanks, altenbach! I modified the vi as your advice, can you please help me check whether I need to revise more ? And, I want to save the scan data (3D or more dimensions array) as a .txt or . xls file. Can you give some suggestion about this? I do not know how to start it.

 

Thanks,

Mei

0 Kudos
Message 5 of 16
(5,065 Views)