nkt_tools.select.Select
- class nkt_tools.select.Select(portname=None)
Bases:
object- __init__(portname=None)
Searches for connected NKT Select and defines instrument parameters.
Make sure devices are not connected via another program already.
- Parameters:
portname (str, optional) – Enter if portname for Select is known/multiple lasers are connected. If not supplied, system searches for Select. None by default.
- Raises:
RuntimeError – Throws error if multiple NKT Selects are found on one computer. Supply portname for desired Select if multiple present.
Methods
__init__([portname])Searches for connected NKT Select and defines instrument parameters.
Read system status in bytes, translate to str, print.
read_all_properties()Attributes
crystal_1_max_wavelengthcrystal_1_min_wavelengthcrystal_2_max_wavelengthcrystal_2_min_wavelengthThis should update to 104 (0x67) if init is right.
# 16 for Select.
monitor_1_gainmonitor_1_readoutmonitor_2_gainmonitor_2_readoutmonitor_switchCOM port for laser.
rf_switchsystem status translation bits > string.
- property device_type
This should update to 104 (0x67) if init is right. Assigned and checked during object init.
- Type:
int, read-only
- property module_address
# 16 for Select. Auto searches in init.
- Type:
int, read-only
- property portname
COM port for laser. Autofound during init if not given. User can supply when creating object.
- Type:
str, read-only
- print_status()
Read system status in bytes, translate to str, print.
Reads system status using registerReadU16 on register 0x66. Translates binary into str for of equipment status through Varia.status_messages.
- Returns:
str – binary results of register read in string format.
- Return type:
bits
- status_messages = {0: '-', 1: 'Interlock off', 2: 'Interlock loop in', 3: 'Interlock loop out', 4: '-', 5: 'Supply voltage low', 6: 'Module temp range', 7: '-', 8: 'Shutter sensor 1', 9: 'Shutter sensor 2', 10: 'New crystal1 temperature', 11: 'New crystal2 temperature', 12: '-', 13: '-', 14: '-', 15: 'Error code present'}
system status translation bits > string.
- Type: