4.3. OphirPowermeter#

Summary:

Plugin for Ophir Powermeter.

Type:

DataIO

License:

Licensed under LGPL.

Platforms:

Windows, (Linux possible but yet not implemented)

Devices:

Powermeter VEGA from company Ophir

Author:

J. Krauter, TRUMPF SE + Co. KG

4.3.1. Overview#

The OphirPowermeter is an itom plugin which is used for Powermeters from Ophir. It supports the RS232 and USB connection types. To use the RS232 variante, you must initiate first a serialIO plugin and use it as an initParameter.

Tested devices: 1-channel VEGA (USB, RS232) with a Thermopile head.For the USB type it is necessary to install the COM object which comes with StarLab form Ophir.Download page: https://www.ophiropt.com/laser–measurement/software/com-object

4.3.2. Initialization#

The following parameters are mandatory or optional for initializing an instance of this plugin:

  • connection: str

    Type of the connection (‘RS232’, ‘USB’). For the RS232 connection a serialIO plugin instance is needed!

    Match: [“RS232”, “USB”], Default: “RS232”

  • serial: Union[itom.dataIO, itom.actuator], optional

    An opened serial port (the right communication parameters will be set by this plugin).

    Only plugin “SerialIO” is allowed

  • serialNo: str, optional

    Serial number of the device to be connected. If empty, all found serial numbers will be printed and the first device that is detected will be opened.

    default: “”

4.3.3. Instruction#

Download the Starlab SDK from Ophir: https://www.ophiropt.com/laser–measurement/de/software/starlab-for-usb. Set the Windows Environment Variable OPHIR_STARLAB_ROOT to the installation directory (e.g. C:Program FilesOphir OptronicsStarLab 3.80).

4.3.4. Parameters#

ROMVersion: {str}, read-only

Version of ROM software.

battery: {int}, read-only

1 if battery is OK, 0 if battery is low.

calibrationDueDate: {str}, read-only

Calibration due date.

comPort: {int}, read-only

The current com-port ID of this specific device. -1 means undefined.

connection: {str}, read-only

type of the connection (‘RS232’, ‘USB’).

deviceType: {str}, read-only

Device type (NOVA, VEGA, LASERSTAR-S (single channel), LASERSTAR-D (dual channel), Nova-II).

headName: {str}, read-only

Head name connected to the device.

headSerialNumber: {str}, read-only

Head serial number connected to the device.

headType: {str}, read-only

Head type (thermopile, BC20, temperature probe, photodiode, CIE head, RP head, pyroelectric, nanoJoule meter, no head connected.

measurementType: {str}

Measurement type (energy or power).

name: {str}, read-only

Name of plugin.

range: {int}

Measurement range (0: AUTO, 1: 150W, 2: 50.0W, 3: 5.00W).

serialNumber: {str}, read-only

Serial number of the device shown on display.

timeout: {int}, read-only

Request timeout, default 1000 ms.

unit: {str}

Unit of device

wavelength: {str}

Available discrete wavelengths: 10.6 .8-6 <.8u.

wavelengthSet: {str}, read-only

Setting of the measurement wavelength (DISCRETE or CONTINUOUS).

4.3.5. Exemplary usage from Python#

In the following script, the first detectable power meter is connected and a oscilloscope-like plot is opened that displays a moving graph of recent intensity values:

connectionType = "USB"

if connectionType == "USB":  # connects the USB powermeter type
    adda = dataIO("OphirPowermeter", connection=connectionType)  # connect a USB Powermeter
elif connectionType == "RS232":  # connects the RS232 powermeter type with the additional SerialIO instance
    port = 4
    baud = 9600
    endline = '\n\r'
    adda = dataIO("OphirPowermeter", connection=connectionType, serial=dataIO("SerialIO", port, baud, endline))

numPoints = 1000
image = dataObject.zeros([1, numPoints], 'float64')
[i, plotHandle] = plot1(image)


def timeout():
    global timerId
    d = dataObject()
    adda.acquire()  # acquire new intensity value

    image[0, 0: numPoints - 1] = image[0, 1:]  # shift pixels to the left by one...

    adda.getVal(d)  # get the recently acquired value
    image.copyMetaInfo(d)
    image[0, numPoints - 1] = d[0, 0]  # ...append new value to the end of image

    if plotHandle.exists():
        try:
            plotHandle["source"] = image  # update the displayed image
        except:
            pass
    else:
        print("Figure has been closed. Stop acquisition...")
        timerId.stop()
        del timerId


timerId = timer(50, timeout)  # call timeout every 50ms

4.3.6. Changelog#

  • itom setup 4.1.0: This plugin has been compiled using the StarLab 3.60.0

  • itom setup 4.2.0: This plugin has been compiled using the StarLab 3.80.0

  • itom setup 4.3.0: This plugin has been compiled using the StarLab 3.90.0