This document gives a short summary of using the ASI command set to achieve Z-stacks using the ARRAY firmware module; refer to the programming manual for full explanations of these commands. You can check to see if the firmware has the ARRAY functionality using the BU X command, if one of the lines in the reply is ARRAY MODULE
then you are set. Contact ASI if you need different firmware.
Depending on the end application, it may be better to use either the ZS command or ring buffer module. The advantages of this approach is that it does not require TTL signaling as ZS does, and avoids having the high-level software generate and load an array of points as the ring buffer approach requires.
The array module was created to automate scanning a 2D grid of positions, for example to image an extended area by moving between multiple fields and snapping an image at each location. This document shows how to use this functionality to perform Z stacks.
The array module uses the X and Y axes by default, so we will direct it to use the Z axis instead. Also, we will collapse the 2D array into a 1D array.
The axis selection is done using the command SN and the resulting selections apply to both SCAN and ARRAY firmwares (only one is usually present at a time). For example, by sending the serial command SN X=2 Y=0 Z=1
we set the Z axis as the primary axis and X as the secondary axis (which will be collapsed). Note that the AR and AH commands depend on the axis selection being correct, so do this step first.
Collapse the array to 1D by sending the serial command AR Y=1 F=0
, which sets only 1 point in the secondary axis, and just to be safe, gives an increment of 0.
Define the Z-stack moves by sending the serial command AR X=<num points> Z=<delta>
where delta is specified in millimeters.This command and the previous one can be combined into a single one setting all 4 of the parameters of AR.
Select the dwell time at each point by setting RT Z=<dwell time>
, where the dwell time is specified in milliseconds.
Use the AH
command to set the home or start position of the array. If you send AH
command without arguments the current position is set to be the home position. Or you can set the home position for your primary axis by sending AH X=<position>
where the position is given in millimeters.
All of the settings described here can be saved so they will be available on controller power-up; to do this send the SS Z command.
Once everything has been set up, simply send the command AR
(without any parameters) to start the stack.
It is easy to get a TTL output indicating when the stage is at the desired position; this is useful, for example, to trigger a camera at each position. Set that up using TTL Y=2. A delay between move finish and the TTL output signal can be added using the WT command, eg
for a 100ms
settling delay on the Z axis send WT Z=100
.
To repeat the stack indefinitely until another trigger is received, set RM F=3
which enables the auto-repeat mode for the ARRAY firmware. In this case, sending AR without parameters is used to both start and stop.
To repeat the stack a fixed number of times, define a 2D array with an increment of 0 in the collapsed direction. In this case, set AR Y=<num repeats> F=0
and select either raster or serpentine mode using the SN F command.