hvl_ccb.dev.cube.picube

Inheritance diagram of hvl_ccb.dev.cube.picube

A PICube is a BaseCube with build in Power Inverter

class PICube(com, dev_config=None)[source]

Bases: hvl_ccb.dev.cube.base.BaseCube

Variant of the BaseCube with build in Power Inverter

static config_cls()[source]

Return the default configdataclass class.

Returns

a reference to the default configdataclass class

property current_primary: float

Read the current primary current at the output of the frequency converter (before transformer).

Returns

primary current in A

static default_com_cls()[source]

Get the class for the default communication protocol used with this device.

Returns

the type of the standard communication protocol for this device

property frequency: float

Read the electrical frequency of the current PICube setup.

Returns

the frequency in Hz

property operate: Optional[bool]

Indicates if ‘operate’ is activated. ‘operate’ means locket safety circuit, red lamps, high voltage on and locked safety switches.

Returns

True if operate is activated (RedOperate), False if ready is deactivated (RedReady), None otherwise

property polarity: Optional[hvl_ccb.dev.cube.constants.Polarity]

Polarity of a DC setup. :return: if a DC setup is programmed the polarity is returned, else None.

property power_setup: hvl_ccb.dev.cube.constants.PowerSetup

Return the power setup selected in the PICube’s settings.

Returns

the power setup

property voltage_actual: float

Reads the actual measured voltage and returns the value in V.

Returns

the actual voltage of the setup in V.

property voltage_max: float

Reads the maximum voltage of the setup and returns in V.

Returns

the maximum voltage of the setup in V.

property voltage_primary: float

Read the current primary voltage at the output of the frequency converter (before transformer).

Returns

primary voltage in V

class PICubeConfiguration(namespace_index: int = 3, polling_delay_sec: Union[int, float] = 5.0, polling_interval_sec: Union[int, float] = 1.0, timeout_status_change: Union[int, float] = 6, timeout_interval: Union[int, float] = 0.1, noise_level_measurement_channel_1: Union[int, float] = 100, noise_level_measurement_channel_2: Union[int, float] = 100, noise_level_measurement_channel_3: Union[int, float] = 100, noise_level_measurement_channel_4: Union[int, float] = 100, timeout_test_parameters: 'Number' = 2.0)[source]

Bases: hvl_ccb.dev.cube.base.BaseCubeConfiguration

clean_values()[source]
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.

timeout_test_parameters: Union[int, float] = 2.0
class PICubeOpcUaCommunication(config)[source]

Bases: hvl_ccb.dev.cube.base.BaseCubeOpcUaCommunication

static config_cls()[source]

Return the default configdataclass class.

Returns

a reference to the default configdataclass class

class PICubeOpcUaCommunicationConfig(host: Union[str, ipaddress.IPv4Address, ipaddress.IPv6Address], endpoint_name: 'str' = <_CubeOpcEndpoint.PI_CUBE: 'PICube'>, port: int = 4840, sub_handler: hvl_ccb.comm.opc.OpcUaSubHandler = <hvl_ccb.dev.cube.base._BaseCubeSubscriptionHandler object at 0x7f7a2b565750>, update_parameter: asyncua.ua.uaprotocol_auto.CreateSubscriptionParameters = CreateSubscriptionParameters(RequestedPublishingInterval=1000, RequestedLifetimeCount=300, RequestedMaxKeepAliveCount=22, MaxNotificationsPerPublish=10000, PublishingEnabled=True, Priority=0), wait_timeout_retry_sec: Union[int, float] = 1, max_timeout_retry_nr: int = 5)[source]

Bases: hvl_ccb.dev.cube.base.BaseCubeOpcUaCommunicationConfig

endpoint_name: str = 'PICube'

Endpoint of the OPC server, this is a path like ‘OPCUA/SimulationServer’

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.