User Tools

Site Tools



MS2000 and RM2000 Syntax
Shortcut AFC
Format AFCALIB [X= contrast] [Y= frame offset] [F= switch axis]
Units integer
Remembered Using SS Z
Tiger Syntax
Shortcut AFC
Format [Addr#]AFCALIB [X= contrast] [Y= frame offset] [F= switch axis]
Units integer
Type Card-Addressed
Remembered Using [Addr#]SS Z

The command without arguments will initiate series of auto-focus scans and selects various internal parameters for best focus value. Parameters changed by AFCALIB are the Highlighted Area (AFLIM), Zero Adjust (AFADJ), and ADC Gain (AFADJ). On some focus controllers, the AFCALIB routine can also be activated by holding down the HOME button for longer than 3 seconds. The AFCALIB’s auto-calibration scans use the same speed and travel distance value that were set by the AFOCUS command. NOTE: Please use the HALT command or the \ to cancel an auto calibration – any other method may stop the move but may corrupt your settings.

X= Sets the minimum contrast value. During an auto-focus run, if the controller finds the difference between the maximum and minimum focus value to be less than the contrast value, it declares the run a failure and returns to the starting position. Default value is 10.

Y= Frame Offset, a floating-point constant that maps to a time interval. Changing this number alters the sharpness of focus. The default values are 3.5 for motor driven focus drives, and 3.75 for piezo driven focus drives. This setting compensates for time lags inherent to the video processing.

F= Switch Axis; if your focus controller can control two focus axes, e.g., a motorized drive and a piezo drive, then you may have the option to choose which axis to use for auto-focusing. Every axis that the focus controller controls is assigned a number starting from zero. Check with ASI to determine if this option is available for your system and to get the number for each axis.

Executing AFC alone will begin the Auto Calibration routine. Using AFC with arguments will only set or read back those parameters.


:A or Error Reply

If the X, Y and F arguments are omitted, then an A is returned after the calibration is complete.

AFC X=8 Y=3.75
:X=8 A

Returns an :A 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).

commands/afcalib.txt · Last modified: 2019/04/18 23:32 (external edit)