User Tools

Site Tools


Command:AFOCUS (AF)

MS2000 and RM2000 Syntax
Shortcut AF
Format AFOCUS X= [% of speed] Y= [travel distance in mm] Z= [Hill Detect enable] F= [Hill Offset]
Remembered Using SS Z
Tiger Syntax
Shortcut AF
Format [Addr#] AFOCUS X= [% of speed] Y= [travel distance in mm] Z= [Hill Detect enable] F= [Hill Offset]
Type Card-Addressed
Remembered Using [Addr#]SS Z

The AFOCUS command will invoke an auto-focus routine using the speed and travel range specified by the previously set X and Y parameter settings. This routine can also be activated by pressing “@” button on most controllers. Entering AF without arguments will initiate the auto-focus routine itself, whereas issuing an AF with arguments will only set the parameters. An auto-focus scan can be canceled with HALT command or by issuing the \ shortcut. When an AF command is issued, the controller only replies after the operation is complete. It returns a :A[###] if the operation was successful, or N-5 if there was an error.

X= Speed. Range is 0 to 100 denoting the percentage of the focus drive’s maximum possible speed to travel during an auto-focus scan. This speed is also used by the AFCALIB (or AFC) command.

Y= Total scan range in millimeters. The focus controller moves down one-half this travel distance, and then scans up the full travel distance. This range is also used by AFCALIB (or AFC) command.

Z= Search type; either 0 or 1. A value of 0 enables Normal mode, while a 1 enables Hill Detect mode. (Z values 2 and 3 are reserved for future use.)

F= Hill Offset. Range is 0 to 100 denoting a percentage of a hill. If the Search Type is Hill Detect, then this setting determines when the scan will end. Once a hill peak is detected, the scan will terminate when past the peak by the Hill Offset percentage value.


:A or Error Reply.

AF X=5 Y=0.1 Z=0
AF X=10 Y=0.3 Z=1 F=10
AF X=200 Z=2

(Error indicates arguments out of range)

:X=10 A

Returns :A [quality#] after operation is complete, an :N-5 if the operation failed, or an :N-50 if the focus drive’s clutch is disengaged (if applicable).

When all of the arguments are omitted, the A is transmitted after the focusing scan has completed. The number in brackets is the difference between focus value when in-focus compared to when out-of-focus. It indicates the quality of focus obtained.

Caution: To protect the optical assembly and sample, ensure that the sample is at least 200 µm away from the optics and that the current position is zeroed, that is, the LCD display shows Z: 0.00000> 0.00000 before sending the AF command to the controller (where Z is the focus axis).

Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181
commands/afocus.txt · Last modified: 2023/08/31 02:03 by brandon