msl.equipment.resources.energetiq.eq99 module

Communicate with the EQ-99 Manager from Energetiq.

class msl.equipment.resources.energetiq.eq99.EQ99(record)[source]

Bases: ConnectionSerial

Communicate with the EQ-99 Manager from Energetiq.

Do not instantiate this class directly. Use the connect() method to connect to the equipment.

Parameters

record (EquipmentRecord) – A record from an Equipment-Register Database.

identity()[source]

Query the instrument identification.

Returns

str – Returns the identification string for the instrument in the following format: Energetiq Model SN Ver Build

reset()[source]

Resets the instrument to factory defaults and the output is shut off.

The unit remains in remote mode.

get_beep()[source]

Query whether beeps are enabled.

Returns

bool – Whether beeps are enabled.

set_beep(beep=2)[source]

Set the beep value.

Parameters

beep (int or bool, optional) –

Causes the instrument to beep, or enables or disabled the beep sound for error messages and other events that generate and audible response. Possible values are

  • 0 or False – Disable the beep sound

  • 1 or True – Enable the beep sound

  • 2 – Generate one beep

get_brightness()[source]

Query the display brightness.

Returns

int – Returns the value of the display brightness (between 0 and 100).

set_brightness(brightness)[source]

Set the display brightness.

Parameters

brightness (int) – Sets the display brightness level from 0 to 100 percent. There are only 8 brightness levels (each separated by about 12.5 percent) and the brightness value is used to select an appropriate level.

delay(milliseconds)[source]

Specify a delay to use in command processing.

Parameters

milliseconds (int) – Causes command processing to be delayed for the specified number of milliseconds. Valid range is from 1 to 30000 milliseconds.

condition_register()[source]

Query LDLS condition register.

The condition register reflects the state of the instrument at the time the condition register is read.

The bitmask sequence is as follows:

Index

Value

Description

0

1

Interlock

1

2

Controller not detected

2

4

Controller fault

3

8

Lamp fault

4

16

Output on

5

32

Lamp on

6

64

Laser on

7

128

Laser stable

8

256

Shutter open

Returns

  • int – The condition register value.

  • str – The condition register as a bitmask string. For example, a value of 336 is expressed as '000010101' (meaning that the interlock is closed, there are no faults, the output is on, the lamp is off, the laser is on, the laser is not stable and the shutter is open).

event_register()[source]

Query LDLS event register.

Returns the LDLS event register. The event register reflects the occurrence of any condition since the last time the event register was read. For example, if the output was turned on and then turned off, the Output on the bit in the condition register will be zero, but the same bit in the event register will be one.

The bitmask sequence is as follows:

Index

Value

Description

0

1

Interlock

1

2

Controller not detected

2

4

Controller fault

3

8

Lamp fault

4

16

Output on

5

32

Lamp on

6

64

Laser on

7

128

Laser stable

8

256

Shutter open

Returns

  • int – The event register value.

  • str – The event register as a bitmask string. For example, a value of 256 is expressed as '000000001' and 32 as '000001000'.

get_exposure_time()[source]

Query the exposure time.

Returns

int – The exposure time, in milliseconds.

set_exposure_time(milliseconds)[source]

Set the exposure time.

Exposure time is used when the shutter exposure mode is set to Exposure mode (see set_exposure_mode()). An exposure is triggered by a shutter button press or the shutter trigger input.

Parameters

milliseconds (int) – The exposure time, in milliseconds, from 100 to 30000 ms.

get_exposure_mode()[source]

Query the exposure mode.

Returns

int – The exposure mode (0=Manual, 1=Exposure).

set_exposure_mode(mode)[source]

Set the exposure mode.

Same as the Shutter setting in the menu.

Parameters

mode (int or bool) – The exposure mode (0=Manual, 1=Exposure).

get_output()[source]

Query the output state.

Returns

bool – Whether the output is enabled.

set_output(enable)[source]

Turn the output on or off.

Parameters

enable (int or bool) – Whether to enable the output.

get_lamptime()[source]

Query the lamp runtime.

Returns

float – The number of hours accumulated while the lamp was on.

set_lamptime(hours)[source]

Set the lamp runtime.

Resets the runtime to the new value. Useful for resetting the runtime to zero when the lamp has been serviced or replaced, or when moving the manager to a new LDLS system.

Parameters

hours (float) – The lamp runtime, in hours, between 0 and 9999.

get_shutter_init()[source]

Query the power-up shutter state.

Returns

int – The power-up shutter state.

  • 0 – Shutter is closed on power-up

  • 1 – Shutter is open on power-up

set_shutter_init(state)[source]

Set the power-up shutter state

Parameters

state (int or bool) –

Sets the initial state of the shutter on power-up of the manager

  • 0 or False – Shutter is closed on power-up

  • 1 or True – Shutter is open on power-up

get_shutter_state()[source]

Query the shutter state.

Returns

bool – The state of the shutter.

  • False – Shutter is closed

  • True – Shutter is open

set_shutter_state(state)[source]

Open, close, or trigger the shutter.

A close command (state equals 0) will always close the shutter, regardless of exposure mode. An open command (state equals 1) will open the shutter if exposure mode is set to Manual, or trigger a shutter if exposure mode is set to Exposure.

Parameters

state (int or bool) –

The state of the shutter.

  • 0 or False – Close the shutter

  • 1 or True – Open or trigger the shutter

get_trigger_mode()[source]

Query the trigger mode.

Returns

int – The trigger mode. See set_trigger_mode() for more details.

set_trigger_mode(mode)[source]

Set the trigger mode.

The trigger mode controls how the shutter trigger input controls the operation of the shutter. For more information on trigger modes, see Shutter Operation in the Operating the Instrument section of the manual for more details.

Parameters

mode (int) –

The trigger mode.

  • 0 – Positive edge trigger

  • 1 – Negative edge trigger

  • 2 – Positive level trigger

  • 3 – Negative level trigger

  • 4 – Off (trigger disabled)

get_message_buffer()[source]

Query the internal message buffer.

Returns

str – The value of the internal message buffer.

set_message_buffer(message)[source]

Set the message buffer.

Parameters

message (str) – Sets the internal message buffer, up to a maximum of 16 characters. If more than 16 characters are specified then the additional characters are silently ignored.

get_remote_mode_error()[source]

Query whether errors are displayed while in remote mode.

Returns

bool – Whether errors are displayed while in remote mode.

set_remote_mode_error(enable)[source]

Set whether to display errors while in remote mode.

This command controls if the instrument will display errors while in remote mode. If set to zero, then errors will not be displayed. If set to one, errors will be displayed. Errors will always accumulate in the error queue.

Parameters

enable (int or bool) –

Whether to display errors while in remote mode.

  • 0 or False – No not display errors in remote mode

  • 1 or True – Display errors in remote mode

serial_number()[source]

Query the serial number of the instrument.

Returns

str – The serial number of the instrument. This is the same information that is part of the *IDN? query.

get_termination()[source]

Query response terminator.

Returns the current response terminator setting. See set_termination() for a complete definition of possible return values.

Returns

int – The response terminator.

set_termination(value)[source]

Set the response terminator character(s).

This command controls the termination characters used for responses to queries.

Parameters

value (int) –

The response terminator character(s)

  • 0 or 1 – <CR><LF>

  • 2 or 3 – <CR>

  • 4 or 5 – <LF>

  • 6 or 7 – no terminator

run_time()[source]

Query run time.

Returns

str – Returns the elapsed time since the unit has been turned on. Format is in HH:MM:SS.ss, where HH is hours, MM is minutes, SS is seconds, and ss is hundredths of a second.

timer()[source]

Query time since the last time this method was called.

Returns

str – Returns the elapsed time since the last time this method was called, or, if this is the first time calling this method then the time since unit has been turned on. Format is in HH:MM:SS.ss, where HH is hours, MM is minutes, SS is seconds, and ss is hundredths of a second.

version()[source]

Query the firmware version.

Returns

str – Returns the firmware version. This is the same information that is part of the *IDN? query.