hvl_ccb.dev.supercube package¶
Submodules¶
hvl_ccb.dev.supercube.base module¶
Base classes for the Supercube device.
-
class
hvl_ccb.dev.supercube.base.
SupercubeBase
(com, dev_config=None)[source]¶ Bases:
hvl_ccb.dev.base.SingleCommDevice
Base class for Supercube variants.
-
static
config_cls
()[source]¶ Return the default configdataclass class.
- Returns
a reference to the default configdataclass class
-
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
-
get_cee16_socket
() → bool[source]¶ Read the on-state of the IEC CEE16 three-phase power socket.
- Returns
the on-state of the CEE16 power socket
-
get_door_status
(door: int) → hvl_ccb.dev.supercube.constants.DoorStatus[source]¶ Get the status of a safety fence door. See
constants.DoorStatus
for possible returned door statuses.- Parameters
door – the door number (1..3)
- Returns
the door status
-
get_earthing_rod_status
(earthing_rod: int) → hvl_ccb.dev.supercube.constants.EarthingRodStatus[source]¶ Get the status of a earthing rod. See
constants.EarthingRodStatus
for possible returned earthing rod statuses.- Parameters
earthing_rod – the earthing rod number (1..3)
- Returns
the earthing rod status
-
get_earthing_stick_manual
(number: int) → hvl_ccb.dev.supercube.constants.EarthingStickOperation[source]¶ Get the manual status of an earthing stick. If an earthing stick is set to manual, it is closed even if the system is in states RedReady or RedOperate.
- Parameters
number – number of the earthing stick (1..6)
- Returns
operation of the earthing stick in a manual operating mode (open == 0, close == 1)
- Raises
ValueError – when earthing stick number is not valid
-
get_earthing_stick_operating_status
(number: int) → hvl_ccb.dev.supercube.constants.EarthingStickOperatingStatus[source]¶ Get the operating status of an earthing stick.
- Parameters
number – number of the earthing stick (1..6)
- Returns
earthing stick operating status (auto == 0, manual == 1)
- Raises
ValueError – when earthing stick number is not valid
-
get_earthing_stick_status
(number: int) → hvl_ccb.dev.supercube.constants.EarthingStickStatus[source]¶ Get the status of an earthing stick, whether it is closed, open or undefined (moving).
- Parameters
number – number of the earthing stick (1..6)
- Returns
earthing stick status
- Raises
ValueError – when earthing stick number is not valid
-
get_measurement_ratio
(channel: int) → float[source]¶ Get the set measurement ratio of an AC/DC analog input channel. Every input channel has a divider ratio assigned during setup of the Supercube system. This ratio can be read out.
- Parameters
channel – number of the input channel (1..4)
- Returns
the ratio
- Raises
ValueError – when channel is not valid
-
get_measurement_voltage
(channel: int) → float[source]¶ Get the measured voltage of an analog input channel. The voltage read out here is already scaled by the configured divider ratio.
- Parameters
channel – number of the input channel (1..4)
- Returns
measured voltage
- Raises
ValueError – when channel is not valid
-
get_status
() → hvl_ccb.dev.supercube.constants.SafetyStatus[source]¶ Get the safety circuit status of the Supercube. :return: the safety status of the supercube’s state machine.
-
get_support_input
(port: int, contact: int) → bool[source]¶ Get the state of a support socket input.
- Parameters
port – is the socket number (1..6)
contact – is the contact on the socket (1..2)
- Returns
digital input read state
- Raises
ValueError – when port or contact number is not valid
-
get_support_output
(port: int, contact: int) → bool[source]¶ Get the state of a support socket output.
- Parameters
port – is the socket number (1..6)
contact – is the contact on the socket (1..2)
- Returns
digital output read state
- Raises
ValueError – when port or contact number is not valid
-
get_t13_socket
(port: int) → bool[source]¶ Read the state of a SEV T13 power socket.
- Parameters
port – is the socket number, one of constants.T13_SOCKET_PORTS
- Returns
on-state of the power socket
- Raises
ValueError – when port is not valid
-
operate
(state: bool) → None[source]¶ Set operate state. If the state is RedReady, this will turn on the high voltage and close the safety switches.
- Parameters
state – set operate state
-
operate_earthing_stick
(number: int, operation: hvl_ccb.dev.supercube.constants.EarthingStickOperation) → None[source]¶ Operation of an earthing stick, which is set to manual operation. If an earthing stick is set to manual, it stays closed even if the system is in states RedReady or RedOperate.
- Parameters
number – number of the earthing stick (1..6)
operation – earthing stick manual status (close or open)
- Raises
SupercubeEarthingStickOperationError – when operating status of given number’s earthing stick is not manual
-
read
(node_id: str)[source]¶ Local wrapper for the OPC UA communication protocol read method.
- Parameters
node_id – the id of the node to read.
- Returns
the value of the variable
-
ready
(state: bool) → None[source]¶ Set ready state. Ready means locket safety circuit, red lamps, but high voltage still off.
- Parameters
state – set ready state
-
set_cee16_socket
(state: bool) → None[source]¶ Switch the IEC CEE16 three-phase power socket on or off.
- Parameters
state – desired on-state of the power socket
- Raises
ValueError – if state is not of type bool
-
set_message_board
(msgs: List[str], display_board: bool = True) → None[source]¶ Fills messages into message board that display that 15 newest messages with a timestamp.
- Parameters
msgs – list of strings
display_board – display 15 newest messages if True (default)
- Raises
ValueError – if there are too many messages or the positions indices are invalid.
-
set_remote_control
(state: bool) → None[source]¶ Enable or disable remote control for the Supercube. This will effectively display a message on the touchscreen HMI.
- Parameters
state – desired remote control state
-
set_status_board
(msgs: List[str], pos: Optional[List[int]] = None, clear_board: bool = True, display_board: bool = True) → None[source]¶ Sets and displays a status board. The messages and the position of the message can be defined.
- Parameters
msgs – list of strings
pos – list of integers [0…14]
clear_board – clear unspecified lines if True (default), keep otherwise
display_board – display new status board if True (default)
- Raises
ValueError – if there are too many messages or the positions indices are invalid.
-
set_support_output
(port: int, contact: int, state: bool) → None[source]¶ Set the state of a support output socket.
- Parameters
port – is the socket number (1..6)
contact – is the contact on the socket (1..2)
state – is the desired state of the support output
- Raises
ValueError – when port or contact number is not valid
-
set_support_output_impulse
(port: int, contact: int, duration: float = 0.2, pos_pulse: bool = True) → None[source]¶ Issue an impulse of a certain duration on a support output contact. The polarity of the pulse (On-wait-Off or Off-wait-On) is specified by the pos_pulse argument.
This function is blocking.
- Parameters
port – is the socket number (1..6)
contact – is the contact on the socket (1..2)
duration – is the length of the impulse in seconds
pos_pulse – is True, if the pulse shall be HIGH, False if it shall be LOW
- Raises
ValueError – when port or contact number is not valid
-
set_t13_socket
(port: int, state: bool) → None[source]¶ Set the state of a SEV T13 power socket.
- Parameters
port – is the socket number, one of constants.T13_SOCKET_PORTS
state – is the desired on-state of the socket
- Raises
ValueError – when port is not valid or state is not of type bool
-
start
() → None[source]¶ Starts the device. Sets the root node for all OPC read and write commands to the Siemens PLC object node which holds all our relevant objects and variables.
-
static
-
class
hvl_ccb.dev.supercube.base.
SupercubeConfiguration
(namespace_index: int = 3, polling_delay_sec: Union[int, float] = 5.0, polling_interval_sec: Union[int, float] = 1.0)[source]¶ Bases:
object
Configuration dataclass for the Supercube devices.
-
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.
-
namespace_index
: int = 3¶ Namespace of the OPC variables, typically this is 3 (coming from Siemens)
-
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_delay_sec
: Union[int, float] = 5.0¶
-
polling_interval_sec
: Union[int, float] = 1.0¶
-
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
hvl_ccb.dev.supercube.base.
SupercubeOpcUaCommunication
(config)[source]¶ Bases:
hvl_ccb.comm.opc.OpcUaCommunication
Communication protocol specification for Supercube devices.
-
class
hvl_ccb.dev.supercube.base.
SupercubeOpcUaCommunicationConfig
(host: str, endpoint_name: str, port: int = 4840, sub_handler: hvl_ccb.comm.opc.OpcUaSubHandler = <hvl_ccb.dev.supercube.base.SupercubeSubscriptionHandler object>, update_period: int = 500, wait_timeout_retry_sec: Union[int, float] = 1, max_timeout_retry_nr: int = 5)[source]¶ Bases:
hvl_ccb.comm.opc.OpcUaCommunicationConfig
Communication protocol configuration for OPC UA, specifications for the Supercube devices.
-
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.
-
sub_handler
: hvl_ccb.comm.opc.OpcUaSubHandler = <hvl_ccb.dev.supercube.base.SupercubeSubscriptionHandler object>¶ Subscription handler for data change events
-
-
class
hvl_ccb.dev.supercube.base.
SupercubeSubscriptionHandler
[source]¶ Bases:
hvl_ccb.comm.opc.OpcUaSubHandler
OPC Subscription handler for datachange events and normal events specifically implemented for the Supercube devices.
-
datachange_notification
(node: opcua.common.node.Node, val, data)[source]¶ In addition to the standard operation (debug logging entry of the datachange), alarms are logged at INFO level using the alarm text.
- Parameters
node – the node object that triggered the datachange event
val – the new value
data –
-
hvl_ccb.dev.supercube.constants module¶
Constants, variable names for the Supercube OPC-connected devices.
-
class
hvl_ccb.dev.supercube.constants.
AlarmText
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
This enumeration contains textual representations for all error classes (stop, warning and message) of the Supercube system. Use the
AlarmText.get()
method to retrieve the enum of an alarm number.-
Alarm1
= 'STOP Emergency Stop 1'¶
-
Alarm10
= 'STOP Earthing stick 2 error while opening'¶
-
Alarm11
= 'STOP Earthing stick 3 error while opening'¶
-
Alarm12
= 'STOP Earthing stick 4 error while opening'¶
-
Alarm13
= 'STOP Earthing stick 5 error while opening'¶
-
Alarm14
= 'STOP Earthing stick 6 error while opening'¶
-
Alarm15
= 'STOP Earthing stick 1 error while closing'¶
-
Alarm16
= 'STOP Earthing stick 2 error while closing'¶
-
Alarm17
= 'STOP Earthing stick 3 error while closing'¶
-
Alarm18
= 'STOP Earthing stick 4 error while closing'¶
-
Alarm19
= 'STOP Earthing stick 5 error while closing'¶
-
Alarm2
= 'STOP Emergency Stop 2'¶
-
Alarm20
= 'STOP Earthing stick 6 error while closing'¶
-
Alarm21
= 'STOP Safety fence 1'¶
-
Alarm22
= 'STOP Safety fence 2'¶
-
Alarm23
= 'STOP OPC connection error'¶
-
Alarm24
= 'STOP Grid power failure'¶
-
Alarm25
= 'STOP UPS failure'¶
-
Alarm26
= 'STOP 24V PSU failure'¶
-
Alarm3
= 'STOP Emergency Stop 3'¶
-
Alarm4
= 'STOP Safety Switch 1 error'¶
-
Alarm41
= 'WARNING Door 1: Use earthing rod!'¶
-
Alarm42
= 'MESSAGE Door 1: Earthing rod is still in setup.'¶
-
Alarm43
= 'WARNING Door 2: Use earthing rod!'¶
-
Alarm44
= 'MESSAGE Door 2: Earthing rod is still in setup.'¶
-
Alarm45
= 'WARNING Door 3: Use earthing rod!'¶
-
Alarm46
= 'MESSAGE Door 3: Earthing rod is still in setup.'¶
-
Alarm47
= 'MESSAGE UPS charge < 85%'¶
-
Alarm48
= 'MESSAGE UPS running on battery'¶
-
Alarm5
= 'STOP Safety Switch 2 error'¶
-
Alarm6
= 'STOP Door 1 lock supervision'¶
-
Alarm7
= 'STOP Door 2 lock supervision'¶
-
Alarm8
= 'STOP Door 3 lock supervision'¶
-
Alarm9
= 'STOP Earthing stick 1 error while opening'¶
-
classmethod
get
(alarm: int)[source]¶ Get the attribute of this enum for an alarm number.
- Parameters
alarm – the alarm number
- Returns
the enum for the desired alarm number
-
not_defined
= 'NO ALARM TEXT DEFINED'¶
-
-
class
hvl_ccb.dev.supercube.constants.
Alarms
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)¶ Bases:
hvl_ccb.dev.supercube.constants._AlarmEnumBase
Alarms enumeration containing all variable NodeID strings for the alarm array.
-
Alarm1
= '"DB_Alarm_HMI"."Alarm1"'¶
-
Alarm10
= '"DB_Alarm_HMI"."Alarm10"'¶
-
Alarm100
= '"DB_Alarm_HMI"."Alarm100"'¶
-
Alarm101
= '"DB_Alarm_HMI"."Alarm101"'¶
-
Alarm102
= '"DB_Alarm_HMI"."Alarm102"'¶
-
Alarm103
= '"DB_Alarm_HMI"."Alarm103"'¶
-
Alarm104
= '"DB_Alarm_HMI"."Alarm104"'¶
-
Alarm105
= '"DB_Alarm_HMI"."Alarm105"'¶
-
Alarm106
= '"DB_Alarm_HMI"."Alarm106"'¶
-
Alarm107
= '"DB_Alarm_HMI"."Alarm107"'¶
-
Alarm108
= '"DB_Alarm_HMI"."Alarm108"'¶
-
Alarm109
= '"DB_Alarm_HMI"."Alarm109"'¶
-
Alarm11
= '"DB_Alarm_HMI"."Alarm11"'¶
-
Alarm110
= '"DB_Alarm_HMI"."Alarm110"'¶
-
Alarm111
= '"DB_Alarm_HMI"."Alarm111"'¶
-
Alarm112
= '"DB_Alarm_HMI"."Alarm112"'¶
-
Alarm113
= '"DB_Alarm_HMI"."Alarm113"'¶
-
Alarm114
= '"DB_Alarm_HMI"."Alarm114"'¶
-
Alarm115
= '"DB_Alarm_HMI"."Alarm115"'¶
-
Alarm116
= '"DB_Alarm_HMI"."Alarm116"'¶
-
Alarm117
= '"DB_Alarm_HMI"."Alarm117"'¶
-
Alarm118
= '"DB_Alarm_HMI"."Alarm118"'¶
-
Alarm119
= '"DB_Alarm_HMI"."Alarm119"'¶
-
Alarm12
= '"DB_Alarm_HMI"."Alarm12"'¶
-
Alarm120
= '"DB_Alarm_HMI"."Alarm120"'¶
-
Alarm121
= '"DB_Alarm_HMI"."Alarm121"'¶
-
Alarm122
= '"DB_Alarm_HMI"."Alarm122"'¶
-
Alarm123
= '"DB_Alarm_HMI"."Alarm123"'¶
-
Alarm124
= '"DB_Alarm_HMI"."Alarm124"'¶
-
Alarm125
= '"DB_Alarm_HMI"."Alarm125"'¶
-
Alarm126
= '"DB_Alarm_HMI"."Alarm126"'¶
-
Alarm127
= '"DB_Alarm_HMI"."Alarm127"'¶
-
Alarm128
= '"DB_Alarm_HMI"."Alarm128"'¶
-
Alarm129
= '"DB_Alarm_HMI"."Alarm129"'¶
-
Alarm13
= '"DB_Alarm_HMI"."Alarm13"'¶
-
Alarm130
= '"DB_Alarm_HMI"."Alarm130"'¶
-
Alarm131
= '"DB_Alarm_HMI"."Alarm131"'¶
-
Alarm132
= '"DB_Alarm_HMI"."Alarm132"'¶
-
Alarm133
= '"DB_Alarm_HMI"."Alarm133"'¶
-
Alarm134
= '"DB_Alarm_HMI"."Alarm134"'¶
-
Alarm135
= '"DB_Alarm_HMI"."Alarm135"'¶
-
Alarm136
= '"DB_Alarm_HMI"."Alarm136"'¶
-
Alarm137
= '"DB_Alarm_HMI"."Alarm137"'¶
-
Alarm138
= '"DB_Alarm_HMI"."Alarm138"'¶
-
Alarm139
= '"DB_Alarm_HMI"."Alarm139"'¶
-
Alarm14
= '"DB_Alarm_HMI"."Alarm14"'¶
-
Alarm140
= '"DB_Alarm_HMI"."Alarm140"'¶
-
Alarm141
= '"DB_Alarm_HMI"."Alarm141"'¶
-
Alarm142
= '"DB_Alarm_HMI"."Alarm142"'¶
-
Alarm143
= '"DB_Alarm_HMI"."Alarm143"'¶
-
Alarm144
= '"DB_Alarm_HMI"."Alarm144"'¶
-
Alarm145
= '"DB_Alarm_HMI"."Alarm145"'¶
-
Alarm146
= '"DB_Alarm_HMI"."Alarm146"'¶
-
Alarm147
= '"DB_Alarm_HMI"."Alarm147"'¶
-
Alarm148
= '"DB_Alarm_HMI"."Alarm148"'¶
-
Alarm149
= '"DB_Alarm_HMI"."Alarm149"'¶
-
Alarm15
= '"DB_Alarm_HMI"."Alarm15"'¶
-
Alarm150
= '"DB_Alarm_HMI"."Alarm150"'¶
-
Alarm151
= '"DB_Alarm_HMI"."Alarm151"'¶
-
Alarm16
= '"DB_Alarm_HMI"."Alarm16"'¶
-
Alarm17
= '"DB_Alarm_HMI"."Alarm17"'¶
-
Alarm18
= '"DB_Alarm_HMI"."Alarm18"'¶
-
Alarm19
= '"DB_Alarm_HMI"."Alarm19"'¶
-
Alarm2
= '"DB_Alarm_HMI"."Alarm2"'¶
-
Alarm20
= '"DB_Alarm_HMI"."Alarm20"'¶
-
Alarm21
= '"DB_Alarm_HMI"."Alarm21"'¶
-
Alarm22
= '"DB_Alarm_HMI"."Alarm22"'¶
-
Alarm23
= '"DB_Alarm_HMI"."Alarm23"'¶
-
Alarm24
= '"DB_Alarm_HMI"."Alarm24"'¶
-
Alarm25
= '"DB_Alarm_HMI"."Alarm25"'¶
-
Alarm26
= '"DB_Alarm_HMI"."Alarm26"'¶
-
Alarm27
= '"DB_Alarm_HMI"."Alarm27"'¶
-
Alarm28
= '"DB_Alarm_HMI"."Alarm28"'¶
-
Alarm29
= '"DB_Alarm_HMI"."Alarm29"'¶
-
Alarm3
= '"DB_Alarm_HMI"."Alarm3"'¶
-
Alarm30
= '"DB_Alarm_HMI"."Alarm30"'¶
-
Alarm31
= '"DB_Alarm_HMI"."Alarm31"'¶
-
Alarm32
= '"DB_Alarm_HMI"."Alarm32"'¶
-
Alarm33
= '"DB_Alarm_HMI"."Alarm33"'¶
-
Alarm34
= '"DB_Alarm_HMI"."Alarm34"'¶
-
Alarm35
= '"DB_Alarm_HMI"."Alarm35"'¶
-
Alarm36
= '"DB_Alarm_HMI"."Alarm36"'¶
-
Alarm37
= '"DB_Alarm_HMI"."Alarm37"'¶
-
Alarm38
= '"DB_Alarm_HMI"."Alarm38"'¶
-
Alarm39
= '"DB_Alarm_HMI"."Alarm39"'¶
-
Alarm4
= '"DB_Alarm_HMI"."Alarm4"'¶
-
Alarm40
= '"DB_Alarm_HMI"."Alarm40"'¶
-
Alarm41
= '"DB_Alarm_HMI"."Alarm41"'¶
-
Alarm42
= '"DB_Alarm_HMI"."Alarm42"'¶
-
Alarm43
= '"DB_Alarm_HMI"."Alarm43"'¶
-
Alarm44
= '"DB_Alarm_HMI"."Alarm44"'¶
-
Alarm45
= '"DB_Alarm_HMI"."Alarm45"'¶
-
Alarm46
= '"DB_Alarm_HMI"."Alarm46"'¶
-
Alarm47
= '"DB_Alarm_HMI"."Alarm47"'¶
-
Alarm48
= '"DB_Alarm_HMI"."Alarm48"'¶
-
Alarm49
= '"DB_Alarm_HMI"."Alarm49"'¶
-
Alarm5
= '"DB_Alarm_HMI"."Alarm5"'¶
-
Alarm50
= '"DB_Alarm_HMI"."Alarm50"'¶
-
Alarm51
= '"DB_Alarm_HMI"."Alarm51"'¶
-
Alarm52
= '"DB_Alarm_HMI"."Alarm52"'¶
-
Alarm53
= '"DB_Alarm_HMI"."Alarm53"'¶
-
Alarm54
= '"DB_Alarm_HMI"."Alarm54"'¶
-
Alarm55
= '"DB_Alarm_HMI"."Alarm55"'¶
-
Alarm56
= '"DB_Alarm_HMI"."Alarm56"'¶
-
Alarm57
= '"DB_Alarm_HMI"."Alarm57"'¶
-
Alarm58
= '"DB_Alarm_HMI"."Alarm58"'¶
-
Alarm59
= '"DB_Alarm_HMI"."Alarm59"'¶
-
Alarm6
= '"DB_Alarm_HMI"."Alarm6"'¶
-
Alarm60
= '"DB_Alarm_HMI"."Alarm60"'¶
-
Alarm61
= '"DB_Alarm_HMI"."Alarm61"'¶
-
Alarm62
= '"DB_Alarm_HMI"."Alarm62"'¶
-
Alarm63
= '"DB_Alarm_HMI"."Alarm63"'¶
-
Alarm64
= '"DB_Alarm_HMI"."Alarm64"'¶
-
Alarm65
= '"DB_Alarm_HMI"."Alarm65"'¶
-
Alarm66
= '"DB_Alarm_HMI"."Alarm66"'¶
-
Alarm67
= '"DB_Alarm_HMI"."Alarm67"'¶
-
Alarm68
= '"DB_Alarm_HMI"."Alarm68"'¶
-
Alarm69
= '"DB_Alarm_HMI"."Alarm69"'¶
-
Alarm7
= '"DB_Alarm_HMI"."Alarm7"'¶
-
Alarm70
= '"DB_Alarm_HMI"."Alarm70"'¶
-
Alarm71
= '"DB_Alarm_HMI"."Alarm71"'¶
-
Alarm72
= '"DB_Alarm_HMI"."Alarm72"'¶
-
Alarm73
= '"DB_Alarm_HMI"."Alarm73"'¶
-
Alarm74
= '"DB_Alarm_HMI"."Alarm74"'¶
-
Alarm75
= '"DB_Alarm_HMI"."Alarm75"'¶
-
Alarm76
= '"DB_Alarm_HMI"."Alarm76"'¶
-
Alarm77
= '"DB_Alarm_HMI"."Alarm77"'¶
-
Alarm78
= '"DB_Alarm_HMI"."Alarm78"'¶
-
Alarm79
= '"DB_Alarm_HMI"."Alarm79"'¶
-
Alarm8
= '"DB_Alarm_HMI"."Alarm8"'¶
-
Alarm80
= '"DB_Alarm_HMI"."Alarm80"'¶
-
Alarm81
= '"DB_Alarm_HMI"."Alarm81"'¶
-
Alarm82
= '"DB_Alarm_HMI"."Alarm82"'¶
-
Alarm83
= '"DB_Alarm_HMI"."Alarm83"'¶
-
Alarm84
= '"DB_Alarm_HMI"."Alarm84"'¶
-
Alarm85
= '"DB_Alarm_HMI"."Alarm85"'¶
-
Alarm86
= '"DB_Alarm_HMI"."Alarm86"'¶
-
Alarm87
= '"DB_Alarm_HMI"."Alarm87"'¶
-
Alarm88
= '"DB_Alarm_HMI"."Alarm88"'¶
-
Alarm89
= '"DB_Alarm_HMI"."Alarm89"'¶
-
Alarm9
= '"DB_Alarm_HMI"."Alarm9"'¶
-
Alarm90
= '"DB_Alarm_HMI"."Alarm90"'¶
-
Alarm91
= '"DB_Alarm_HMI"."Alarm91"'¶
-
Alarm92
= '"DB_Alarm_HMI"."Alarm92"'¶
-
Alarm93
= '"DB_Alarm_HMI"."Alarm93"'¶
-
Alarm94
= '"DB_Alarm_HMI"."Alarm94"'¶
-
Alarm95
= '"DB_Alarm_HMI"."Alarm95"'¶
-
Alarm96
= '"DB_Alarm_HMI"."Alarm96"'¶
-
Alarm97
= '"DB_Alarm_HMI"."Alarm97"'¶
-
Alarm98
= '"DB_Alarm_HMI"."Alarm98"'¶
-
Alarm99
= '"DB_Alarm_HMI"."Alarm99"'¶
-
-
class
hvl_ccb.dev.supercube.constants.
BreakdownDetection
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
Node ID strings for the breakdown detection.
TODO: these variable NodeIDs are not tested and/or correct yet.
-
activated
= '"Ix_Allg_Breakdown_activated"'¶ Boolean read-only variable indicating whether breakdown detection and fast switchoff is enabled in the system or not.
-
reset
= '"Qx_Allg_Breakdown_reset"'¶ Boolean writable variable to reset the fast switch-off. Toggle to re-enable.
-
triggered
= '"Ix_Allg_Breakdown_triggered"'¶ Boolean read-only variable telling whether the fast switch-off has triggered. This can also be seen using the safety circuit state, therefore no method is implemented to read this out directly.
-
-
class
hvl_ccb.dev.supercube.constants.
Door
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)¶ Bases:
hvl_ccb.dev.supercube.constants._DoorEnumBase
Variable NodeID strings for doors.
-
status_1
= '"DB_Safety_Circuit"."Door_1"."si_HMI_status"'¶
-
status_2
= '"DB_Safety_Circuit"."Door_2"."si_HMI_status"'¶
-
status_3
= '"DB_Safety_Circuit"."Door_3"."si_HMI_status"'¶
-
-
class
hvl_ccb.dev.supercube.constants.
DoorStatus
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
aenum.IntEnum
Possible status values for doors.
-
closed
= 2¶ Door is closed, but not locked.
-
error
= 4¶ Door has an error or was opened in locked state (either with emergency stop or from the inside).
-
inactive
= 0¶ not enabled in Supercube HMI setup, this door is not supervised.
-
locked
= 3¶ Door is closed and locked (safe state).
-
open
= 1¶ Door is open.
-
-
class
hvl_ccb.dev.supercube.constants.
EarthingRod
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)¶ Bases:
hvl_ccb.dev.supercube.constants._DoorEnumBase
Variable NodeID strings for earthing rods.
-
status_1
= '"DB_Safety_Circuit"."Door_1"."Ix_earthingrod"'¶
-
status_2
= '"DB_Safety_Circuit"."Door_2"."Ix_earthingrod"'¶
-
status_3
= '"DB_Safety_Circuit"."Door_3"."Ix_earthingrod"'¶
-
-
class
hvl_ccb.dev.supercube.constants.
EarthingRodStatus
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
aenum.IntEnum
Possible status values for earthing rods.
-
experiment_blocked
= 0¶ earthing rod is somewhere in the experiment and blocks the start of the experiment
-
experiment_ready
= 1¶ earthing rod is hanging next to the door, experiment is ready to operate
-
-
class
hvl_ccb.dev.supercube.constants.
EarthingStick
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
Variable NodeID strings for all earthing stick statuses (read-only integer) and writable booleans for setting the earthing in manual mode.
-
classmethod
manual
(number: int)[source]¶ Get the manual enum instance for an earthing stick number.
- Parameters
number – the earthing stick (1..6)
- Returns
the manual instance
- Raises
ValueError – when earthing stick number is not valid
-
manual_1
= '"DB_Safety_Circuit"."Earthstick_1"."sx_earthing_manually"'¶
-
manual_2
= '"DB_Safety_Circuit"."Earthstick_2"."sx_earthing_manually"'¶
-
manual_3
= '"DB_Safety_Circuit"."Earthstick_3"."sx_earthing_manually"'¶
-
manual_4
= '"DB_Safety_Circuit"."Earthstick_4"."sx_earthing_manually"'¶
-
manual_5
= '"DB_Safety_Circuit"."Earthstick_5"."sx_earthing_manually"'¶
-
manual_6
= '"DB_Safety_Circuit"."Earthstick_6"."sx_earthing_manually"'¶
-
classmethod
manuals
() → Tuple[hvl_ccb.dev.supercube.constants.EarthingStick, …][source]¶ Get all earthing stick manual instances.
- Returns
tuple of manual instances
-
property
number
¶ Get corresponding earthing stick number.
- Returns
earthing stick number (1..6)
-
classmethod
operating_status
(number: int)[source]¶ Get the operating status enum instance for an earthing stick number.
- Parameters
number – the earthing stick (1..6)
- Returns
the operating status instance
- Raises
ValueError – when earthing stick number is not valid
-
operating_status_1
= '"DB_Safety_Circuit"."Earthstick_1"."sx_manual_control_active"'¶
-
operating_status_2
= '"DB_Safety_Circuit"."Earthstick_2"."sx_manual_control_active"'¶
-
operating_status_3
= '"DB_Safety_Circuit"."Earthstick_3"."sx_manual_control_active"'¶
-
operating_status_4
= '"DB_Safety_Circuit"."Earthstick_4"."sx_manual_control_active"'¶
-
operating_status_5
= '"DB_Safety_Circuit"."Earthstick_5"."sx_manual_control_active"'¶
-
operating_status_6
= '"DB_Safety_Circuit"."Earthstick_6"."sx_manual_control_active"'¶
-
classmethod
operating_statuses
() → Tuple[hvl_ccb.dev.supercube.constants.EarthingStick, …][source]¶ Get all earthing stick operating status instances.
- Returns
tuple of operating status instances
-
classmethod
range
() → Sequence[int][source]¶ Integer range of all earthing sticks.
- Returns
sequence of earthing sticks numbers
-
classmethod
status
(number: int) → hvl_ccb.dev.supercube.constants.EarthingStick[source]¶ Get the status enum instance for an earthing stick number.
- Parameters
number – the earthing stick (1..6)
- Returns
the status instance
- Raises
ValueError – when earthing stick number is not valid
-
status_1
= '"DB_Safety_Circuit"."Earthstick_1"."si_HMI_Status"'¶
-
status_2
= '"DB_Safety_Circuit"."Earthstick_2"."si_HMI_Status"'¶
-
status_3
= '"DB_Safety_Circuit"."Earthstick_3"."si_HMI_Status"'¶
-
status_4
= '"DB_Safety_Circuit"."Earthstick_4"."si_HMI_Status"'¶
-
status_5
= '"DB_Safety_Circuit"."Earthstick_5"."si_HMI_Status"'¶
-
status_6
= '"DB_Safety_Circuit"."Earthstick_6"."si_HMI_Status"'¶
-
classmethod
statuses
() → Tuple[hvl_ccb.dev.supercube.constants.EarthingStick, …][source]¶ Get all earthing stick status instances.
- Returns
tuple of status instances
-
classmethod
-
class
hvl_ccb.dev.supercube.constants.
EarthingStickMeta
(clsname, bases, clsdict, **kwargs)[source]¶ Bases:
aenum.EnumType
-
class
hvl_ccb.dev.supercube.constants.
EarthingStickOperatingStatus
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
aenum.IntEnum
Operating Status for an earthing stick. Stick can be used in auto or manual mode.
-
auto
= 0¶
-
manual
= 1¶
-
-
class
hvl_ccb.dev.supercube.constants.
EarthingStickOperation
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
aenum.IntEnum
Operation of the earthing stick in manual operating mode. Can be closed of opened.
-
close
= 1¶
-
open
= 0¶
-
-
class
hvl_ccb.dev.supercube.constants.
EarthingStickStatus
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
aenum.IntEnum
Status of an earthing stick. These are the possible values in the status integer e.g. in
EarthingStick.status_1
.-
closed
= 1¶ Earthing is closed (safe).
-
error
= 3¶ Earthing is in error, e.g. when the stick did not close correctly or could not open.
-
inactive
= 0¶ Earthing stick is deselected and not enabled in safety circuit. To get out of this state, the earthing has to be enabled in the Supercube HMI setup.
-
open
= 2¶ Earthing is open (not safe).
-
-
class
hvl_ccb.dev.supercube.constants.
Errors
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
Variable NodeID strings for information regarding error, warning and message handling.
-
message
= '"DB_Message_Buffer"."Info_active"'¶ Boolean read-only variable telling if a message is active.
-
quit
= '"DB_Message_Buffer"."Reset_button"'¶ Writable boolean for the error quit button.
-
stop
= '"DB_Message_Buffer"."Stop_active"'¶ Boolean read-only variable telling if a stop is active.
-
warning
= '"DB_Message_Buffer"."Warning_active"'¶ Boolean read-only variable telling if a warning is active.
-
-
class
hvl_ccb.dev.supercube.constants.
GeneralSockets
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
NodeID strings for the power sockets (3x T13 and 1xCEE16).
-
cee16
= '"Qx_Allg_Socket_CEE16"'¶ CEE16 socket (writeable boolean).
-
t13_1
= '"Qx_Allg_Socket_T13_1"'¶ SEV T13 socket No. 1 (writable boolean).
-
t13_2
= '"Qx_Allg_Socket_T13_2"'¶ SEV T13 socket No. 2 (writable boolean).
-
t13_3
= '"Qx_Allg_Socket_T13_3"'¶ SEV T13 socket No. 3 (writable boolean).
-
-
class
hvl_ccb.dev.supercube.constants.
GeneralSupport
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
NodeID strings for the support inputs and outputs.
-
classmethod
contact_range
() → Sequence[int][source]¶ Integer range of all contacts.
- Returns
sequence of contact numbers
-
in_1_1
= '"Ix_Allg_Support1_1"'¶
-
in_1_2
= '"Ix_Allg_Support1_2"'¶
-
in_2_1
= '"Ix_Allg_Support2_1"'¶
-
in_2_2
= '"Ix_Allg_Support2_2"'¶
-
in_3_1
= '"Ix_Allg_Support3_1"'¶
-
in_3_2
= '"Ix_Allg_Support3_2"'¶
-
in_4_1
= '"Ix_Allg_Support4_1"'¶
-
in_4_2
= '"Ix_Allg_Support4_2"'¶
-
in_5_1
= '"Ix_Allg_Support5_1"'¶
-
in_5_2
= '"Ix_Allg_Support5_2"'¶
-
in_6_1
= '"Ix_Allg_Support6_1"'¶
-
in_6_2
= '"Ix_Allg_Support6_2"'¶
-
classmethod
input
(port: int, contact: int)[source]¶ Get the NodeID string for a support input.
- Parameters
port – the desired port (1..6)
contact – the desired contact at the port (1..2)
- Returns
the node id string
- Raises
ValueError – when port or contact number is not valid
-
out_1_1
= '"Qx_Allg_Support1_1"'¶
-
out_1_2
= '"Qx_Allg_Support1_2"'¶
-
out_2_1
= '"Qx_Allg_Support2_1"'¶
-
out_2_2
= '"Qx_Allg_Support2_2"'¶
-
out_3_1
= '"Qx_Allg_Support3_1"'¶
-
out_3_2
= '"Qx_Allg_Support3_2"'¶
-
out_4_1
= '"Qx_Allg_Support4_1"'¶
-
out_4_2
= '"Qx_Allg_Support4_2"'¶
-
out_5_1
= '"Qx_Allg_Support5_1"'¶
-
out_5_2
= '"Qx_Allg_Support5_2"'¶
-
out_6_1
= '"Qx_Allg_Support6_1"'¶
-
out_6_2
= '"Qx_Allg_Support6_2"'¶
-
classmethod
-
class
hvl_ccb.dev.supercube.constants.
GeneralSupportMeta
(clsname, bases, clsdict, **kwargs)[source]¶ Bases:
aenum.EnumType
-
class
hvl_ccb.dev.supercube.constants.
MeasurementsDividerRatio
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)¶ Bases:
hvl_ccb.dev.supercube.constants._InputEnumBase
Variable NodeID strings for the measurement input scaling ratios. These ratios are defined in the Supercube HMI setup and are provided in the python module here to be able to read them out, allowing further calculations.
-
input_1
= '"DB_Measurements"."si_Divider_Ratio_1"'¶
-
input_2
= '"DB_Measurements"."si_Divider_Ratio_2"'¶
-
input_3
= '"DB_Measurements"."si_Divider_Ratio_3"'¶
-
input_4
= '"DB_Measurements"."si_Divider_Ratio_4"'¶
-
-
class
hvl_ccb.dev.supercube.constants.
MeasurementsScaledInput
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)¶ Bases:
hvl_ccb.dev.supercube.constants._InputEnumBase
Variable NodeID strings for the four analog BNC inputs for measuring voltage. The voltage returned in these variables is already scaled with the set ratio, which can be read using the variables in
MeasurementsDividerRatio
.-
input_1
= '"DB_Measurements"."si_scaled_Voltage_Input_1"'¶
-
input_2
= '"DB_Measurements"."si_scaled_Voltage_Input_2"'¶
-
input_3
= '"DB_Measurements"."si_scaled_Voltage_Input_3"'¶
-
input_4
= '"DB_Measurements"."si_scaled_Voltage_Input_4"'¶
-
-
class
hvl_ccb.dev.supercube.constants.
MessageBoard
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)¶ Bases:
hvl_ccb.dev.supercube.constants._LineEnumBase
Variable NodeID strings for message board lines.
-
line_1
= '"DB_OPC_Connection"."Is_status_Line_1"'¶
-
line_10
= '"DB_OPC_Connection"."Is_status_Line_10"'¶
-
line_11
= '"DB_OPC_Connection"."Is_status_Line_11"'¶
-
line_12
= '"DB_OPC_Connection"."Is_status_Line_12"'¶
-
line_13
= '"DB_OPC_Connection"."Is_status_Line_13"'¶
-
line_14
= '"DB_OPC_Connection"."Is_status_Line_14"'¶
-
line_15
= '"DB_OPC_Connection"."Is_status_Line_15"'¶
-
line_2
= '"DB_OPC_Connection"."Is_status_Line_2"'¶
-
line_3
= '"DB_OPC_Connection"."Is_status_Line_3"'¶
-
line_4
= '"DB_OPC_Connection"."Is_status_Line_4"'¶
-
line_5
= '"DB_OPC_Connection"."Is_status_Line_5"'¶
-
line_6
= '"DB_OPC_Connection"."Is_status_Line_6"'¶
-
line_7
= '"DB_OPC_Connection"."Is_status_Line_7"'¶
-
line_8
= '"DB_OPC_Connection"."Is_status_Line_8"'¶
-
line_9
= '"DB_OPC_Connection"."Is_status_Line_9"'¶
-
-
class
hvl_ccb.dev.supercube.constants.
OpcControl
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
Variable NodeID strings for supervision of the OPC connection from the controlling workstation to the Supercube.
-
active
= '"DB_OPC_Connection"."sx_OPC_active"'¶ writable boolean to enable OPC remote control and display a message window on the Supercube HMI.
-
live
= '"DB_OPC_Connection"."sx_OPC_lifebit"'¶
-
-
class
hvl_ccb.dev.supercube.constants.
Power
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
Variable NodeID strings concerning power data.
- TODO: these variable NodeIDs are not tested and/or correct yet, they don’t exist
yet on Supercube side.
-
current_primary
= 'Qr_Power_FU_actual_Current'¶ Primary current in ampere, measured by the frequency converter. (read-only)
-
frequency
= 'Ir_Power_FU_Frequency'¶ Frequency converter output frequency. (read-only)
-
setup
= 'Qi_Power_Setup'¶ Power setup that is configured using the Supercube HMI. The value corresponds to the ones in
PowerSetup
. (read-only)
-
voltage_max
= 'Iw_Power_max_Voltage'¶ Maximum voltage allowed by the current experimental setup. (read-only)
-
voltage_primary
= 'Qr_Power_FU_actual_Voltage'¶ Primary voltage in volts, measured by the frequency converter at its output. (read-only)
-
voltage_slope
= 'Ir_Power_dUdt'¶ Voltage slope in V/s.
-
voltage_target
= 'Ir_Power_Target_Voltage'¶ Target voltage setpoint in V.
-
class
hvl_ccb.dev.supercube.constants.
PowerSetup
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
aenum.IntEnum
Possible power setups corresponding to the value of variable
Power.setup
.-
AC_DoubleStage_150kV
= 4¶ AC voltage with two MWB transformers, one at 100kV and the other at 50kV, resulting in a total maximum voltage of 150kV.
-
AC_DoubleStage_200kV
= 5¶ AC voltage with two MWB transformers both at 100kV, resulting in a total maximum voltage of 200kV
-
AC_SingleStage_100kV
= 3¶ AC voltage with MWB transformer set to 100kV maximum voltage.
-
AC_SingleStage_50kV
= 2¶ AC voltage with MWB transformer set to 50kV maximum voltage.
-
DC_DoubleStage_280kV
= 8¶ DC voltage with two AC transformers set to 100kV AC each, resulting in 280kV DC in total (or a single stage transformer with Greinacher voltage doubling rectifier)
-
DC_SingleStage_140kV
= 7¶ DC voltage with one AC transformer set to 100kV AC, resulting in 140kV DC
-
External
= 1¶ External power supply fed through blue CEE32 input using isolation transformer and safety switches of the Supercube, or using an external safety switch attached to the Supercube Type B.
-
Internal
= 6¶ Internal usage of the frequency converter, controlling to the primary voltage output of the supercube itself (no measurement transformer used)
-
NoPower
= 0¶ No safety switches, use only safety components (doors, fence, earthing…) without any power.
-
-
class
hvl_ccb.dev.supercube.constants.
Safety
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
NodeID strings for the basic safety circuit status and green/red switches “ready” and “operate”.
-
status
= '"DB_Safety_Circuit"."si_safe_status"'¶ Status is a read-only integer containing the state number of the supercube-internal state machine. The values correspond to numbers in
SafetyStatus
.
-
switch_to_operate
= '"DB_Safety_Circuit"."sx_safe_switch_to_operate"'¶ Writable boolean for switching to Red Operate (locket, HV on) state.
-
switch_to_ready
= '"DB_Safety_Circuit"."sx_safe_switch_to_ready"'¶ Writable boolean for switching to Red Ready (locked, HV off) state.
-
-
class
hvl_ccb.dev.supercube.constants.
SafetyStatus
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
aenum.IntEnum
Safety status values that are possible states returned from
hvl_ccb.dev.supercube.base.Supercube.get_status()
. These values correspond to the states of the Supercube’s safety circuit statemachine.-
Error
= 6¶ System is in error mode.
-
GreenNotReady
= 1¶ System is safe, lamps are green and some safety elements are not in place such that it cannot be switched to red currently.
-
GreenReady
= 2¶ System is safe and all safety elements are in place to be able to switch to ready.
-
Initializing
= 0¶ System is initializing or booting.
-
QuickStop
= 5¶ Fast turn off triggered and switched off the system. Reset FSO to go back to a normal state.
-
RedOperate
= 4¶ System is locked in red state and in operate mode, i.e. high voltage on.
-
RedReady
= 3¶ System is locked in red state and ready to go to operate mode.
-
-
class
hvl_ccb.dev.supercube.constants.
SupercubeOpcEndpoint
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
OPC Server Endpoint strings for the supercube variants.
-
A
= 'Supercube Typ A'¶
-
B
= 'Supercube Typ B'¶
-
-
hvl_ccb.dev.supercube.constants.
T13_SOCKET_PORTS
= (1, 2, 3)¶ Port numbers of SEV T13 power socket
hvl_ccb.dev.supercube.typ_a module¶
Supercube Typ A module.
-
class
hvl_ccb.dev.supercube.typ_a.
SupercubeAOpcUaCommunication
(config)[source]¶ Bases:
hvl_ccb.dev.supercube.base.SupercubeOpcUaCommunication
-
class
hvl_ccb.dev.supercube.typ_a.
SupercubeAOpcUaConfiguration
(host: str, endpoint_name: str = 'Supercube Typ A', port: int = 4840, sub_handler: hvl_ccb.comm.opc.OpcUaSubHandler = <hvl_ccb.dev.supercube.base.SupercubeSubscriptionHandler object at 0x7f38fac10a10>, update_period: int = 500, wait_timeout_retry_sec: Union[int, float] = 1, max_timeout_retry_nr: int = 5)[source]¶ Bases:
hvl_ccb.dev.supercube.base.SupercubeOpcUaCommunicationConfig
-
endpoint_name
: str = 'Supercube Typ A'¶ 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.
-
-
class
hvl_ccb.dev.supercube.typ_a.
SupercubeWithFU
(com, dev_config=None)[source]¶ Bases:
hvl_ccb.dev.supercube.base.SupercubeBase
Variant A of the Supercube with frequency converter.
-
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
-
fso_reset
() → None[source]¶ TODO: test fso_reset with device
Reset the fast switch off circuitry to go back into normal state and allow to re-enable operate mode.
-
get_frequency
() → float[source]¶ TODO: test get_frequency with device
Read the electrical frequency of the current Supercube setup.
- Returns
the frequency in Hz
-
get_fso_active
() → bool[source]¶ TODO: test get_fso_active with device
Get the state of the fast switch off functionality. Returns True if it is enabled, False otherwise.
- Returns
state of the FSO functionality
-
get_max_voltage
() → float[source]¶ TODO: test get_max_voltage with device
Reads the maximum voltage of the setup and returns in V.
- Returns
the maximum voltage of the setup in V.
-
get_power_setup
() → hvl_ccb.dev.supercube.constants.PowerSetup[source]¶ TODO: test get_power_setup with device
Return the power setup selected in the Supercube’s settings.
- Returns
the power setup
-
get_primary_current
() → float[source]¶ TODO: get_primary_current with device
Read the current primary current at the output of the frequency converter ( before transformer).
- Returns
primary current in A
-
get_primary_voltage
() → float[source]¶ TODO: test get_primary_voltage with device
Read the current primary voltage at the output of the frequency converter ( before transformer).
- Returns
primary voltage in V
-
get_target_voltage
() → float[source]¶ TODO: test get_target_voltage with device
Gets the current setpoint of the output voltage value in V. This is not a measured value but is the corresponding function to
set_target_voltage()
.- Returns
the setpoint voltage in V.
-
static
hvl_ccb.dev.supercube.typ_b module¶
Supercube Typ B module.
-
class
hvl_ccb.dev.supercube.typ_b.
SupercubeB
(com, dev_config=None)[source]¶ Bases:
hvl_ccb.dev.supercube.base.SupercubeBase
Variant B of the Supercube without frequency converter but external safety switches.
-
class
hvl_ccb.dev.supercube.typ_b.
SupercubeBOpcUaCommunication
(config)[source]¶ Bases:
hvl_ccb.dev.supercube.base.SupercubeOpcUaCommunication
-
class
hvl_ccb.dev.supercube.typ_b.
SupercubeBOpcUaConfiguration
(host: str, endpoint_name: str = 'Supercube Typ B', port: int = 4840, sub_handler: hvl_ccb.comm.opc.OpcUaSubHandler = <hvl_ccb.dev.supercube.base.SupercubeSubscriptionHandler object at 0x7f38fac10a10>, update_period: int = 500, wait_timeout_retry_sec: Union[int, float] = 1, max_timeout_retry_nr: int = 5)[source]¶ Bases:
hvl_ccb.dev.supercube.base.SupercubeOpcUaCommunicationConfig
-
endpoint_name
: str = 'Supercube Typ B'¶ 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.
-
Module contents¶
Supercube package with implementation for system versions from 2019 on (new concept with hard-PLC Siemens S7-1500 as CPU).