Model 621 User’s Manual APPLICATION PROGRAMMING INTERFACE (API)
Bristol Instruments, Inc. 26
3 Once the com port is selected, click on “Open.” When the port is opened, the
indicator to the right of the port list will change to a bright green.
Within the .vi, there are two modes of communication available with the 621 Laser
Wavelength Meter.
Get Lambda: Clicking on the “Get Lambda” button accesses the first mode. This
mode consists of sending a single request to the instrument for the wavelength, and
then waiting for a reply. The instrument returns the requested information in the units
chosen on the “Units” pull-down menu.
AutoScan: Clicking on the “AutoScan” button accesses the second mode of
communication. In this mode, the instrument automatically broadcasts every new
wavelength measurement. The wavelength is given as the vacuum value in units of
nanometers. To stop the broadcast of wavelength values, click on the “Stop” button.
When finished with the .vi, click on the “Stop” button if AutoScan is enabled. Then click
on the “Exit” button to halt operation and properly close the com port.
Custom Program Interface - Windows .dll Function Calls
This section describes the remote communication between a custom program and the
621 Laser Wavelength Meter using the Windows dll “CLDevIface.dll” provided on the
NuView Software CD. For information describing the bypassing of the dll and
communicating directly with the instrument from a custom program, see the next section:
Custom Program Interface - Direct Communication.
The 621 Laser Wavelength Meter uses a Silicon Labs CP2101 USB to UART bridge
controller. The drivers are provided on the NuView Software CD, and must be installed
before remote communication can occur. This installation was done during the Software
Installation described in Section 2. The device must first be opened using the
CLOpenUSBSerialDevice command. This command returns a DeviceHandle that will be
used for all other commands. The port must be closed at the end of your program by
using a call to CLCloseDevice.
The following files will need to be examined and compiled with your custom program.
These files are found on the NuView Software CD in the Bristol Wavelength Meter folder.
CLDevlface.dll
cldevdll.h: In the Programming Interface folder.
CLDevlFace.lib: From the Microsoft_C folder, within the Libraries folder.
CLDevlFace.lib: From the Borland_C folder, within the Libraries folder.
DECLSPEC int __cdecl CLOpenUSBSerialDevice(int ComNumber);
Function:
Opens the device using a USB Serial Port Interface.
Parameters:
ComNumber: the windows COM port number where the USB driver is installed.
Returns:
A valid CLDevice handle number, or –1 on failure. This device handle will be
used with all commands to identify the port.