Below are focuser related commands. All of these commands, except focusersetup require the FOCUSER variable to be set to the name of an ASCOM focuser driver.

The command focuseron must be used before any other focuser command can be used.

All commands set the boolean variable FOCUSERERROR to "true" if an error occurs or "false" if no error occurs.


focusersetup

Syntax: focusersetup

This command displays the ASCOM focuser setup dialog box. From this dialog box, the user can select a specific ASCOM focuser driver and set its parameters. The selected driver is saved to the FOCUSER variable and becomes the active focuser used by ARAP.

focuseron

Syntax: focuseron

This command initiates communication with the focuser. If this operation is successful, the variable FOCUSERCONNECTED is set to "true". All commands that require communication with the focuser must be preceded by this command.

focuseroff

Syntax: focuseroff

This command terminates communication with the focuser and sets the variable FOCUSERCONNECTED to "false".

focuserposition

Syntax: focuserposition position

This command causes absolute-type focusers to move to the absolute "position" (an integer between 0 and the value of the variable FOCUSERMAXSTEP). For relative-type focusers, “position” is a positive or negative number (between 0 and the variable FOCUSERMAXINCREMENT) which causes the focuser to move an amount relative to its current position.

focusertcon

Syntax: focusertcon

This command enables the focuser’s temperature compensation mode.

focusertcoff

Syntax: focusertcoff

This command disables the focuser’s temperature compensation mode.

getfocuserstatus

Syntax: getfocuserstatus

This command queries the focuser driver and updates the variables: FOCUSERPOSITION, FOCUSERSTEPSIZE, FOCUSERTEMPERATURE, FOCUSERMAXSTEP, FOCUSERMAXINCREMENT and FOCUSERTEMPCOMP.


autofocus

This command auto-focuses the CCD camera using one of three methods depending on the value of the AUTOFOCUSTYPE variable:

1. Using FocusMax Software

Syntax for FocusMax: autofocus exptime filterindex timeout <halfflux> <systemfile>

An exposure of "exptime" (up to 60 seconds) is used. The optical filter "filterindex" is used to set which filter is used. If the auto-focus procedure takes longer than "timeout" seconds, it is prematurely aborted. If the optional "halfflux" (up to 20 pixels) is specified, the autofocus is skipped if the star is already smaller than the number specified (in pixels). If the optional "systemfile" is specifed, it is used, otherwise the current system file is used. It is assumed that FocusMax has been configured and calibrated, and that the telescope is pointed at a suitable star. The variables HALFFLUXDIAMETER and BESTFOCUSPOSITION are set. The variable AUTOFOCUSERROR is to "true" if the auto-focus times out or is not successful.

2. Using Planewave PWI3 Software

Syntax for Planewave PWI3: autofocus exptime timeout <prevent_filter_change>

An exposure of "exptime" (up to 60 seconds) is used. If the auto-focus procedure takes longer than "timeout" seconds, it is prematurely aborted. If the optional "prevent_filter_change" is "true", the current filter is used, otherwise PWI3 will use the filter it is setup to use. It is assumed that the PWI3 software has been configured properly and can perform auto-focuses manually and that the telescope is pointed at a suitable star field. The variables HALFFLUXDIAMETER and BESTFOCUSPOSITION are set. The variable AUTOFOCUSERROR is to "true" if the auto-focus times out or is not successful.

3. Using MaxIm DL/CCD Software

Syntax for MaxIm DL: autofocus exptime timeout

An exposure of "exptime" (up to 60 seconds) is used. If the auto-focus procedure takes longer than "timeout" seconds, it is prematurely aborted. It is assumed that MaxIm DL has been configured properly and can perform auto-focuses manually and that the telescope is pointed at a suitable star field. The variable AUTOFOCUSERROR is to "true" if the auto-focus times out or is not successful.