User Tools

Site Tools


commands:zs

Command:ZS

MS2000 or RM2000 syntax
Shortcut ZS
Format ZS [X=dZ] [Y=num_slices] [Z=mode] [F=stack_timeout]
Remembered Using SS Z
Tiger syntax
Shortcut ZS
Format [addr#]ZS [X=dZ] [Y=num_slices] [Z=mode] [F=stack_timeout]
Type Card-Addressed
Remembered Using [addr#]SS Z

X: dZ: The amount to move each slice in 10ths of microns (ASI units).

Y: num_slices: The number of slices in the Z-stack, the maximum value is 32767. Prior to MS2000 v9.50 and Tiger v3.43+ the maximum number of slices is 127.

Z: mode: Select between a sawtooth or triangle waveform for stage motion. The default mode is the sawtooth waveform.

F: stack_timeout: The maximum allowed time in milliseconds between TTL input pulses. The default value is 500, and the max value is 32767.

This command sets parameters for use with TTL triggered Z movement. User must also set TTL X=4 for this trigger mode to be active. When a positive TTL edge is detected, the focus axis is moved by an amount dZ (expressed in 10th microns units). Note that internally the amount dZ is actually stored as a multiple of the encoder unit, e.g. ~22 nanometers for a 4 TPI stage with rotary encoders, or 10 nanometers exactly for most linear encoded stages. This move distance is repeated for num_slices TTL triggered moves. If mode=1, the stage will step in the opposite direction for n moves, then turn around again, repeating a triangular waveform cycle. If mode=0 the stage will return to the original position after num_slices moves and repeat a saw-tooth waveform cycle.

The current position when the first TTL pulse is received becomes the center of the stack as well as the position that the stage returns to after the timeout duration.

The stack begins with a move to the negative extreme if dZ is positive and moves in increasing position. To reverse the polarity use a negative dZ.

Note that the total range traversed during the stack is dZ*(num_slices-1).

MS2000 9.51 and Tiger 3.44 firmware: When you send the ZS command it converts from ASI units to encoder counts, if this internal value is an odd number, then the travel range can be off by 1 encoder count due to rounding issues.

The axis moved by the TTL is the designated “focus index” (also the axis used for CRISP among other things). Use UNLOCK F to read or set the axis letter corresponding to “focus index”. Note the setting has to be changed, settings saved, and the controller reset or power cycled for the new setting to take effect. If the controller has a piezo but no motorized focus drive then the piezo axis should be set as the “focus index”. If both are present the “focus index” normally defaults to the piezo. Prior to Tiger v3.44 the ZS command would always move the z index rather than the focus index.

This is not the only way to perform a Z-stack using ASI hardware, the ring buffer module can be setup to do Z-stacks as well.

Backlash : ZS routine also performs the backlash compensation move for each step. For step size smaller than 10 microns, this might result in issues like irregular step sizes. Consider disabling Command:BACKLASH for smaller step sizes.

Stack Timeout : If the TTL frequency is less than 2Hz, then the controller might consider it a stack time out condition. Consider increasing the stack timeout to accommodate the slower TTL frequency, to avoid any issues.

Reply

If there are no errors, a positive reply of :A will be returned. Example

Tiger Example
The focus drive axis is at card address 2
2ZS X=10 Y=20 Z=1
:A
MS2000 Example
ZS X=10 Y=20 Z=1
:A

Setup to do twenty 1 micron slices with triangular pattern.

Graph of the Z position data
Here is an example of sending 20 TTL pulses to the controller using the settings ZS X=10 Y=10 Z=0 F=1000. This graph was created using MS2000 firmware version 9.51. In earlier versions of the firmware this graph would go from -50 to 40, rather than -45 to 45.

Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181
commands/zs.txt · Last modified: 2024/02/12 13:18 by brandon