Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There is a sample AFM plug-in dialog called "AFMTestSampleAFMDLL", located in the samples directory. The sample code is in C++ and includes VS .NET 2003 visual studio project files. Please refer the "DialogDll" sample code for the original (non-AFM specific) Dialog Plug-in DLLsDLL. In this sample the SampleAFMDLL the "miAFMLib.cpp" and "miAFMLib.h" files are AFM specific and the User/ Developer needs to modify to fit their requirements. Here is some suggested functionality for AFM specific code.
/////////////////////////////////////////////////////////////////////////////
// miafmlib.cpp : Defines the entry point for the DLL application :
//
// Abstract:
// ---------
// Control the autofocus mechanism (AFM), if present.
// It is anticipated that this class will control any type of AFM,
// automatically detecting which is present.
//
// Classes:
// --------
// CAFMechanics
//
// Methods:
// -----------------------
// miAFM_Open()
// miAFM_Cloase()
// miAFM_GetParameters()
// miAFM_SetPosition()
//
//
/****************************************************************************

...

DevWare Sensor Control page

Image Modified
Figure 1. Auto Focus Page in the DevWare Sensor Control Dialog.

The above control page become active in DevWare once the AFMTest.dll plug-in is added to the plugins directory of DevWare. Refer to the document The Dialog Plug-in API for DevWare for more information.

It allows the user to manually adjust the actuator position of the mechanical device, or to enable auto focus, which uses DevWare's built-in AF algorithm.

DevWare AFM Dialog Plug-in User Interface

Image Modified
Figure 2. The Sample AFM Plug-in Dialog GUI.

The following dialog window becomes available once the AFMTest.dll plug-in is added to the Plugins directory in DevWare. Refer to the document

...

The Dialog Plug-in API for DevWare for more information.

It allows the user to specify the default values for the AFM plug-in. The user can modify the user interface in order to include controls and UI elements that are specific to their needs.

auto focus algorithm

The AF algorithm in DevWare needs these parameters:

Maximum Position: The maximum position the actuator can move.
Minimum Position: The minimum position the actuator can move.
Big Step: The Coarse actuator movement to get the focused position.
Small Step: The fine actuator movement to get the focused position.
Gap Step: The reverse movement after the best coarse focused position is reached.