Skip to content

MbTechnologiesHvm0624#

Controls a MB Technologies HVM0624 high voltage switch matrix (6 rows, 24 columns) from Python scripts. Provides relay switching on the switch matrix. This class inherits from MeasmaticDevice.


property columns#

Returns the number of columns of the switch matrix (24).

Returns#

Type Description
int The number of columns of the switch matrix.

Example#

matrix = measmatic.get_device('device-switch')
columns = matrix.columns

property rows#

Returns the number of rows of the switch matrix (6).

Returns#

Type Description
int The number of rows of the switch matrix.

Example#

matrix = measmatic.get_device('device-switch')
rows = matrix.rows

method close_relay(row: int, column: int)#

Closes a relay of the switch matrix, then waits for the configured switching delay. Raises an error if the row or column does not exist.

Parameters#

Name Description
row Row of the relay in the switch matrix, starting at 1.
column Column of the relay in the switch matrix, starting at 1.

Example#

matrix = measmatic.get_device('device-switch')
matrix.close_relay(2, 5)

method close_relay(relay: Any)#

Closes the relay described by the given relay object. Its DesiredState is ignored.

Parameters#

Name Description
relay The relay to switch, an instance of Atv.Framework.Devices.Switch.Model.SwitchRelay (its Row and Column

Example#

from Atv.Framework.Devices.Switch.Model import SwitchRelay
matrix = measmatic.get_device('device-switch')
relay = SwitchRelay()
relay.Row = 2
relay.Column = 5
matrix.close_relay(relay)

method close_relay(relayList: Any)#

Closes several relays, then waits for the configured switching delay. All relays are checked for existence first. Only relays whose DesiredState is Closed are sent to the device; the call fails if none is.

Parameters#

Name Description
relayList The relays to switch, a Python list of Atv.Framework.Devices.Switch.Model.SwitchRelay objects.

Example#

from Atv.Framework.Devices.Switch.Model import SwitchRelay
matrix = measmatic.get_device('device-switch')
relays = []
for column in (1, 2):
relay = SwitchRelay()
relay.Row = 1
relay.Column = column
relay.DesiredState = RelayState.Closed  # Atv.Framework.Devices.Switch.Enumeration.RelayState
relays.append(relay)
matrix.close_relay(relays)

method close_relay_impl(relayList: Any)#

Device-specific implementation behind close_relay. Closes several relays. Sends the command to the device directly, without range check of row and column and without switching delay. Use close_relay in normal scripts. Only relays whose DesiredState is Closed are included; the call fails if none is.

Parameters#

Name Description
relayList The relays to switch, a Python list of Atv.Framework.Devices.Switch.Model.SwitchRelay objects.

Example#

from Atv.Framework.Devices.Switch.Model import SwitchRelay
matrix = measmatic.get_device('device-switch')
relays = []
for column in (1, 2):
relay = SwitchRelay()
relay.Row = 1
relay.Column = column
relay.DesiredState = RelayState.Closed  # Atv.Framework.Devices.Switch.Enumeration.RelayState
relays.append(relay)
matrix.close_relay_impl(relays)

method close_relay_impl(row: int, column: int)#

Device-specific implementation behind close_relay. Closes one relay. Sends the command to the device directly, without range check of row and column and without switching delay. Use close_relay in normal scripts.

Parameters#

Name Description
row Row of the relay in the switch matrix, starting at 1.
column Column of the relay in the switch matrix, starting at 1.

Example#

matrix = measmatic.get_device('device-switch')
matrix.close_relay_impl(2, 5)

method open_all()#

Opens all relays of the switch matrix.

Example#

matrix = measmatic.get_device('device-switch')
matrix.open_all()

method open_relay(row: int, column: int)#

Opens a relay of the switch matrix, then waits for the configured switching delay. Raises an error if the row or column does not exist.

Parameters#

Name Description
row Row of the relay in the switch matrix, starting at 1.
column Column of the relay in the switch matrix, starting at 1.

Example#

matrix = measmatic.get_device('device-switch')
matrix.open_relay(2, 5)

method open_relay(relay: Any)#

Opens the relay described by the given relay object. Its DesiredState is ignored.

Parameters#

Name Description
relay The relay to switch, an instance of Atv.Framework.Devices.Switch.Model.SwitchRelay (its Row and Column

Example#

from Atv.Framework.Devices.Switch.Model import SwitchRelay
matrix = measmatic.get_device('device-switch')
relay = SwitchRelay()
relay.Row = 2
relay.Column = 5
matrix.open_relay(relay)

method open_relay(relayList: Any)#

Opens several relays, then waits for the configured switching delay. All relays are checked for existence first. Only relays whose DesiredState is Open are sent to the device; the call fails if none is.

Parameters#

Name Description
relayList The relays to switch, a Python list of Atv.Framework.Devices.Switch.Model.SwitchRelay objects.

Example#

from Atv.Framework.Devices.Switch.Model import SwitchRelay
matrix = measmatic.get_device('device-switch')
relays = []
for column in (1, 2):
relay = SwitchRelay()
relay.Row = 1
relay.Column = column
relay.DesiredState = RelayState.Open  # Atv.Framework.Devices.Switch.Enumeration.RelayState
relays.append(relay)
matrix.open_relay(relays)

method open_relay_impl(row: int, column: int)#

Device-specific implementation behind open_relay. Opens one relay. Sends the command to the device directly, without range check of row and column and without switching delay. Use open_relay in normal scripts.

Parameters#

Name Description
row Row of the relay in the switch matrix, starting at 1.
column Column of the relay in the switch matrix, starting at 1.

Example#

matrix = measmatic.get_device('device-switch')
matrix.open_relay_impl(2, 5)

method open_relay_impl(relayList: Any)#

Device-specific implementation behind open_relay. Opens several relays. Sends the command to the device directly, without range check of row and column and without switching delay. Use open_relay in normal scripts. Only relays whose DesiredState is Open are included; the call fails if none is.

Parameters#

Name Description
relayList The relays to switch, a Python list of Atv.Framework.Devices.Switch.Model.SwitchRelay objects.

Example#

from Atv.Framework.Devices.Switch.Model import SwitchRelay
matrix = measmatic.get_device('device-switch')
relays = []
for column in (1, 2):
relay = SwitchRelay()
relay.Row = 1
relay.Column = column
relay.DesiredState = RelayState.Open  # Atv.Framework.Devices.Switch.Enumeration.RelayState
relays.append(relay)
matrix.open_relay_impl(relays)

method switch_relay(relay: Any)#

Switches a relay according to its desired state: opens it if DesiredState is Open, closes it if DesiredState is Closed, and does nothing otherwise.

Parameters#

Name Description
relay The relay to switch, an instance of Atv.Framework.Devices.Switch.Model.SwitchRelay. Its Row and Column

Example#

from Atv.Framework.Devices.Switch.Model import SwitchRelay
matrix = measmatic.get_device('device-switch')
relay = SwitchRelay()
relay.Row = 2
relay.Column = 5
relay.DesiredState = RelayState.Closed  # Atv.Framework.Devices.Switch.Enumeration.RelayState
matrix.switch_relay(relay)

method switch_relay(relayList: Any, switchingOrder: Any = ...)#

Switches several relays according to their desired states. Relays with DesiredState Open are opened and relays with DesiredState Closed are closed, in the given order. Does nothing for an empty list.

Parameters#

Name Description
relayList The relays to switch, a Python list of Atv.Framework.Devices.Switch.Model.SwitchRelay objects.
switchingOrder Order in which relays are switched if the list contains relays to open and to close, a Default: ...

Example#

from Atv.Framework.Devices.Switch.Model import SwitchRelay
matrix = measmatic.get_device('device-switch')
relays = []
for column in (1, 2):
relay = SwitchRelay()
relay.Row = 1
relay.Column = column
relay.DesiredState = RelayState.Closed  # Atv.Framework.Devices.Switch.Enumeration.RelayState
relays.append(relay)
matrix.switch_relay(relays)