hvl_ccb.dev.supercube2015 package¶
Submodules¶
hvl_ccb.dev.supercube2015.base module¶
Base classes for the Supercube device.
-
exception
hvl_ccb.dev.supercube2015.base.
InvalidSupercubeStatusError
[source]¶ Bases:
Exception
Exception raised when supercube has invalid status.
-
class
hvl_ccb.dev.supercube2015.base.
Supercube2015Base
(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.supercube2015.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_manual
(number: int) → bool[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
earthing stick manual status
-
get_earthing_status
(number: int) → int[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; see constants.EarthingStickStatus
-
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.
Attention: Supercube 2015 does not have a separate ratio for every analog input. Therefore there is only one ratio for
channel = 1
.- Parameters
channel – number of the input channel (1..4)
- Returns
the ratio
-
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.
Attention: In contrast to the new Supercube, the old one returns here the input voltage read at the ADC. It is not scaled by a factor.
- Parameters
channel – number of the input channel (1..4)
- Returns
measured voltage
-
get_status
() → int[source]¶ Get the safety circuit status of the Supercube.
- Returns
the safety status of the supercube’s state machine; see constants.SafetyStatus.
-
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
-
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
-
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
-
horn
(state: bool) → None[source]¶ Turns acoustic horn on or off.
- Parameters
state – Turns horn on (True) or off (False)
-
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
-
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_earthing_manual
(number: int, manual: bool) → None[source]¶ Set 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)
manual – earthing stick manual status (True or False)
-
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_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
-
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
-
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
-
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.supercube2015.base.
SupercubeConfiguration
(namespace_index: int = 7)[source]¶ Bases:
object
Configuration dataclass for the Supercube devices.
-
clean_values
()¶ Cleans and enforces configuration values. Does nothing by default, but may be overridden to add custom configuration value checks.
-
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 = 7¶ 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.
-
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.supercube2015.base.
SupercubeOpcUaCommunication
(config)[source]¶ Bases:
hvl_ccb.comm.opc.OpcUaCommunication
Communication protocol specification for Supercube devices.
-
class
hvl_ccb.dev.supercube2015.base.
SupercubeOpcUaCommunicationConfig
(host: str, endpoint_name: str, port: int = 4845, sub_handler: hvl_ccb.comm.opc.OpcUaSubHandler = <hvl_ccb.dev.supercube2015.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.
-
port
: int = 4845¶ Port of the OPC UA server to connect to.
-
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.supercube2015.base.SupercubeSubscriptionHandler object>¶ Subscription handler for data change events
-
-
class
hvl_ccb.dev.supercube2015.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.supercube2015.constants module¶
Constants, variable names for the Supercube OPC-connected devices.
-
class
hvl_ccb.dev.supercube2015.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.-
Alarm0
= 'No Alarm.'¶
-
Alarm1
= 'STOP Safety switch 1 error'¶
-
Alarm10
= 'STOP Earthing stick 2 error'¶
-
Alarm11
= 'STOP Earthing stick 3 error'¶
-
Alarm12
= 'STOP Earthing stick 4 error'¶
-
Alarm13
= 'STOP Earthing stick 5 error'¶
-
Alarm14
= 'STOP Earthing stick 6 error'¶
-
Alarm17
= 'STOP Source switch error'¶
-
Alarm19
= 'STOP Fence 1 error'¶
-
Alarm2
= 'STOP Safety switch 2 error'¶
-
Alarm20
= 'STOP Fence 2 error'¶
-
Alarm21
= 'STOP Control error'¶
-
Alarm22
= 'STOP Power outage'¶
-
Alarm3
= 'STOP Emergency Stop 1'¶
-
Alarm4
= 'STOP Emergency Stop 2'¶
-
Alarm5
= 'STOP Emergency Stop 3'¶
-
Alarm6
= 'STOP Door 1 lock supervision'¶
-
Alarm7
= 'STOP Door 2 lock supervision'¶
-
Alarm8
= 'STOP Door 3 lock supervision'¶
-
Alarm9
= 'STOP Earthing stick 1 error'¶
-
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.supercube2015.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.
-
activated
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.Breakdowndetection.connect'¶ Boolean read-only variable indicating whether breakdown detection and fast switchoff is enabled in the system or not.
-
reset
= 'hvl-ipc.WINAC.Support6OutA'¶ Boolean writable variable to reset the fast switch-off. Toggle to re-enable.
-
triggered
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.Breakdowndetection.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.supercube2015.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.supercube2015.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 attribute for an earthing stick number.
- Parameters
number – the earthing stick (1..6)
- Returns
the manual enum
-
manual_1
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_1.MANUAL'¶
-
manual_2
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_2.MANUAL'¶
-
manual_3
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_3.MANUAL'¶
-
manual_4
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_4.MANUAL'¶
-
manual_5
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_5.MANUAL'¶
-
manual_6
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_6.MANUAL'¶
-
status_1_closed
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_1.CLOSE'¶
-
status_1_connected
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_1.CONNECT'¶
-
status_1_open
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_1.OPEN'¶
-
status_2_closed
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_2.CLOSE'¶
-
status_2_connected
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_2.CONNECT'¶
-
status_2_open
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_2.OPEN'¶
-
status_3_closed
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_3.CLOSE'¶
-
status_3_connected
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_3.CONNECT'¶
-
status_3_open
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_3.OPEN'¶
-
status_4_closed
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_4.CLOSE'¶
-
status_4_connected
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_4.CONNECT'¶
-
status_4_open
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_4.OPEN'¶
-
status_5_closed
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_5.CLOSE'¶
-
status_5_connected
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_5.CONNECT'¶
-
status_5_open
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_5.OPEN'¶
-
status_6_closed
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_6.CLOSE'¶
-
status_6_connected
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_6.CONNECT'¶
-
status_6_open
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.STICK_6.OPEN'¶
-
classmethod
status_closed
(number: int)[source]¶ Get the status enum attribute for an earthing stick number.
- Parameters
number – the earthing stick (1..6)
- Returns
the status enum
-
classmethod
-
class
hvl_ccb.dev.supercube2015.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.supercube2015.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.
-
quit
= 'hvl-ipc.WINAC.SYSTEMSTATE.Faultconfirmation'¶ Writable boolean for the error quit button.
-
stop
= 'hvl-ipc.WINAC.SYSTEMSTATE.ERROR'¶ Boolean read-only variable telling if a stop is active.
-
stop_number
= 'hvl-ipc.WINAC.SYSTEMSTATE.Errornumber'¶
-
-
class
hvl_ccb.dev.supercube2015.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
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.CEE16'¶ CEE16 socket (writeable boolean).
-
t13_1
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.T13_1'¶ SEV T13 socket No. 1 (writable boolean).
-
t13_2
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.T13_2'¶ SEV T13 socket No. 2 (writable boolean).
-
t13_3
= 'hvl-ipc.WINAC.SYSTEM_COMPONENTS.T13_3'¶ SEV T13 socket No. 3 (writable boolean).
-
-
class
hvl_ccb.dev.supercube2015.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.
-
in_1_1
= 'hvl-ipc.WINAC.Support1InA'¶
-
in_1_2
= 'hvl-ipc.WINAC.Support1InB'¶
-
in_2_1
= 'hvl-ipc.WINAC.Support2InA'¶
-
in_2_2
= 'hvl-ipc.WINAC.Support2InB'¶
-
in_3_1
= 'hvl-ipc.WINAC.Support3InA'¶
-
in_3_2
= 'hvl-ipc.WINAC.Support3InB'¶
-
in_4_1
= 'hvl-ipc.WINAC.Support4InA'¶
-
in_4_2
= 'hvl-ipc.WINAC.Support4InB'¶
-
in_5_1
= 'hvl-ipc.WINAC.Support5InA'¶
-
in_5_2
= 'hvl-ipc.WINAC.Support5InB'¶
-
in_6_1
= 'hvl-ipc.WINAC.Support6InA'¶
-
in_6_2
= 'hvl-ipc.WINAC.Support6InB'¶
-
classmethod
input
(port, contact)[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
-
out_1_1
= 'hvl-ipc.WINAC.Support1OutA'¶
-
out_1_2
= 'hvl-ipc.WINAC.Support1OutB'¶
-
out_2_1
= 'hvl-ipc.WINAC.Support2OutA'¶
-
out_2_2
= 'hvl-ipc.WINAC.Support2OutB'¶
-
out_3_1
= 'hvl-ipc.WINAC.Support3OutA'¶
-
out_3_2
= 'hvl-ipc.WINAC.Support3OutB'¶
-
out_4_1
= 'hvl-ipc.WINAC.Support4OutA'¶
-
out_4_2
= 'hvl-ipc.WINAC.Support4OutB'¶
-
out_5_1
= 'hvl-ipc.WINAC.Support5OutA'¶
-
out_5_2
= 'hvl-ipc.WINAC.Support5OutB'¶
-
out_6_1
= 'hvl-ipc.WINAC.Support6OutA'¶
-
out_6_2
= 'hvl-ipc.WINAC.Support6OutB'¶
-
-
class
hvl_ccb.dev.supercube2015.constants.
MeasurementsDividerRatio
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
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.
-
classmethod
get
(channel: int)[source]¶ Get the attribute for an input number.
- Parameters
channel – the channel number (1..4)
- Returns
the enum for the desired channel.
-
input_1
= 'hvl-ipc.WINAC.SYSTEM_INTERN.DivididerRatio'¶
-
classmethod
-
class
hvl_ccb.dev.supercube2015.constants.
MeasurementsScaledInput
(value=<object object>, names=None, module=None, type=None, start=1, boundary=None)[source]¶ Bases:
hvl_ccb.utils.enum.ValueEnum
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
.-
classmethod
get
(channel: int)[source]¶ Get the attribute for an input number.
- Parameters
channel – the channel number (1..4)
- Returns
the enum for the desired channel.
-
input_1
= 'hvl-ipc.WINAC.SYSTEM_INTERN.AI1Volt'¶
-
input_2
= 'hvl-ipc.WINAC.SYSTEM_INTERN.AI2Volt'¶
-
input_3
= 'hvl-ipc.WINAC.SYSTEM_INTERN.AI3Volt'¶
-
input_4
= 'hvl-ipc.WINAC.SYSTEM_INTERN.AI4Volt'¶
-
classmethod
-
class
hvl_ccb.dev.supercube2015.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.
-
current_primary
= 'hvl-ipc.WINAC.SYSTEM_INTERN.FUCurrentprim'¶ Primary current in ampere, measured by the frequency converter. (read-only)
-
frequency
= 'hvl-ipc.WINAC.FU.Frequency'¶ Frequency converter output frequency. (read-only)
-
setup
= 'hvl-ipc.WINAC.FU.TrafoSetup'¶ Power setup that is configured using the Supercube HMI. The value corresponds to the ones in
PowerSetup
. (read-only)
-
voltage_max
= 'hvl-ipc.WINAC.FU.maxVoltagekV'¶ Maximum voltage allowed by the current experimental setup. (read-only)
-
voltage_primary
= 'hvl-ipc.WINAC.SYSTEM_INTERN.FUVoltageprim'¶ Primary voltage in volts, measured by the frequency converter at its output. (read-only)
-
voltage_slope
= 'hvl-ipc.WINAC.FU.dUdt_-1'¶ Voltage slope in V/s.
-
voltage_target
= 'hvl-ipc.WINAC.FU.SOLL'¶ Target voltage setpoint in V.
-
-
class
hvl_ccb.dev.supercube2015.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
= 3¶ 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
= 4¶ AC voltage with two MWB transformers both at 100kV, resulting in a total maximum voltage of 200kV
-
AC_SingleStage_100kV
= 2¶ AC voltage with MWB transformer set to 100kV maximum voltage.
-
AC_SingleStage_50kV
= 1¶ AC voltage with MWB transformer set to 50kV maximum voltage.
-
DC_DoubleStage_280kV
= 7¶ 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
= 6¶ DC voltage with one AC transformer set to 100kV AC, resulting in 140kV DC
-
External
= 0¶ 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
= 5¶ Internal usage of the frequency converter, controlling to the primary voltage output of the supercube itself (no measurement transformer used)
-
-
class
hvl_ccb.dev.supercube2015.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”.
-
horn
= 'hvl-ipc.WINAC.SYSTEM_INTERN.hornen'¶ Writeable boolean to manually turn on or off the horn
-
status_error
= 'hvl-ipc.WINAC.SYSTEMSTATE.ERROR'¶
-
status_green
= 'hvl-ipc.WINAC.SYSTEMSTATE.GREEN'¶
-
status_ready_for_red
= 'hvl-ipc.WINAC.SYSTEMSTATE.ReadyForRed'¶ Status is a read-only integer containing the state number of the supercube-internal state machine. The values correspond to numbers in
SafetyStatus
.
-
status_red
= 'hvl-ipc.WINAC.SYSTEMSTATE.RED'¶
-
switchto_green
= 'hvl-ipc.WINAC.SYSTEMSTATE.GREEN_REQUEST'¶
-
switchto_operate
= 'hvl-ipc.WINAC.SYSTEMSTATE.switchon'¶ Writable boolean for switching to Red Operate (locket, HV on) state.
-
switchto_ready
= 'hvl-ipc.WINAC.SYSTEMSTATE.RED_REQUEST'¶ Writable boolean for switching to Red Ready (locked, HV off) state.
-
-
class
hvl_ccb.dev.supercube2015.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.supercube2015.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
= 'OPC.SimaticNET.S7'¶
-
B
= 'OPC.SimaticNET.S7'¶
-
-
hvl_ccb.dev.supercube2015.constants.
T13_SOCKET_PORTS
= (1, 2, 3)¶ Port numbers of SEV T13 power socket
hvl_ccb.dev.supercube2015.typ_a module¶
Supercube Typ A module.
-
class
hvl_ccb.dev.supercube2015.typ_a.
Supercube2015WithFU
(com, dev_config=None)[source]¶ Bases:
hvl_ccb.dev.supercube2015.base.Supercube2015Base
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]¶ Reset the fast switch off circuitry to go back into normal state and allow to re-enable operate mode.
-
get_frequency
() → float[source]¶ Read the electrical frequency of the current Supercube setup.
- Returns
the frequency in Hz
-
get_fso_active
() → bool[source]¶ 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]¶ 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.supercube2015.constants.PowerSetup[source]¶ Return the power setup selected in the Supercube’s settings.
- Returns
the power setup
-
get_primary_current
() → float[source]¶ Read the current primary current at the output of the frequency converter ( before transformer).
- Returns
primary current in A
-
get_primary_voltage
() → float[source]¶ Read the current primary voltage at the output of the frequency converter ( before transformer).
- Returns
primary voltage in V
-
get_target_voltage
() → float[source]¶ 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
-
class
hvl_ccb.dev.supercube2015.typ_a.
SupercubeAOpcUaCommunication
(config)[source]¶ Bases:
hvl_ccb.dev.supercube2015.base.SupercubeOpcUaCommunication
-
class
hvl_ccb.dev.supercube2015.typ_a.
SupercubeAOpcUaConfiguration
(host: str, endpoint_name: str = 'OPC.SimaticNET.S7', port: int = 4845, sub_handler: hvl_ccb.comm.opc.OpcUaSubHandler = <hvl_ccb.dev.supercube2015.base.SupercubeSubscriptionHandler object at 0x7f38f9900f10>, update_period: int = 500, wait_timeout_retry_sec: Union[int, float] = 1, max_timeout_retry_nr: int = 5)[source]¶ Bases:
hvl_ccb.dev.supercube2015.base.SupercubeOpcUaCommunicationConfig
-
endpoint_name
: str = 'OPC.SimaticNET.S7'¶ 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 the old system version from 2015 based on Siemens WinAC soft-PLC on an industrial 32bit Windows computer.