nkt_tools.varia.Varia
- class nkt_tools.varia.Varia(portname=None)
Bases:
object- __init__(portname=None)
Searches for connected NKT Varia and defines instrument parameters.
Make sure devices are not connected via another program already. If multiple Varias are connected to the same computer, specificy the port of the desired Varia upon instantiation.
- Parameters:
portname (str, optional) – Enter if portname for Varia is known/multiple lasers are connected. If not supplied, system searches for Varia. None by default.
- Raises:
RuntimeError – Throws error if multiple NKT Varias are found on one computer. Supply portname for desired Varia if multiple present.
Methods
__init__([portname])Searches for connected NKT Varia and defines instrument parameters.
Tests various registerRead functions supplied by NKTPDLL.
Read system status in bytes, translate to str, print.
read_all_properties()Attributes
This should update to 104 (0x68) if init is right.
Sets the short wave pass value with 0.1 nm precision.
# 16-25 for Varia.
Uses optional monitor to get laser power in percent.
Unclear what this parameter actually controls.
COM port for laser.
Sets the long wave pass value with 0.1 nm precision.
system status translation bits > string.
- demo_nkt_registerReads()
Tests various registerRead functions supplied by NKTPDLL.
Makes read request to register 0x66 (system status) using various registerRead commands as an example of the data type returned by each.
- property device_type
This should update to 104 (0x68) if init is right. Assigned and checked during object init.
- Type:
int, read-only
- property long_setpoint
Sets the short wave pass value with 0.1 nm precision.
Converts wavelength value [nm] to int [1/10 nm] then writes to register 0x33.
- Parameters:
wavelength (float) – Lower bandpass value given in nanometers w/ 0.1 nm precision.
- property module_address
# 16-25 for Varia. Auto searches in init.
- Type:
int, read-only
- property monitor_input
Uses optional monitor to get laser power in percent.
Calls registerREad16U on register 0x13. Converts reading from in to float. Requires the optional monitor to be attached for this register content to be valid.
- Returns:
Output power given in percent with 0.1% precision.
- Return type:
- property nd_setpoint
Unclear what this parameter actually controls.
Writes to register 0x32.
Manual: The output level of the SuperK VARIA is controlled with an unsigned 16-bit integer value sent to the neutral density filter setpoint register. The value in this register is in tenths of percent (permille, ‰).
- Parameters:
value (float) – Setpoint for neutral density filter given in % with 0.1% precision.
- 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
- property short_setpoint
Sets the long wave pass value with 0.1 nm precision.
Converts wavelength value [nm] to int [1/10 nm] then writes to register 0x34.
- Parameters:
wavelength (float) – Upper bandpass value given in nanometers w/ 0.1 nm precision.
- status_messages = {0: '-', 1: 'Interlock off', 2: 'Interlock loop in', 3: 'Interlock loop out', 4: '-', 5: 'Supply voltage low', 6: '-', 7: '-', 8: 'Shutter sensor 1', 9: 'Shutter sensor 2', 10: '-', 11: '-', 12: 'Filter 1 moving', 13: 'Filter 2 moving', 14: 'Filter 3 moving', 15: 'Error code present'}
system status translation bits > string.
Bit Index
Status
Bit 0:
Bit 1:
Interlock off
Bit 2:
Interlock loop in
Bit 3:
Interlock loop out
Bit 4:
Bit 5:
Supply voltage low
Bit 6:
Bit 7:
Bit 8:
Shutter sensor 1
Bit 9:
Shutter sensor 2
Bit 10:
Bit 11:
Bit 12:
Filter 1 moving
Bit 13:
Filter 2 moving
Bit 14:
Filter 3 moving
Bit 15:
Error code present
- Type: