MKS Instruments Abstract Instrument

class pymeasure.instruments.mksinst.mksinst.MKSInstrument(adapter, name='MKS Instrument', address=253, **kwargs)

Bases: Instrument

Abstract MKS Instrument

Connection to the device is made through an RS232/RS485 serial connection. The communication protocol of these devices is as follows:

Query: ‘@<aaa><Command>?;FF’ with the response ‘@<aaa>ACK<Response>;FF’ Set command: ‘@<aaa><Command>!<parameter>;FF’ with the response ‘@<aaa>ACK<Response>;FF’ Above <aaa> is an address from 001 to 254 which can be specified upon initialization. Since ‘;FF’ is not supported by pyvisa as terminator this class overloads the device communication methods.

Parameters:
  • adapter – pyvisa resource name of the instrument or adapter instance

  • name (string) – The name of the instrument.

  • address – device address included in every message to the instrument (default=253) (default: 253)

  • kwargs – Any valid key-word argument for Instrument

check_set_errors()

Check reply string for acknowledgement string.

read()

Reads from the instrument including the correct termination characters

write(command)

Write to the instrument including the device address.

Parameters:

command – command string to be sent to the instrument

class pymeasure.instruments.mksinst.mksinst.RelayChannel(parent, id, **kwargs)

Bases: Channel

Settings of the optionally included setpoint relay.

The relay is energized either below or above the setpoint depending on the ‘direction’ property. The relay is de-energized when the reset value is crossed in the opposite direction.

Note that device by default uses an auto hysteresis setting of 10% of the setpoint value that overwrites the current reset value whenever the setpoint value or direction is changed. If other hysteresis value than 10% is required, first set the setpoint value and direction before setting the reset value.

property direction: Any

Control the switching direction

property resetpoint: Any

Control the relay switch off value

property setpoint: Any

Control the relay switch setpoint

property status: Any

Get the setpoint relay status