Contents:
Device classes for “Probus V - ADDAT30” Interfaces which are used to control power supplies from FuG Elektronik GmbH
This interface is used for many FuG power units. Manufacturer homepage: https://www.fug-elektronik.de
The Professional Series of Power Supplies from FuG is a series of low, medium and high voltage direct current power supplies as well as capacitor chargers. The class FuG is tested with a HCK 800-20 000 in Standard Mode. The addressable mode is not implemented. Check the code carefully before using it with other devices. Manufacturer homepage: https://www.fug-elektronik.de/netzgeraete/professional-series/
The documentation of the interface from the manufacturer can be found here: https://www.fug-elektronik.de/wp-content/uploads/download/de/SOFTWARE/Probus_V.zip
The provided classes support the basic and some advanced commands. The commands for calibrating the power supplies are not implemented, as they are only for very special porpoises and should not used by “normal” customers.
FuG
Bases: hvl_ccb.dev.fug.FuGProbusV
hvl_ccb.dev.fug.FuGProbusV
FuG power supply device class.
The power supply is controlled over a FuG ADDA Interface with the PROBUS V protocol
config_status
Returns the registers for the registers with the configuration and status values
FuGProbusVConfigRegisters
current
Returns the registers for the current output
current_monitor
Returns the registers for the current monitor.
A typically usage will be “self.current_monitor.value” to measure the output current
di
Returns the registers for the digital inputs
FuGProbusVDIRegisters
identify_device
Identify the device nominal voltage and current based on its model number.
SerialCommunicationIOError – when communication port is not opened
max_current
Returns the maximal current which could provided within the test setup
max_current_hardware
Returns the maximal current which could provided with the power supply
max_voltage
Returns the maximal voltage which could provided within the test setup
max_voltage_hardware
Returns the maximal voltage which could provided with the power supply
on
Returns the registers for the output switch to turn the output on or off
FuGProbusVDORegisters
outX0
Returns the registers for the digital output X0
outX1
Returns the registers for the digital output X1
outX2
Returns the registers for the digital output X2
outXCMD
Returns the registers for the digital outputX-CMD
start
Opens the communication protocol and configures the device.
max_voltage – Configure here the maximal permissible voltage which is allowed in the given experimental setup
max_current – Configure here the maximal permissible current which is allowed in the given experimental setup
voltage
Returns the registers for the voltage output
voltage_monitor
Returns the registers for the voltage monitor.
A typically usage will be “self.voltage_monitor.value” to measure the output voltage
FuGConfig
Bases: object
object
Device configuration dataclass for FuG power supplies.
clean_values
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.
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)
FuGDigitalVal
Bases: enum.IntEnum
enum.IntEnum
An enumeration.
NO
OFF
ON
YES
FuGError
Bases: Exception
Exception
Error with the FuG voltage source.
errorcode
Errorcode from the Probus, see documentation of Probus V chapter 5. Errors with three-digit errorcodes are thrown by this python module.
FuGErrorcodes
Bases: hvl_ccb.utils.enum.NameEnum
hvl_ccb.utils.enum.NameEnum
The power supply can return an errorcode. These errorcodes are handled by this class. The original errorcodes from the source are with one or two digits, see documentation of Probus V chapter 5. All three-digit errorcodes are from this python module.
E0
E1
E10
E100
E106
E11
E115
E12
E125
E13
E135
E14
E145
E15
E155
E16
E165
E2
E206
E306
E4
E5
E504
E505
E6
E666
E7
E8
E9
raise_
FuGMonitorModes
T1MS
15 bit + sign, 1 ms integration time
T200MS
typ. 19 bit + sign, 200 ms integration time
T20MS
17 bit + sign, 20 ms integration time
T256US
14 bit + sign, 256 us integration time
T40MS
17 bit + sign, 40 ms integration time
T4MS
15 bit + sign, 4 ms integration time
T800MS
typ. 20 bit + sign, 800 ms integration time
T80MS
typ. 18 bit + sign, 80 ms integration time
FuGPolarities
NEGATIVE
POSITIVE
FuGProbusIV
Bases: hvl_ccb.dev.base.SingleCommDevice, abc.ABC
hvl_ccb.dev.base.SingleCommDevice
abc.ABC
FuG Probus IV device class
Sends basic SCPI commands and reads the answer. Only the special commands and PROBUS IV instruction set is implemented.
command
command – one of the commands given within FuGProbusIVCommands
value – an optional value, depending on the command
a String if a query was performed
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
output_off
Switch DC voltage output off.
reset
Reset of the interface: All setvalues are set to zero
Open the associated communication protocol.
stop
Close the associated communication protocol.
FuGProbusIVCommands
ADMODE
CURRENT
EXECUTE
EXECUTEONX
Wait for “X” to execute pending commands
ID
OUTPUT
POLARITY
QUERY
READBACKCHANNEL
RESET
TERMINATOR
VOLTAGE
XOUTPUTS
TODO: the possible values are limited to 0..13
FuGProbusV
Bases: hvl_ccb.dev.fug.FuGProbusIV
hvl_ccb.dev.fug.FuGProbusIV
FuG Probus V class which uses register based commands to control the power supplies
get_register
get the value from a register
register – the register from which the value is requested
the value of the register as a String
set_register
generic method to set value to register
register – the name of the register to set the value
value – which should be written to the register
Configuration and Status values, acc. 4.2.5
execute_on_x
status of Execute-on-X
FuGDigitalVal of the status
most_recent_error
Reads the Error-Code of the most recent command
FuGError – if code is not “E0”
readback_data
Preselection of readout data for Trigger-on-Talk
index for the readback channel
srq_mask
SRQ-Mask, Service-Request Enable status bits for SRQ 0: no SRQ Bit 2: SRQ on change of status to CC Bit 1: SRQ on change to CV
representative integer value
srq_status
SRQ-Statusbyte output as a decimal number: Bit 2: PS is in CC mode Bit 1: PS is in CV mode
representative string
status
Statusbyte as a string of 0/1. Combined status (compatibel to Probus IV), MSB first: Bit 7: I-REG Bit 6: V-REG Bit 5: ON-Status Bit 4: 3-Reg Bit 3: X-Stat (polarity) Bit 2: Cal-Mode Bit 1: unused Bit 0: SEL-D
string of 0/1
terminator
Terminator character for answer strings from ADDA
FuGTerminators
Digital Inputs acc. 4.2.4
analog_control
shows 1 if power supply is controlled by the analog interface
calibration_mode
shows 1 if power supply is in calibration mode
cc_mode
shows 1 if power supply is in CC mode
cv_mode
shows 1 if power supply is in CV mode
digital_control
shows 1 if power supply is digitally controlled
shows 1 if power supply ON
reg_3
For special applications.
input from bit 3-REG
x_stat
polarity of HVPS with polarity reversal
Digital outputs acc. 4.2.2
out
Status of the output according to the last setting. This can differ from the actual state if output should only pulse.
Returns the actual value of output. This can differ from the set value if pulse function is used.
FuGProbusVMonitorRegisters
Analog monitors acc. 4.2.3
adc_mode
The programmed resolution and integration time of the AD converter
value
Value from the monitor.
a float value in V or A
value_raw
uncalibrated raw value from AD converter
float value from ADC
FuGProbusVRegisterGroups
CONFIG
INPUT
MONITOR_I
MONITOR_V
OUTPUTONCMD
OUTPUTX0
OUTPUTX1
OUTPUTX2
OUTPUTXCMD
SETCURRENT
SETVOLTAGE
FuGProbusVSetRegisters
Setvalue control acc. 4.2.1 for the voltage and the current output
actualsetvalue
The actual valid set value, which depends on the ramp function.
actual valid set value
high_resolution
Status of the high resolution mode of the output.
normal operation
High Res. Mode
rampmode
The set ramp mode to control the setvalue.
the mode of the ramp as instance of FuGRampModes
ramprate
The set ramp rate in V/s.
ramp rate in V/s
rampstate
Status of ramp function.
if final setvalue is reached
if still ramping up
setvalue
For the voltage or current output this setvalue was programmed.
the programmed setvalue
FuGRampModes
FOLLOWRAMP
Follow the ramp up- and downwards
IMMEDIATELY
Standard mode: no ramp
ONLYUPWARDSOFFTOZERO
Follow the ramp up- and downwards, if output is OFF set value is zero
RAMPUPWARDS
Follow the ramp only upwards, downwards immediately
SPECIALRAMPUPWARDS
Follow a special ramp function only upwards
FuGReadbackChannels
FIRMWARE
RATEDCURRENT
RATEDVOLTAGE
SN
STATUSBYTE
FuGSerialCommunication
Bases: hvl_ccb.comm.serial.SerialCommunication
hvl_ccb.comm.serial.SerialCommunication
Specific communication protocol implementation for FuG power supplies. Already predefines device-specific protocol parameters in config.
query
Send a command to the interface and handle the status message. Eventually raises an exception.
command – Command to send
FuGError – if the connection is broken or the error from the power source itself
Answer from the interface or empty string
FuGSerialCommunicationConfig
Bases: hvl_ccb.comm.serial.SerialCommunicationConfig
hvl_ccb.comm.serial.SerialCommunicationConfig
baudrate
Baudrate for FuG power supplies is 9600 baud
bytesize
One byte is eight bits long
default_n_attempts_read_text_nonempty
default number of attempts to read a non-empty text
parity
FuG does not use parity
stopbits
FuG uses one stop bit
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
CR
CRLF
LF
LFCR