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: 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: bool | None

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 (RED_OPERATE), False if ready is deactivated (RED_READY), None otherwise

property polarity: Polarity | None

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

property power_setup: 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: int | float = 5.0, polling_interval_sec: int | float = 1.0, timeout_status_change: int | float = 6, timeout_interval: int | float = 0.1, noise_level_measurement_channel_1: int | float = 100, noise_level_measurement_channel_2: int | float = 100, noise_level_measurement_channel_3: int | float = 100, noise_level_measurement_channel_4: int | float = 100, timeout_test_parameters: 'Number' = 2.0)[source]

Bases: 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: int | float = 2.0
class PICubeOpcUaCommunication(config)[source]

Bases: 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: '_CubeOpcEndpoint' = <_CubeOpcEndpoint.PI_CUBE: 'PICube'>, port: int = 4840, sub_handler: hvl_ccb.comm.opc.OpcUaSubHandler = <hvl_ccb.dev.cube.base._BaseCubeSubscriptionHandler object at 0x7f40ee5c3640>, 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: BaseCubeOpcUaCommunicationConfig

endpoint_name: _CubeOpcEndpoint = '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.