Thorlabs' APT™ Suite of controllers includes a range of compact drivers, high-power benchtop controllers, and 19" rack-based units that, together, control our range of precision stages and actuators and support motion control from tens of centimeters to the nanometer range. The line of products includes stepper motor and DC motor controllers, closed-loop and open-loop piezo controllers, strain gauge readers, and solenoid drivers, together with a sophisticated feedback controller (NanoTrak®) that fully optimizes coupled optical powers in a wide range of alignment scenarios. All of our controllers are supported by unified PC-based user and programming APIs (the APT™ software suite) that enable high-level custom applications to be constructed effectively and quickly. Thanks to the USB connectivity implemented on all of our controller units, it is extremely easy to link multiple units together to realize a multi-axis motion control solution for many positioning and alignment needs.
LabVIEW can be used to communicate with any APT-based controller via ActiveX technology. In the program, the user can build an interface, known as a front panel, using a set of tools and objects and then add code using graphical representations of functions to control the front panel objects. The LabVIEW tutorial provides some information on using ActiveX to create control GUIs for APT-driven devices within LabVIEW. It includes an overview with basic information about using APT-based controllers in LabVIEW and explains the setup procedure that needs to be completed before using a LabVIEW GUI to operate an APT-based device. The page also has links to download LabVIEW virtual instrument (VI) examples provided by Thorlabs to help you get started with creating programs for your controllers in LabVIEW.
A comprehensive guide to using LabVIEW with APT can be downloaded here.
In a general sense, ActiveX Controls are reusable software components that supply both a graphical user interface and a programmable interface. Many of these controls are available for Windows applications development, providing a large range of reusable functionality including manipulating image files, connecting to the internet, or simply providing user interface components such as buttons and list boxes. With the APT system, ActiveX Controls are deployed to allow direct control over (and also reflect the status of) the range of electronic controller units.
Based on ActiveX interfacing technology, an ActiveX Control is a language independent software component. In this way, ActiveX Controls can be incorporated into a wide range of software development environments for use by client application software developers. Development environments supported include Visual Basic, LabVIEW, Visual C, C Builder, VB.NET, and C#.NET. For examples, see the Interfaces tab.
Within an application, each occurrence of an ActiveX Control is called an instance. At design time (i.e., when authoring a software application), developers will drag and drop many instances of Controls onto one or more application windows, positioning and re-sizing as required to achieve a particular layout. Control settings known as properties (described below) are also altered at design time as required. At 'run time' (i.e., when running the software application), the Controls are then available for direct user interaction (if they have a user interface; some do not), often with little extra programming required by the software developer.
The ActiveX Control GUI Interface for the APT Stepper Controller
The programmable interfaces of an ActiveX control are comprised of three different entities: Methods, Properties, and Events (described below).
In the case of the APT system, ActiveX Controls provide a very convenient package of software functionality, whereby a single Control can supply all of the user interface and associated programmable functions relating to a particular hardware unit.
Consider the ActiveX Control supplied for the APT stepper controller unit shown to the right. This control provides a complete user graphical instrument panel to allow the motor unit to be manually operated, as well as a complete set of software functions to allow all parameters to be set and motor operations to be automated by a client application. The instrument panel reflects the current operating state of the controller unit to which it is associated, displaying parameters such as motor position.
Updates to the panel take place automatically when a client application is making software calls into the same control. For example, if a client application instructs the associated stepper motor control to move a motor, the progress of that move is reflected automatically by changing position readouts on the graphical interface without the need for further programming intervention.
A 'Method' is the ActiveX terminology for a software function: Methods are called, passing any necessary parameters in the same way as a function would be called. In the APT system, Methods can be used to set and retrieve hardware settings, initiate hardware actions (e.g., moving motors, switching feedback loop modes, etc.), and determine the configuration of hardware units attached to the host controller PC.
A 'Property' is essentially a parameter setting associated with the ActiveX Control. Properties can be 'read only' or 'read/write' and can be accessed at design time (depending on the development environment, often in the form of a properties window), as well as run time.
The APT system has few properties relating to hardware specific settings. Rather, most relate to generic property values found on all controls such as Left, Top, Width, and Height.
However, the HWSerialNum property is found on many APT Controls and is the primary setting that relates a specific ActiveX Control instance with a particular physical hardware unit. Further details on using this property can be found in the reference section of the APT Server help file.
An 'Event' is the name given to a notification that is made to the host client application by an ActiveX Control, such as a call made by the Control to a Method implemented by the client application. This control-callable Method is more commonly referred to as an 'event handler,' and the process of calling this event handler is typically referred to as 'firing an event'.
An ActiveX Control will fire an event when it wants to inform the client application that some action, state change, or other system event has occurred. In the case of a simple button control, an event might be fired when the user clicks on the button. An event handler (implemented in the client application) will typically contain code that has been written to handle the fired event. For example, in the case of a button Control, the 'Click' event handler may display some form of message to the user.
The various Controls within the APT Server system are designed to fire events when certain important hardware events have occurred (e.g., when a motor has finished moving, a MoveComplete event will be fired). The associated event handler will then handle this change of state (e.g., measure a power level and then initiate a move to the next required position).
The APT™ (Advanced Positioning Technology) family covers a wide range of motion controllers ranging from small, low-powered, single-channel drivers (such as the T-Cubes) to high-power, multi-channel, modular 19" rack nanopositioning systems (the APT Rack System).
All controllers in the APT family share a common software platform, the 'APT System Software', which is available on our APT software download page. A support package, containing a wealth of information on using and programming these Thorlabs products is also available.
By providing this common software platform, Thorlabs has ensured that users can easily mix and match any of the APT controllers in a single application, while only having to learn a single set of software tools. In this way, it is perfectly feasible to combine any of the controllers from the low-powered, single-axis to the high-powered, multi-axis systems and control all from a single, PC-based unified software interface.
The APT System Software allows two methods of usage: graphical user interface (GUI) utilities for direct interaction and control of the controllers 'out of the box', and a set of programming interfaces that allow custom-integrated positioning and alignment solutions to be easily programmed in the development language of choice.
A range of video tutorials are available to help explain our APT system software. These tutorials provide an overview of the software and the APT Config utility. Additionally, a tutorial video is available to explain how to select simulator mode within the software, which allows the user to experiment with the software without a controller connected. Please select the APT Tutorials tab above to view these videos, which are also available on the software cd included with the controllers.
APT GUI Screen
The APT video tutorials available here fall into two main groups - one group covers using the supplied APT utilities and the second group covers programming the APT System using a selection of different programming environments.
Disclaimer: The videos below were originally produced in Adobe Flash. Following the discontinuation of Flash after 2020, these tutorials were re-recorded for future use. The Flash Player controls still appear in the bottom of each video, but they are not functional.
Every APT controller is supplied with the utilities APTUser and APTConfig. APTUser provides a quick and easy way of interacting with the APT control hardware using intuitive graphical control panels. APTConfig is an 'off-line' utility that allows various system wide settings to be made such as pre-selecting mechanical stage types and associating them with specific motion controllers.
APT User Utility
The first video below gives an overview of using the APTUser Utility. The OptoDriver single channel controller products can be operated via their front panel controls in the absence of a control PC. The stored settings relating to the operation of these front panel controls can be changed using the APTUser utility. The second video illustrates this process.
APT Config Utility
There are various APT system-wide settings that can be made using the APT Config utility, including setting up a simulated hardware configuration and associating mechanical stages with specific motor drive channels. The first video presents a brief overview of the APT Config application. More details on creating a simulated hardware configuration and making stage associations are present in the next two videos.
The APT Software System is implemented as a collection of ActiveX Controls. ActiveX Controls are language-independant software modules that provide both a graphical user interface and a programming interface. There is an ActiveX Control type for each type of hardware unit, e.g. a Motor ActiveX Control covers operation with any type of APT motor controller (DC or stepper). Many Windows software development environments and languages directly support ActiveX Controls, and, once such a Control is embedded into a custom application, all of the functionality it contains is immediately available to the application for automated operation. The videos below illustrate the basics of using the APT ActiveX Controls with LabVIEW, Visual Basic, and Visual C++. Note that many other languages support ActiveX including LabWindows CVI, C++ Builder, VB.NET, C#.NET, Office VBA, Matlab, HPVEE etc. Although these environments are not covered specifically by the tutorial videos, many of the ideas shown will still be relevant to using these other languages.
Part 1 illustrates how to get an APT ActiveX Control running within Visual Basic, and Part 2 goes on to show how to program a custom positioning sequence.
Full Active support is provided by LabVIEW and the series of tutorial videos below illustrate the basic building blocks in creating a custom APT motion control sequence. We start by showing how to call up the Thorlabs-supplied online help during software development. Part 2 illustrates how to create an APT ActiveX Control. ActiveX Controls provide both Methods (i.e. Functions) and Properties (i.e. Value Settings). Parts 3 and 4 show how to create and wire up both the methods and properties exposed by an ActiveX Control. Finally, in Part 5, we pull everything together and show a completed LabVIEW example program that demonstrates a custom move sequence.
Part 1: Accessing Online Help
Part 2: Creating an ActiveX Control
Part 3: Create an ActiveX Method
Part 4: Create an ActiveX Property
Part 5: How to Start an ActiveX Control
The following tutorial videos illustrate alternative ways of creating Method and Property nodes:
Create an ActiveX Method (Alternative)
Create an ActiveX Property (Alternative)
Part 1 illustrates how to get an APT ActiveX Control running within Visual C++, and Part 2 goes on to show how to program a custom positioning sequence.
For assistance when using MATLAB and ActiveX controls with the Thorlabs APT positioners, click here.
To further assist programmers, a guide to programming the APT software in LabVIEW is also available here.