User Tools

Site Tools


commands:afocus

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
commands:afocus [2016/09/07 22:04]
asiadmin ↷ Links adapted because of a move operation
commands:afocus [2019/04/18 23:32] (current)
Line 1: Line 1:
 +====== 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 [[commands:​afcalib|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 [[commands:​afcalib|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.
 +
 +== Response ==
 +
 +<wrap reply> :A </​wrap>​ or Error Reply.\\
 +
 +
 +== Example ==
 +
 +<asi> $ AF
 +:​A<​CR><​LF></​asi>​
 +<asi> $ AF X=5 Y=0.1 Z=0
 +:​A</​asi>​
 +<asi> $ AF X=10 Y=0.3 Z=1 F=10
 +:​A</​asi>​
 +<asi> $ AF X=200 Z=2
 +:​N-4</​asi> ​
 +(Error indicates arguments out of range)
 +<asi> $ AF X?
 +:X=10 A</​asi>​
 +
 +<wrap cmd> AF </​wrap>​ \\
 +Returns <wrap reply> :A [quality#] </​wrap>​ after operation is complete, an<wrap reply> :N-5 </​wrap>​ if the operation failed, or an<wrap reply> :N-50 </​wrap>​ if the focus drive’s clutch is disengaged (if applicable).
 +
 +When all of the arguments are omitted, the <wrap reply> A </​wrap>​ 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 <wrap cmd> Z: 0.00000> 0.00000 </​wrap>​ before sending the <wrap cmd> AF </​wrap>​ command to the controller (where Z is the focus axis).
 +
 +
 +{{tag>​commands autofocus ms2000}}
Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181
commands/afocus.txt · Last modified: 2019/04/18 23:32 (external edit)