OP-SDK |
OPL-SDK Programmer's Guide and DLL Function DocumentationTable of Contents
PrerequisitesPrior to being able to program with the DLLs and communicate with the OPXXX series units, the USB drivers must be installed. The USB driver is an intermediary and facilitates the USB to serial communication from the DLL to the unit and vice versa. For the drivers and instructions on how to install them, please visit http://www.optotest.com or contact optotest customer service at customerservice@optotest.com. The OPLxxxM.DLL must be placed in a location within the search path of the executable that is referencing it. This is typically in the root folder of the executable itself or in the System32 or SysWoW64 folder depending on executable and OS bitness. General ConventionsThe DLLs themselves are writtin in Delphi/Pascal, as such, this documentation is based on Delphi/Pascal syntax. For cross-language compatibility, the functions use the STDCALL calling convention.Data TypesThe following table shows the data type equivalents in various common programming languages:
Parameters By-Value or By-Reference
Function AliasesEach function can be called either with the "OPXXX_" prefix or without. For example, the "OP930_RemoteMode" function can also be called using just "RemoteMode". Some functions may have other aliases and will be noted in their description. Unit Model Compatibility
*Compatibility depends on hardware configuration. Control of Multiple DevicesMultiple devices can be connected to the computer if the computer itself has multiple USB ports or by connecting to an external USB hub. Multiple hubs can be cascaded per manufacturer's specifications. When controlling multiple OptoTest devices, the following sequence is recommended (replace the "OP710_" prefix as needed):
It is recommended to use the information from the sequence above to build a look-up table of device number to serial number and USB handles. This will facilitate switching control of devices using OP710_SelectModule. To switch between devices, do the following:
Thread SafetyThese functions are not thread-safe. Please exercise caution when using it in a threaded application. Make sure only 1 thread or asynchronous process is communicating to a unit at a time to avoid miscommunications. Generated by PasDoc 0.15.0. |