Contents:
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. Manufacturer homepage: https://www.heinzinger.com/products/accessories-and-more/digital-interfaces/
The Heinzinger PNC series is a series of high voltage direct current power supplies. The class HeinzingerPNC is tested with two PNChp 60000-1neg and a PNChp 1500-1neg. Check the code carefully before using it with other PNC devices, especially PNC3p or PNCcap. Manufacturer homepage: https://www.heinzinger.com/products/high-voltage/universal-high-voltage-power-supplies/
HeinzingerConfig
Bases: object
object
Device configuration dataclass for Heinzinger power supplies.
RecordingsEnum
Bases: enum.IntEnum
enum.IntEnum
An enumeration.
EIGHT
FOUR
ONE
SIXTEEN
TWO
clean_values
default_number_of_recordings
force_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.
fieldname – name of the field
value – value to assign
is_configdataclass
keys
Returns a list of all configdataclass fields key-names.
a list of strings containing all keys.
number_of_decimals
optional_defaults
Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.
a list of strings containing all optional keys.
required_keys
Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.
a list of strings containing all required keys.
wait_sec_stop_commands
Time to wait after subsequent commands during stop (in seconds)
HeinzingerDI
Bases: hvl_ccb.dev.base.SingleCommDevice, abc.ABC
hvl_ccb.dev.base.SingleCommDevice
abc.ABC
Heinzinger Digital Interface I/II device class
Sends basic SCPI commands and reads the answer. Only the standard instruction set from the manual is implemented.
OutputStatus
Status of the voltage output
OFF
ON
UNKNOWN
config_cls
Return the default configdataclass class.
a reference to the default configdataclass class
default_com_cls
Get the class for the default communication protocol used with this device.
the type of the standard communication protocol for this device
get_current
Queries the set current of the Heinzinger PNC (not the measured current!).
SerialCommunicationIOError – when communication port is not opened
get_interface_version
Queries the version number of the digital interface.
get_number_of_recordings
Queries the number of recordings the device is using for average value calculation.
int number of recordings
get_serial_number
Ask the device for its serial number and returns the answer as a string.
string containing the device serial number
get_voltage
Queries the set voltage of the Heinzinger PNC (not the measured voltage!).
measure_current
Ask the Device to measure its output current and return the measurement result.
measured current as float
measure_voltage
Ask the Device to measure its output voltage and return the measurement result.
measured voltage as float
output_off
Switch DC voltage output off and updates the output status.
output_on
Switch DC voltage output on and updates the output status.
output_status
reset_interface
Reset of the digital interface; only Digital Interface I: Power supply is switched to the Local-Mode (Manual operation)
set_current
Sets the output current of the Heinzinger PNC to the given value.
value – current expressed in self.unit_current
set_number_of_recordings
Sets the number of recordings the device is using for average value calculation. The possible values are 1, 2, 4, 8 and 16.
set_voltage
Sets the output voltage of the Heinzinger PNC to the given value.
value – voltage expressed in self.unit_voltage
start
Opens the communication protocol.
SerialCommunicationIOError – when communication port cannot be opened.
stop
Stop the device. Closes also the communication protocol.
HeinzingerPNC
Bases: hvl_ccb.dev.heinzinger.HeinzingerDI
hvl_ccb.dev.heinzinger.HeinzingerDI
Heinzinger PNC power supply device class.
The power supply is controlled over a Heinzinger Digital Interface I/II
UnitCurrent
Bases: hvl_ccb.utils.enum.AutoNumberNameEnum
hvl_ccb.utils.enum.AutoNumberNameEnum
A
mA
UnitVoltage
V
kV
identify_device
Identify the device nominal voltage and current based on its serial number.
max_current
max_current_hardware
max_voltage
max_voltage_hardware
Opens the communication protocol and configures the device.
unit_current
unit_voltage
HeinzingerPNCDeviceNotRecognizedException
Bases: hvl_ccb.dev.heinzinger.HeinzingerPNCError
hvl_ccb.dev.heinzinger.HeinzingerPNCError
Error indicating that the serial number of the device is not recognized.
HeinzingerPNCError
Bases: Exception
Exception
General error with the Heinzinger PNC voltage source.
HeinzingerPNCMaxCurrentExceededException
Error indicating that program attempted to set the current to a value exceeding ‘max_current’.
HeinzingerPNCMaxVoltageExceededException
Error indicating that program attempted to set the voltage to a value exceeding ‘max_voltage’.
HeinzingerSerialCommunication
Bases: hvl_ccb.comm.serial.SerialCommunication
hvl_ccb.comm.serial.SerialCommunication
Specific communication protocol implementation for Heinzinger power supplies. Already predefines device-specific protocol parameters in config.
HeinzingerSerialCommunicationConfig
Bases: hvl_ccb.comm.serial.SerialCommunicationConfig
hvl_ccb.comm.serial.SerialCommunicationConfig
baudrate
Baudrate for Heinzinger power supplies is 9600 baud
bytesize
One byte is eight bits long
default_n_attempts_read_text_nonempty
increased to 40 default number of attempts to read a non-empty text
parity
Heinzinger does not use parity
stopbits
Heinzinger uses one stop bit
terminator
The terminator is LF
timeout
use 3 seconds timeout as default
wait_sec_read_text_nonempty
default time to wait between attempts of reading a non-empty text