qmi.instruments.ozoptics.epc_driver

Instrument driver for the OzOptics Electric Polarization Controller driver.

Classes

OzOptics_EpcDriver(context, name, transport)

Instrument driver for the OzOptics Electric Polarization Controller driver.

class qmi.instruments.ozoptics.epc_driver.OzOptics_EpcDriver(context: QMI_Context, name: str, transport: str | QMI_Transport)

Instrument driver for the OzOptics Electric Polarization Controller driver.

open() None

See base class.

close() None

See base class.

get_frequencies() Tuple[int, ...]

Get the present scrambling frequencies.

Returns:

(int, int, int, int) tuple of frequencies [Hz] belonging to channel 1..4 respectively. The returned frequencies will be in the range of 0 to 100 Hertz.

set_frequency(channel: int, frequency: int) None

Set channel to specified frequency.

Parameters:
  • channel (int) – Channel number 1..4.

  • frequency (int) – Frequency [Hz] in the range of 0 to 100 Hz.

set_operating_mode_ac() None

Set operating mode to AC (scrambling).

set_operating_mode_dc() None

Set operating mode to DC (fixed voltage).

enable_dc_in_ac_mode() None

Enable dc voltage in ac mode

Enables the user to use a fixed dc voltage while the unit is operating in AC mode.

disable_dc_in_ac_mode() None

Disable dc voltage in ac mode

Disable the user to use a fixed dc voltage while the unit is operating in AC mode.

toggle_channel_ac_dc(channel: int) None

Toggle channel output between AC and DC.

Notes

The device must be in “dc in ac mode” for this operating mode to be effective.

Parameters:

channel (int) – Channel number 1..4.

get_ac_dc_channel_status() Tuple[str, ...]

Return operating mode of each of the channels.

Returns:

(str, str, str, str) tuple of strings, belonging to channel 1..4 respectively, indicating if the channel is in ‘V’ DC mode or ‘F’ AC mode.

is_in_dc_in_ac_mode() bool

Device is in dc in ac mode.

Returns:

True if the dc in ac mode is enabled, False when the dc in ac mode is disabled.

get_operating_mode() str

Get the present operating mode (scrambling or fixed voltage).

Returns:

Operating mode string defined as ‘AC’ or ‘DC’. AC (Alternating Current) means that the device is in scrambling mode and DC (Direct Current) means the device is in fixed voltage mode.

set_voltage(channel: int, voltage: int) None

Set channel to the specified voltage.

Parameters:
  • channel (int) – Channel number 1..4.

  • voltage (int) – Voltage specified in millivolts [mV] that range between -5000 to +5000.

set_high(channel: int) None

Set channel voltage high (maximum).

Parameters:

channel (int) – Channel number 1..4.

set_low(channel: int) None

Set channel voltage low (minimum).

Parameters:

channel – Channel number 1..4.

set_zero(channel: int) None

Set channel voltage zero volts.

Parameters:

channel – Channel number 1..4.

get_voltages() Tuple[int, ...]

Get the output voltages.

Returns:

Tuple (int, int, int, int) of voltages [mV] belonging to channel 1..4 respectively. The returned voltages will be in the range of -5000 mV to 5000 mV.

get_waveform_type() str

Get Waveform type (Sine or Triangle)

This command will get the present waveform type that is being used (Triangle or sine wave).

Returns:

A string that indicates either a Sine or a Triangle waveform is used.

save_to_flash() None

Save current status to flash memory

set_waveform_type_sine() None

Set waveform type to Sine

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_waveform_type_triangle() None

Set waveform type to Triangle

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.