IPG Photonics YLR Laser#

class QInstrument.instruments.IPGPhotonics.IPGLaser.instrument.QIPGLaser(portName=None, **kwargs)[source]#

Bases: QSerialInstrument

IPG Photonics YLR Ytterbium Fiber Laser.

The IPG command interface does not follow the CMD? / CMDvalue convention used by SRS instruments. Each command is a short mnemonic that either queries the instrument (e.g. STA, ROP) or commands it (e.g. ABN, EMOFF). All responses echo the command name followed by the value. Properties are therefore registered with bespoke getters and setters rather than a _register() helper.

Properties#

Control#

currentfloat [%]

Diode current setpoint as a percentage of maximum. Range: minimum_currentmaximum_current. Commands SDC; read back via RCS.

maximum_currentfloat [%]

Software upper bound on the current setpoint. Range: 0–100. Default: 100. Values above this limit are clamped and a warning is logged.

aimingbool

True: aiming beam on (ABN). False: aiming beam off (ABF).

emissionbool

True: laser emission enabled (EMON). False: emission off (EMOFF).

Status (read-only)#

powerfloat [W]

Current output power (ROP).

power_supplybool

True: power supply is on.

keyswitchbool

True: keyswitch in REM (remote) position.

faultbool

True: one or more fault conditions are active. Fault conditions: over-temperature, excessive backreflection, power supply off, unexpected emission detected.

minimum_currentfloat [%]

Minimum effective diode current percentage. Read once at startup via RNC and cached for the session.

firmwarestr

Firmware version string (RFV).

temperaturefloat [deg C]

Laser diode temperature (RCT).

Reference#

IPG Photonics Fiber Laser User Manual, dated February 26, 2010.

Interface Commands

Command

Description

Response

SDC v

Set Diode Current v: percent of full range

SDC: v ERR: Out of range

RCS

Read Current Setpoint

RCS: v

RNC

Read Minimum Current

RNC: v

RDC

Read Diode Current v: Amps

RDC: v

ROP

Read Output Power v: Watts

ROP: v ROP: Off ROP: Low

RFV

Read Firmware Version

RFV: version

RCT

Read Laser Temperature v: degrees Centigrade

RCT: v

STA

Read Device Status v: int: status bits

STA: v

EMON

Start Emission

EMON ERR: Keyswitch in remote

EMOFF

Stop Emission

EMOFF ERR: Keyswitch in remote

EMOD

Enable Modulation

EMOD ERR: Emission is on

DMOD

Disable Modulation

DMOD ERR: Emission is on

EEC

Enable External Control analog control

EEC ERR: Emission is on

DEC

Disable External Control

DEC ERR: Emission is on

RERR

Reset Errors

RERR

ABN

Aiming Beam On

ABN

ABF

Aiming Beam Off

ABF

EEABC

Enable External Aiming Beam Control

EEABC

DEABC

Disable EABC

DEABC

SFWS v

Set Filter Window Size v: averaging time [s] multiple of 0.2 s

SFWS: v ERR: Out of Range

RFWS

Read Filter Window Size

RFWS: v

flag = {'ACL': 16, 'AIM': 256, 'BKR': 8, 'EMS': 32768, 'EMX': 4, 'ENA': 16384, 'ERR': 133130, 'KEY': 2097152, 'MDC': 64, 'MFL': 128, 'MOD': 4096, 'PWR': 2048, 'TMP': 2, 'UNX': 131072}#
comm = {'baudRate': qtpy.QtSerialPort.QSerialPort.BaudRate.Baud57600, 'dataBits': qtpy.QtSerialPort.QSerialPort.DataBits.Data8, 'eol': '\r', 'flowControl': qtpy.QtSerialPort.QSerialPort.FlowControl.NoFlowControl, 'parity': qtpy.QtSerialPort.QSerialPort.Parity.NoParity, 'stopBits': qtpy.QtSerialPort.QSerialPort.StopBits.OneStop}#
identify()[source]#

Return True if the connected device responds as an IPG laser.

Queries the firmware version string (RFV) and checks that the response contains more than 3 characters. On success, reads and caches minimum_current via RNC.

Return type:

bool

status()[source]#

Return a snapshot of all polled status properties.

Reads the status word (STA) and output power (ROP) once each, avoiding redundant STA queries. Intended for use by the widget poll loop.

Return type:

dict[str, bool | float]

Returns:

dict[str, bool | float] – Mapping of property name to current value for power_supply, keyswitch, aiming, emission, fault, and power.

fault_detail()[source]#

Return a list of active fault condition names.

Returns an empty list when no faults are active.

Return type:

list[str]

Returns:

list[str] – Human-readable names of active fault conditions. Possible values: 'over-temperature', 'excessive backreflection', 'power supply off', 'unexpected emission'.

class QInstrument.instruments.IPGPhotonics.IPGLaser.fake.QFakeIPGLaser(*args, **kwargs)[source]#

Bases: QFakeInstrument, QIPGLaser

Fake IPG laser for UI development without hardware.

IPGLaser properties do not use the _register() helper pattern — they derive from a hardware status word via bespoke getters — so this fake registers each property explicitly with _store-backed getters rather than relying on MRO auto-mock interception.

status()[source]#

Return all polled status properties from the in-memory store.

Overrides the real status() to avoid calling _flags() and _getPower(), which would attempt serial communication.

Return type:

dict[str, bool | float]

identify()[source]#

Return True if the connected device responds as an IPG laser.

Queries the firmware version string (RFV) and checks that the response contains more than 3 characters. On success, reads and caches minimum_current via RNC.

Return type:

bool

class QInstrument.instruments.IPGPhotonics.IPGLaser.widget.QIPGLaserWidget(*args, **kwargs)[source]#

Bases: QInstrumentWidget

Control widget for an IPG fiber laser.

Displays power-supply, keyswitch, and fault status as LED indicators. The fault LED blinks while a fault condition is active. Aiming beam and emission status are shown as red LEDs; the adjacent push-buttons toggle each state. Diode current is set with a rotary encoder spinbox. Output power is shown as a read-only display.

The widget polls the instrument every poll_interval ms to refresh all status fields.

UIFILE = 'IPGLaserWidget.ui'#
INSTRUMENT#

alias of QIPGLaser

poll_interval = 500#
wsetter = {'QCheckBox': 'setChecked', 'QComboBox': 'setCurrentIndex', 'QDoubleSpinBox': 'setValue', 'QGroupBox': 'setChecked', 'QLabel': 'setText', 'QLedWidget': 'setValue', 'QLineEdit': 'setText', 'QPushButton': 'setChecked', 'QRadioButton': 'setChecked', 'QRotaryEncoderSpinBox': 'setValue', 'QSpinBox': 'setValue'}#
wgetter = {'QCheckBox': 'isChecked', 'QComboBox': 'currentIndex', 'QDoubleSpinBox': 'value', 'QGroupBox': 'isChecked', 'QLabel': 'text', 'QLedWidget': 'value', 'QLineEdit': 'text', 'QPushButton': 'isChecked', 'QRadioButton': 'isChecked', 'QRotaryEncoderSpinBox': 'value', 'QSpinBox': 'value'}#
wsignal = {'QCheckBox': 'toggled', 'QComboBox': 'currentIndexChanged', 'QDoubleSpinBox': 'valueChanged', 'QGroupBox': 'toggled', 'QLineEdit': 'editingFinished', 'QPushButton': 'toggled', 'QRadioButton': 'toggled', 'QRotaryEncoderSpinBox': 'valueChanged', 'QSpinBox': 'valueChanged'}#
showEvent(event)[source]#

Re-apply current range after the first-show config restore.

Return type:

None

class QInstrument.instruments.IPGPhotonics.IPGLaser.tree.QIPGLaserTree(*args, device=None, fields=None, **kwargs)[source]#

Bases: QInstrumentTree

Parameter tree for an IPG fiber laser.

INSTRUMENT#

alias of QIPGLaser