Automation Meets Interferometry
With today’s variety of interferometer applications, it is difficult for standard interferometry software to support the needs of many businesses. The ideal analysis or result is frequently unavailable or requires a multistep manual process to calculate.
If you must repeatedly make the same measurements using a multistep approach or very specific, defined procedures (eg. ISO90001), the process can be time-consuming and prone to human error.
In our experience, companies often struggle with standard interferometer software capabilities, and some require custom software to meet their needs.
|
Most interferometer users could benefit from a scripting or macro language to combine measurement and analysis commands for repetitive multistep tasks. Automating and customizing measurement or analysis tasks offer advantages that can help you use the full capability of your interferometer software. Repetitive testingConsider the test technician working in a production environment. He or she typically tests multiple parts that have the same specifications. Other technicians or engineers also use the test equipment for other applications, and they may leave the interferometer software in an unknown state. Complicated manual multistep measurement processes (involving many spec evaluations, spec comparisons, etc.) offer a real potential for error. This is especially true for unskilled and/or computer-averse technicians. |
Figure1
A typical multistep process might entail these steps:
- Load the application/configuration created for this particular test.
- Perform measurement, ensuring that it is acceptable (complete, repeatable data set).
- Evaluate peak-to-valley in microns and compare with the specification.
- Evaluate the height difference of 15 predetermined areas using 15 different mask files.
- Enter the height difference in boxes for internal log file.
- Log report.
- Fill out paperwork or print screen to report results to customer.
The technician who repeatedly follows these steps could benefit from a method of compressing this repetitive process to a single button click.
Basic Programming
One software package that we have used effectively for custom scripting is MetroPro from Zygo Corp. of Middlefield, Conn. MetroScript is the macrolike scripting language included with the MetroPro control software. For demonstration purposes, we have used this package to illustrate custom scripting and automation concepts. To find out what capabilities may exist with other interferometry software vendors, we recommend contacting them directly.
Like most macro programming languages, MetroScript relies on vendor-provided functions to access the main program features. The language is similar in look and feel to a nonobject-oriented Basic programming language, such as Microsoft QuickBasic.
| Users can write and edit programs with any standard text editor, then run them without a compiler. This type of editing platform eliminates the need to install and learn a new programming language interface. Programming logic uses conditional branching in if/then statements and looping in for/next statements. Goto and gosub/return statements permit additional routings or subroutines. With few exceptions, MetroScript can access objects on the MetroPro screen: buttons (Measure, Analyze, Load Data etc.), setting controls (Tilt, Remove, Filter Type etc.), returning results (Peak-to-Valley, Camera Resolution, etc.), opening and closing windows, loading and manipulating masks, and dialogue boxes and messages.
Figure2 |
|
By calling objects with a script, the user can automate just about any task that can be completed with a series of manual steps in MetroPro. In addition, the scripting language allows the user to create custom result tables, to read and write to text files, to communicate with external hardware over a serial port, to launch an executable program such as DOS commands or other commercial or custom applications, or to handle errors.
Combining MetroPro functions with a programming language allows the user to automate tasks from simple to advanced, limited only by creativity or experience. Those familiar with popular computer programming languages such as C or Microsoft Visual Basic will find that MetroScript lacks their powerful debugging, logic and function capabilities. It does not contain all of the features of other programming languages (eg. case statements, do/loop, etc.), but its capabilities are adequate for most applications.
The reference manual also ignores a handful of programming subtleties that must be learned by experience. For example, the debugger does not detect spelling and case errors in variables. These issues can make MetroScript a user-unfriendly language to program.
However, even those who have little or no programming experience but have some familiarity with MetroPro can write useful scripts with some practice.
Hours to minutes
For example, tasks that can take hours to perform manually might run automatically in minutes with just 20 to 30 lines of code. Also, automating a long measurement or analysis task allows the user to complete other tasks. Finally, automating a complex or lengthy task results in simpler operating procedures and mistake-free data with less training.
The following three examples will help to illustrate some of these advantages:
One application we have found to be an effective use of automation and customization capabilities is scanning measurement height data using a subaperture mask. This test, usually performed manually, can evaluate areas of good vs. bad quality. Applications that use this method include evaluating a parent optic part for the best subpart extraction location(s) or evaluating a part against subaperature specifications.
In a typical data-screening example (Figure 1), the user is searching measurement data for the subaperature with the highest peak-to-valley result. It evaluates the mask at every possible pixel location while keeping track of the location with the highest peak-to-valley figure. At the program end, the software automatically places the mask at the location containing the highest peak-to-valley figure. This type of MetroScript had decreased analysis time five- to tenfold, with only 30 to 50 lines of code.
Another example compares measurement results with specifications, to determine pass/fail status, saving time and operator training in production environments.
Consider a specification that requires analysis of the interferometer data for the radius of curvature, for custom results (eg. sum of various Zernike coefficients), and for root mean square flatness after average filtering. A user could program all or these steps into MetroScript (Figure 2), even ending with a statement that would determine whether the result exceeded specification: ie. if(value > specification then) ... At the end of the analysis, the program would state in a message box whether the part passed or failed. It could also display the results on the screen for customer part printout or write them to a file to retain a record of the analysis.
First, the script retrieves standard measurement results (radius of curvature and Zernike coefficients). Next, it manipulates the standard Zernike coefficient results for direct comparison with the specification. It applies a high-pass, average filter to the data, and returns the root mean square flatness. Finally, it compares these results with the specification to determine overall pass/fail and displays the result in a dialogue box or a custom table (Figure 3).
Figure 3. A customized screen can list all individual results vs. their specifications and display an overall pass or fail result. The screen is clear and concise, containing only results to the application.
A third useful application is data acquisition. Most interferometer operators have had the experience of hitting the Measure button, only to receive an error message or a partial data set. MetroScript can handle general or specific measurement errors, ignore bad measurements and remeasure when necessary. The software also can change the measurement setting between measurements, including alignment, focus and increase scan range, to improve the likelihood of producing a good measurement.
Figure 4. Measurement errors can lengthen the time it takes to achieve full data sets. This simple script automatically remeasures if it does not acquire enough pixels for a valid measurement. It stops after five attempts.
The code for this example (Figure 4) automatically manages errors, requiring 290,000 pixels for a valid measurement. The example allows five measurement errors before the script “gives up” and displays an error message. If the instrument does not obtain 290,000 pixels, it automatically remeasures.
For further information: The authors have posted sample scripts and other capabilities of Zygo MetroScript at www.fanningtech.com and www.jacobiantech.com
Meet the authors: Andew W Fanning of Fanning Technical Services in Canton, NY and David R Fladd of Jacobian Technologies in Goose Greek, SC, are consultants in optical engineering and custom interformetry software programming.
Previously published in Photonics Spectra - August 2001