hvl_ccb.dev.technix

Inheritance diagram of hvl_ccb.dev.technix

Device classes for “RS 232” and “Ethernet” Interfaces which are used to control power supplies from Technix. Manufacturer homepage: https://www.technix-hv.com

The Regulated power Supplies Series and Capacitor Chargers Series from Technix are series of low and high voltage direct current power supplies as well as capacitor chargers. The class Technix is tested with a CCR10KV-7,5KJ via an ethernet connection as well as a CCR15-P-2500-OP via a serial connection. Check the code carefully before using it with other devices or device series

This Python package may support the following interfaces from Technix:
class Technix(com, dev_config)[source]

Bases: hvl_ccb.dev.base.SingleCommDevice

static config_cls()[source]

Return the default configdataclass class.

Returns

a reference to the default configdataclass class

property current: Union[int, float]
default_com_cls() Union[Type[hvl_ccb.dev.technix.TechnixSerialCommunication], Type[hvl_ccb.dev.technix.TechnixTelnetCommunication]][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_status_byte() hvl_ccb.dev.technix.TechnixStatusByte[source]
property hv: Optional[bool]
property inhibit: Optional[bool]
property max_current: Union[int, float]
property max_voltage: Union[int, float]
property remote: Optional[bool]
start()[source]

Open the associated communication protocol.

stop()[source]

Close the associated communication protocol.

property voltage: Union[int, float]
property voltage_regulation: Optional[bool]
class TechnixCommunication(config)[source]

Bases: hvl_ccb.comm.base.SyncCommunicationProtocol, abc.ABC

Generic communication class for Technix, which can be implemented via TechnixSerialCommunication or TechnixTelnetCommunication

query(command: str) str[source]

Send a command to the interface and handle the status message. Eventually raises an exception.

Parameters

command – Command to send

Raises

TechnixError – if the connection is broken

Returns

Answer from the interface

class TechnixCommunicationConfig(terminator: bytes = b'\r', encoding: str = 'utf-8', encoding_error_handling: str = 'strict', wait_sec_read_text_nonempty: Union[int, float] = 0.5, default_n_attempts_read_text_nonempty: int = 10)[source]

Bases: hvl_ccb.comm.base.SyncCommunicationProtocolConfig

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

classmethod keys() Sequence[str]

Returns a list of all configdataclass fields key-names.

Returns

a list of strings containing all keys.

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.

terminator: bytes = b'\r'

The terminator is CR

class TechnixConfig(communication_channel: Union[Type[hvl_ccb.dev.technix.TechnixSerialCommunication], Type[hvl_ccb.dev.technix.TechnixTelnetCommunication]], max_voltage: Union[int, float], max_current: Union[int, float], polling_interval_sec: Union[int, float] = 4, post_stop_pause_sec: Union[int, float] = 1, register_pulse_time: Union[int, float] = 0.1)[source]

Bases: object

clean_values()

Cleans and enforces configuration values. Does nothing by default, but may be overridden to add custom configuration value checks.

communication_channel: Union[Type[hvl_ccb.dev.technix.TechnixSerialCommunication], Type[hvl_ccb.dev.technix.TechnixTelnetCommunication]]

communication channel between computer and Technix

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.

max_current: Union[int, float]

Maximal Output current

max_voltage: Union[int, float]

Maximal Output voltage

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.

polling_interval_sec: Union[int, float] = 4

Polling interval in s to maintain to watchdog of the device

post_stop_pause_sec: Union[int, float] = 1

Time to wait after stopping the device

register_pulse_time: Union[int, float] = 0.1

Time for pulsing a register

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.

exception TechnixError[source]

Bases: Exception

Technix related errors.

class TechnixSerialCommunication(configuration)[source]

Bases: hvl_ccb.dev.technix.TechnixCommunication, hvl_ccb.comm.serial.SerialCommunication

static config_cls()[source]

Return the default configdataclass class.

Returns

a reference to the default configdataclass class

class TechnixSerialCommunicationConfig(terminator: bytes = b'\r', encoding: str = 'utf-8', encoding_error_handling: str = 'strict', wait_sec_read_text_nonempty: Union[int, float] = 0.5, default_n_attempts_read_text_nonempty: int = 10, port: Union[str, NoneType] = None, baudrate: int = 9600, parity: Union[str, hvl_ccb.comm.serial.SerialCommunicationParity] = <SerialCommunicationParity.NONE: 'N'>, stopbits: Union[int, float, hvl_ccb.comm.serial.SerialCommunicationStopbits] = <SerialCommunicationStopbits.ONE: 1>, bytesize: Union[int, hvl_ccb.comm.serial.SerialCommunicationBytesize] = <SerialCommunicationBytesize.EIGHTBITS: 8>, timeout: Union[int, float] = 2)[source]

Bases: hvl_ccb.dev.technix.TechnixCommunicationConfig, hvl_ccb.comm.serial.SerialCommunicationConfig

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

classmethod keys() Sequence[str]

Returns a list of all configdataclass fields key-names.

Returns

a list of strings containing all keys.

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.

class TechnixStatusByte(value: int)[source]

Bases: object

msb_first(idx: int) Optional[bool][source]

Give the Bit at position idx with MSB first

Parameters

idx – Position of Bit as 1…8

Returns

class TechnixTelnetCommunication(configuration)[source]

Bases: hvl_ccb.comm.telnet.TelnetCommunication, hvl_ccb.dev.technix.TechnixCommunication

static config_cls()[source]

Return the default configdataclass class.

Returns

a reference to the default configdataclass class

class TechnixTelnetCommunicationConfig(terminator: bytes = b'\r\n', encoding: str = 'utf-8', encoding_error_handling: str = 'strict', wait_sec_read_text_nonempty: Union[int, float] = 0.5, default_n_attempts_read_text_nonempty: int = 10, host: Union[str, NoneType] = None, port: int = 4660, timeout: Union[int, float] = 0.2)[source]

Bases: hvl_ccb.comm.telnet.TelnetCommunicationConfig, hvl_ccb.dev.technix.TechnixCommunicationConfig

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

classmethod keys() Sequence[str]

Returns a list of all configdataclass fields key-names.

Returns

a list of strings containing all keys.

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.

port: int = 4660

Port at which Technix is listening

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.