Skip to content

AgilentE5250A#

Controls a Agilent/HP E5250A low leakage switch mainframe 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, as determined from the detected cards and the card configuration.

Returns#

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

Example#

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

property configuration#

Returns the configuration of the device.

Returns#

Type Description
Any The device configuration, an Atv.Framework.Devices.Configuration.SwitchWithSlotsConfigurationBase.

Example#

matrix = measmatic.get_device('device-switch')
config = matrix.configuration

property number_of_slots#

Returns the number of card slots of the E5250A mainframe.

Returns#

Type Description
int The number of card slots (4).

Example#

matrix = measmatic.get_device('device-switch')
slots = matrix.number_of_slots

property rows#

Returns the number of rows of the switch matrix, as determined from the detected cards and the card configuration.

Returns#

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

Example#

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

property switch_cards#

Returns the cards that were scanned in the four slots of the mainframe.

Returns#

Type Description
Any The cards, an iterable of Atv.Framework.Devices.Switch.Contracts.ISwitchCard.

Example#

matrix = measmatic.get_device('device-switch')
for card in matrix.switch_cards:
print(card)

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 on all slots that contain a card, then waits for the configured switching delay.

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)