Spellman XRV High Voltage Power Supply
- class pymeasure.instruments.spellmanhv.SpellmanXRV(adapter, name='Spellman XRV HV Power Supply', query_delay=0.15, baud_rate=9600, **kwargs)
Bases:
InstrumentA class representing the Spellman XRV series high voltage power supplies.
- unscaled
- Channel:
- property analog_monitor: Any
Measure the analog monitor read backs.
- Returns:
dict
- Dict keys:
voltage,current,filament,voltage_setpoint,current_setpoint,limit,preheat,anode_current
(dynamic)
- property baudrate: Any
Set the baud rate (int, strictly in
9600,19200,38400,57600,115200).
- check_set_errors()
Check for errors after sending a command.
- Raise:
ValueError if response is not
$- Return type:
list[str]
- static checksum(string_to_check)
Calculate the checksum.
- Parameters:
string_to_check (
str) – string to calculate the checksum from- Return type:
str
- The checksum is computed as follows:
Add all the bytes before <CSUM>, except <STX>, into a 16 bit (or larger) word. The bytes are added as unsigned integers.
Take the two’s complement.
Truncate the result down to the eight least significant bits.
Clear the most significant bit (bit 7) of the resultant byte, (bitwise AND with 0x7F).
Set the next most significant bit (bit 6) of the resultant byte (bitwise OR with 0x40).
Using this method, the checksum is always a number between 0x40 and 0x7F. The checksum can never be confused with the <STX> or <ETX> control characters, since these have non overlapping ASCII values.
- property configuration: Any
Get the power supply configuration.
- Returns:
dict
- Dict keys:
reserved1,over_voltage_percentage,voltage_ramp_rate,current_ramp_rate,pre_warning_time,arc_count,reserved2,quench_time,max_kV,max_mA,watchdog_timer
- property current_setpoint: Any
Control the current setpoint in Amps (float).(dynamic)
- property dsp: Any
Get the DSP part number and version (list).
- property errors: Any
Get the power supply errors (enum).
- property fpga: Any
Get the FPGA part number and version (list).
- property hv_on_timer: Any
Get the HV On time in hours (float).
- property output_enabled: Any
Control the high voltage output (bool).
- property power_limits: Any
Control the power limits in Watts (list of int).
index = 0: power limit for large filament index = 1: power limit for small filament
- Raise:
ValueError if limit is out of range
- read()
Read from the device and check for errors.
- Raise:
ConnectionError if response doesn’t start with <STX> or checksum is incorrect. The checksum check is omitted for TCPIP connections.
- Return type:
str
- reset_errors()
Reset the error register.
- Return type:
None
- reset_hv_on_timer()
Reset the HV on hours counter.
- Return type:
None
- property scaling: Any
Get scaling factors and polarity.
- Returns:
dict
- Dict keys:
voltage,current,polarity
voltageis in V,currentis in A,polarity0: uni-polar,polarity1: bipolar
- set_scaling()
Set the scaling factors.
Used to set the scaling factor for
analog_monitor,current_setpoint,voltage,voltage_setpointandsystem_voltages.- Return type:
None
- property status: Any
Get the power supply status (
StatusCodeenum).
- property system_voltages: Any
Measure the system voltages in Volts.
- Returns:
dict
- Dict keys:
temperature,reserved,anode,cathode,ac_line_cathode,dc_rail_cathode,ac_line_anode,dc_rail_anode,lvps_pos,lvps_neg
(dynamic)
- property temperature: Any
Measure the system temperature in °C (float).
- property voltage: Any
Measure the output voltage in Volts (float).(dynamic)
- property voltage_setpoint: Any
Control the voltage setpoint in Volts (float).(dynamic)
- wait_for(query_delay=0)
Wait for some time.
- Parameters:
query_delay (
float) – override the global query_delay. (default:0)- Return type:
None
- write(command)
Write to the instrument.
Adds <STX> (0x02) in front and checksum + <ETX> (0x03) at end of every command before sending it. The checksum is omitted for TCPIP connections.
- Return type:
None
- class pymeasure.instruments.spellmanhv.spellmanXRV.Filament(parent, id, **kwargs)
Bases:
ChannelA class representing the functions for the filament of the x-ray tube.
- property enabled: Any
Set the filament status (bool).
- property large_size_enabled: Any
Set the large filament state (bool)
- property limit: Any
Control the filament limit setpoint (int, strictly from 0 to 4095).
- property preheat: Any
Control the filament preheat setpoint (int, strictly from 0 to 4095).
- class pymeasure.instruments.spellmanhv.spellmanXRV.UnscaledData(parent, id, **kwargs)
Bases:
ChannelA class to handle the unscaled raw data of the Spellman XRV power supplies.
- property analog_monitor: Any
Measure the analog monitor read backs.
- Returns:
dict of int from
0to4095- Dict keys:
voltage,current,filament,voltage_setpoint,current_setpoint,limit,preheat,anode_current
voltage_setpoint,current_setpoint,limitandpreheatare for local mode operation only.anode_currentis only valid for bipolar units.
- property current_setpoint: Any
Control the current setpoint (int, strictly from
0to4095).
- property lvps_monitor: Any
Measure the –15 V low voltage power supply (int from
0to4095)
- property system_voltages: Any
Measure the system voltages.
- Returns:
dict of int from
0to4095- Dict keys:
temperature,reserved,anode,cathode,ac_line_cathode,dc_rail_cathode,ac_line_anode,dc_rail_anode,lvps_pos,lvps_neg
- property voltage: Any
Measure the output voltage (int from
0to4095).
- property voltage_setpoint: Any
Control the voltage setpoint (int, strictly from
0to4095).