MDT693B¶
From: Thorlabs
Class: herosdevices.hardware.thorlabs.mdt69xb.MDT693B
Driver Quality Index: beta
Additional Information Check before use¶
Thorlabs MDT69xx USB Configuration
Problem
The USB chip in the Thorlabs MDT69xx series (e.g., MDT693B) may identify as a Human Interface Device (HID).
If the usbhid kernel driver binds to it, the device cannot be accessed via a serial interface, rendering it non-functional.
Solution: udev Rule
Identify Vendor and Product IDs
Run the following command to list all USB devices and locate the Thorlabs device:
lsusbExample output:
Bus 001 Device 003: ID xxxx:xxxx Thorlabs MDT693B
Note the
xxxxvalues foridVendorandidProduct.Find the USB Kernel Path
Use
udevadmto inspect the device attributes and locate the kernel path (e.g.,1-8:1.0):udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/XXX/YYY)
Replace
XXXandYYYwith the bus and device numbers fromlsusb. This command will print a lot of information. You are looking for a line like:looking at device '/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/0003:046A:B090.0002/hidraw/hidraw1':
Here, the
1-8:1.0is what you are looking for.Create the udev Rule
Edit or create a new udev rules file (e.g.,
/etc/udev/rules.d/99-thorlabs-piezo.rules) and add the following rule:# Thorlabs piezo controller MDT693B ACTION=="add", DRIVERS=="usb", ATTRS{idVendor}=="xxxx", ATTRS{idProduct}=="xxxx", SYMLINK+="USB_PIEZO_CTRL_1", RUN+="echo -n 'kernel_path' > /sys/bus/usb/drivers/usbhid/unbind"
Replace:
xxxxwith the Vendor and Product IDs from Step 1.kernel_pathwith the USB kernel path from Step 2 (e.g.,1-5.1.2.3:1.0).
Reload udev Rules
Apply the changes by reloading the udev rules:
sudo udevadm control --reload-rules sudo udevadm trigger --action add
Device driver for the MDT693B 3-Channel, Open-Loop Piezo Controller.
Bold arguments are mandatory. For more information on the listed arguments refer to the class documentation: herosdevices.hardware.thorlabs.mdt69xb.MDT693B If parameters appear in this list but not in the class definition, please recursively check the linked base classes for the definition of the parameter.
Argument |
Type |
Default Value |
Description |
|---|---|---|---|
address |
<class ‘str’> |
Serial address of the device. |
|
timeout |
<class ‘float’> |
1.0 |
timeout for read operations. |
The following JSON strings can be used to start a HERO device representation of MDT693B using BOSS.
{
"_id": "my-3channel-piezo-controller",
"classname": "herosdevices.hardware.thorlabs.MDT693B",
"active": false,
"arguments": {
"address": "/dev/ttyUSB0"
}
}
from examples/thorlabs/mdt69xb.json
{
"_id": "my_MDT693B",
"classname": "herosdevices.hardware.thorlabs.mdt69xb.MDT693B",
"arguments": {
"address": "/dev/ttyUSB0",
"timeout": 1.0
}
}
generated from signature