Thorlabs PM100 USB Configuration¶
The Thorlabs PM100 series optical power and energy meters (e.g. PM100D) are USBTMC devices. Out of the box, two
steps are required before they can be used with the herosdevices.hardware.thorlabs.pm100.PM100
driver.
Setting the driver mode
The device must be switched to the NI-VISA (WinUSB) driver mode. By default the devices are configured for
the Thorlabs Windows driver, in which case the Linux usbtmc kernel driver does not bind to the device
and no /dev/usbtmc* device node appears.
The driver mode is switched with the Thorlabs Optical Parameter Monitor GUI:
Download and install the Power Console software from the Thorlabs software page (Windows required).
Connect the power meter and start the Power Console.
Navigate to
Help -> Tools -> Driver Switcher.Switch the driver mode to NI-VISA.
The setting is stored in the device, so this step only has to be performed once per device. After reconnecting
the device on Linux, a /dev/usbtmc* device node should appear.
Udev Rules (Linux)
The /dev/usbtmc* device nodes and the raw usb device are only accessible by root, so a udev rule is required to grant access
to regular users.
Edit or create a new udev rules file (e.g.
/etc/udev/rules.d/99-thorlabs-pm100.rules) and add the following rule:# Thorlabs PM100 series power meters SUBSYSTEM=="usb", ATTRS{idVendor}=="1313", MODE="0660", GROUP="plugdev" KERNEL=="usbtmc[0-9]", ATTRS{idVendor}=="1313", MODE="0660", GROUP="plugdev"
Make sure your user is in the
plugdevgroup or replaceplugdevwith a group your user is a member ofApply the changes by reloading the udev rules:
sudo udevadm control --reload-rules sudo udevadm trigger --action=add
Warning
Note, that if a device file (/dev/usbtmc0) is used as resource argument, the device can not be restarted and needs to be
reconnected to the host due to the PyVISA backend removing the /dev/usbtmc0 link upon access. You need to
use a VISA string (printed on startup of the device) to be able to restart it for example via BOSS.