# Temptronic Base Class

class pymeasure.instruments.temptronic.ATSBase(adapter, name='ATSBase', **kwargs)

  Bases: `SCPIUnknownMixin`, `Instrument`

  The base class for Temptronic ATSXXX instruments.

  property air_temperature

    Read air temperature in 0.1 °C increments.

    Type:

      float

  at_temperature()
    Returns:

      `True` if at temperature.

  property auxiliary_condition_code

    Read out auxiliary condition status register.

    Type:

      int

    Relevant flags are:

    Bit | Meaning
    --- | ---
    10 | None
    9 | Ramp mode
    8 | Mode: 0 programming, 1 manual
    7 | None
    6 | TS status: 0 start-up, 1 ready
    5 | Flow: 0 off, 1 on
    4 | Sense mode: 0 air, 1 DUT
    3 | Compressor: 0 on, 1 off (heating possible)
    2 | Head: 0 lower, upper
    1 | None
    0 | None

    Refer to chapter 4 in the manual

  clear()

    Clear device-specific errors.

    See `error_code` for further information.

  property compressor_enable

    `True` enables compressors, `False` disables it.

    Type:

      Boolean

  configure(temp_window=1, dut_type='T', soak_time=30, dut_constant=100, temp_limit_air_low=-60, temp_limit_air_high=220, temp_limit_air_dut=50, maximum_test_time=1000)

    Convenience method for most relevant configuration properties.

    Parameters:

      - dut_type – string: indicating which DUT type to use

      - soak_time – float: elapsed time in soak_window before settling is indicated

      - soak_window – float: Soak window size or temperature settlings bounds (K)

      - dut_constant – float: time constant of DUT, higher values indicate higher thermal mass

      - temp_limit_air_low – float: minimum flow temperature limit (°C)

      - temp_limit_air_high – float: maximum flow temperature limit (°C)

      - temp_limit_air_dut – float: allowed temperature difference (K) between DUT and Flow

      - maximum_test_time – float: maximum test time (seconds) for a single temperature point (safety)

    Returns:

      self

  property copy_active_setup_file

    Copy active setup file (0) to setup n (1 - 12).

    Type:

      int

  property current_cycle_count

    Read the number of cycles to do

    Type:

      int

  property cycling_enable

    CYCL Start/stop cycling.

    Type:

      bool

    cycling_enable = True (start cycling) cycling_enable = False (stop cycling)

  cycling_stopped()
    Returns:

      `True` if cycling has stopped.

  property dut_constant

    Control thermal constant (default 100) of DUT.

    Type:

      float

    Lower values indicate lower thermal mass, higher values indicate higher thermal mass respectively.

  property dut_mode

    `On` enables DUT mode, `OFF` enables air mode

    Type:

      string

  property dut_temperature

    Read DUT temperature, in 0.1 °C increments.

    Type:

      float

  property dut_type

    Control DUT sensor type.

    Type:

      string

    Possible values are:

    String | Meaning
    --- | ---
    ‘’ | no DUT
    ‘T’ | T-DUT
    ‘K’ | K-DUT

    Warning: If in DUT mode without DUT being connected, TS flags DUT error

  property dynamic_temperature_setpoint

    Read the dynamic temperature setpoint.

    Type:

      float

  property enable_air_flow

    Set TS air flow.

    `True` enables air flow, `False` disables it

    Type:

      bool

  end_of_all_cycles()
    Returns:

      `True` if cycling has stopped.

  end_of_one_cycle()
    Returns:

      `True` if TS is at end of one cycle.

  end_of_test()
    Returns:

      `True` if TS is at end of test.

  enter_cycle()

    Enter Cycle by sending `RMPC 1`.

    Returns:

      self

  enter_ramp()

    Enter Ramp by sending `RMPS 0`.

    Returns:

      self

  property error_code

    Read the device-specific error register (16 bits).

    Type:

      `ErrorCode`

  error_status()

    Returns error status code (maybe used for logging).

    Returns:

      `ErrorCode`

  property head

    Control TS head position.

    Type:

      string

    `down`: transfer head to lower position `up`: transfer head to elevated position

  property learn_mode

    Control DUT automatic tuning (learning).

    Type:

      bool `False`: off `True`: automatic tuning on

  property load_setup_file

    loads setup file SFIL.

    Valid range is between 1 to 12.

    Type:

      int

  property local_lockout

    `True` disables TS GUI, `False` enables it.

  property main_air_flow_rate

    Read main nozzle air flow rate in liters/sec.

  property maximum_test_time

    Control maximum allowed test time (s).

    Type:

      float

    This prevents TS from staying at a single temperature forever. Valid range: 0 to 9999

  property mode

    Returns a string indicating what the system is doing at the time the query is processed.

    Type:

      string

    (dynamic)

  next_setpoint()

    Step to the next setpoint during temperature cycling.

  not_at_temperature()
    Returns:

      `True` if not at temperature.

  property nozzle_air_flow_rate

    Read main nozzle air flow rate in scfm.

  property ramp_rate

    Control ramp rate (K / min).

    Type:

      float

    allowed values: nn.n: 0 to 99.9 in 0.1 K per minute steps. nnnn: 100 to 9999 in 1 K per minute steps.

  property remote_mode

    `True` disables TS GUI but displays a “Return to local” switch.

  reset()

    Reset (force) the System to the Operator screen.

    Returns:

      self

  property set_point_number

    Select a setpoint to be the current setpoint.

    Type:

      int

    Valid range is 0 to 17 when on the Cycle screen or or 0 to 2 in case of operator screen (0=hot, 1=ambient, 2=cold).

  set_temperature(set_temp)

    sweep to a specified setpoint.

    Parameters:

      set_temp – target temperature for DUT (float)

    Returns:

      self

  shutdown(head=False)

    Turn down TS (flow and remote operation).

    Parameters:

      head – Lift head if `True`

    Returns:

      self

  start(enable_air_flow=True)

    start TS in remote mode.

    Parameters:

      enable_air_flow – flow starts if `True`

    Returns:

      self

  property temperature

    Read current temperature with 0.1 °C resolution.

    Type:

      float

    Temperature readings origin depends on `dut_mode` setting. Reading higher than 400 (°C) indicates invalidity.

  property temperature_condition_status_code

    Temperature condition status register.

    Type:

      `TemperatureStatusCode`

  property temperature_event_status

    temperature event status register.

    Type:

      `TemperatureStatusCode`

    Hint: Reading will clear register content.

  property temperature_limit_air_dut

    Air to DUT temperature limit.

    Type:

      float

    Allowed difference between nozzle air and DUT temperature during settling. Valid range between 10 to 300 °C in 1 degree increments.

  property temperature_limit_air_high

    upper air temperature limit.

    Type:

      float

    Valid range between 25 to 255 (°C). Setpoints above current value cause “out of range” error in TS.

  property temperature_limit_air_low

    Control lower air temperature limit.

    Type:

      float

    Valid range between -99 to 25 (°C). Setpoints below current value cause “out of range” error in TS. (dynamic)

  property temperature_setpoint

    Set or get selected setpoint’s temperature.

    Type:

      float

    Valid range is -99.9 to 225.0 (°C) or as indicated by `temperature_limit_air_high` and `temperature_limit_air_low`. Use convenience function `set_temperature()` to prevent unexpected behavior.

  property temperature_setpoint_window

    Setpoint’s temperature window.

    Type:

      float

    Valid range is between 0.1 to 9.9 (°C). Temperature status register flags `at temperature` in case soak time elapsed while temperature stays in between bounds given by this value around the current setpoint.

  property temperature_soak_time

    Set the soak time for the currently selected setpoint.

    Type:

      float

    Valid range is between 0 to 9999 (s). Lower values shorten cycle times. Higher values increase cycle times, but may reduce settling errors. See `temperature_setpoint_window` for further information.

  property total_cycle_count

    Set or read current cycle count (1 - 9999).

    Type:

      int

    Sending 0 will stop cycling

  wait_for(query_delay=None)

    Wait for some time. Used by ‘ask’ to wait before reading.

    Parameters:

      query_delay – Delay between writing and reading in seconds. None is default delay.

  wait_for_settling(time_limit=300)

    block script execution until TS is settled.

    Parameters:

      time_limit – set the maximum blocking time within TS has to settle (float).

    Returns:

      self

    Script execution is blocked until either TS has settled or time_limit has been exceeded (float).

class pymeasure.instruments.temptronic.temptronic_base.TemperatureStatusCode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

  Temperature status enums based on `IntFlag`

  Used in conjunction with `temperature_condition_status_code`.

  > Value | Enum
  > --- | ---
  > 32 | CYCLING_STOPPED
  > 16 | END_OF_ALL_CYCLES
  > 8 | END_OF_ONE_CYCLE
  > 4 | END_OF_TEST
  > 2 | NOT_AT_TEMPERATURE
  > 1 | AT_TEMPERATURE
  > 0 | NO_STATUS

class pymeasure.instruments.temptronic.temptronic_base.ErrorCode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

  Error code enums based on `IntFlag`.

  Used in conjunction with `error_code`.

  > Value | Enum
  > --- | ---
  > 16384 | NO_DUT_SENSOR_SELECTED
  > 4096 | BVRAM_FAULT
  > 2048 | NVRAM_FAULT
  > 1024 | NO_LINE_SENSE
  > 512 | FLOW_SENSOR_HARDWARE_ERROR
  > 128 | INTERNAL_ERROR
  > 32 | AIR_SENSOR_OPEN
  > 16 | LOW_INPUT_AIR_PRESSURE
  > 8 | LOW_FLOW
  > 2 | AIR_OPEN_LOOP
  > 1 | OVERHEAT
  > 0 | OK