hvl_ccb.dev.heinzinger.device
Device classes for Heinzinger Digital Interface I/II and Heinzinger PNC power supply.
The Heinzinger Digital Interface I/II is used for many Heinzinger power units. Interface Manual: https://www.heinzinger.com/assets/uploads/downloads/Handbuch_DigitalInterface_2021-12-14-V1.6.pdf
The Heinzinger PNC series is a series of high voltage direct current power supplies. The class Heinzinger is tested with different PNChp-types. Check the code carefully before using it with other PNC devices, especially PNC3p or PNCcap. Manufacturer homepage: https://www.heinzinger.com/en/products/pnc-serie
- class Heinzinger(com, dev_config=None)[source]
Bases:
SingleCommDevice
,DeprecatedHeinzingerMixin
Heinzinger power supply device class. The power supply is controlled over a Heinzinger Digital Interface I/II
Sends basic SCPI commands and reads the answer. Only the standard instruction set from the manual is implemented.
- static config_cls() type[HeinzingerConfig] [source]
Return the default configdataclass class.
- Returns:
a reference to the default configdataclass class
- property current: int | float
Ask the Device to measure its output current and return the measurement result in A.
- Returns:
measured current as float
- Raises:
SerialCommunicationIOError – when communication port is not opened
- static default_com_cls() type[HeinzingerSerialCommunication] [source]
Get the class for the default communication protocol used with this device.
- Returns:
the type of the standard communication protocol for this device
- get_interface_version() str [source]
Queries the version number of the digital interface.
- Raises:
SerialCommunicationIOError – when communication port is not opened
- get_serial_number() str [source]
Ask the device for its serial number and returns the answer as a string.
- Returns:
string containing the device serial number
- Raises:
SerialCommunicationIOError – when communication port is not opened
- identify_device() None [source]
Identify the device nominal voltage and current based on its serial number.
- Raises:
SerialCommunicationIOError – when communication port is not opened
- property max_current: int | float
Maximal settable output current in A
- property max_current_hardware: int | float
Maximal output current the hardware can provide in A
- property max_voltage: int | float
Maximal settable output voltage in V
- property max_voltage_hardware: int | float
Maximal output voltage the hardware can provide in V
- property number_of_recordings: int
Queries the number of recordings the device is using for average value calculation.
- Returns:
int number of recordings
- Raises:
SerialCommunicationIOError – when communication port is not opened
- property output: bool | None
Switch DC voltage output on and updates the output status.
- Raises:
SerialCommunicationIOError – when communication port is not opened
- reset_interface() None [source]
Reset of the digital interface; only Digital Interface I: Power supply is switched to the Local-Mode (Manual operation)
- Raises:
SerialCommunicationIOError – when communication port is not opened
- property set_current: int | float
Queries the set current of the Heinzinger PNC (not the measured current!) in A.
- Raises:
SerialCommunicationIOError – when communication port is not opened
- property set_voltage: int | float
Queries the set voltage of the Heinzinger PNC (not the measured voltage!) in V.
- Raises:
SerialCommunicationIOError – when communication port is not opened
- start() None [source]
Opens the communication protocol and configures the device.
- Raises:
SerialCommunicationIOError – when communication port cannot be opened.
- property voltage: int | float
Ask the Device to measure its output voltage and return the measurement result in V.
- Returns:
measured voltage as float in V
- Raises:
SerialCommunicationIOError – when communication port is not opened
- class HeinzingerConfig(default_number_of_recordings: int | RecordingsEnum = 1, number_of_decimals: int = 6, wait_sec_stop_commands: int | float = 0.5)[source]
Bases:
object
Device configuration dataclass for Heinzinger power supplies.
- default_number_of_recordings: int | RecordingsEnum = 1
- force_value(fieldname, value)
Forces a value to a dataclass field despite the class being frozen.
NOTE: you can define post_force_value method with same signature as this method to do extra processing after value has been forced on fieldname.
- Parameters:
fieldname – name of the field
value – value to assign
- is_configdataclass = True
- classmethod keys() Sequence[str]
Returns a list of all configdataclass fields key-names.
- Returns:
a list of strings containing all keys.
- number_of_decimals: int = 6
- classmethod optional_defaults() dict[str, object]
Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.
- Returns:
a list of strings containing all optional keys.
- classmethod required_keys() Sequence[str]
Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.
- Returns:
a list of strings containing all required keys.
- wait_sec_stop_commands: int | float = 0.5
Time to wait after subsequent commands during stop (in seconds)