# Oxford Instruments ITC503

Control the Oxford Instruments ITC503 temperature controller from Python with the `ITC503` driver.

**Driver:** [pymeasure](https://pymeasure.readthedocs.io)  
**Type:** [Temperature controllers and chambers](https://dev.nominal.io/instro/instruments/type/temperature.md)  
**Manufacturer:** [Oxford Instruments](https://dev.nominal.io/instro/instruments/manufacturer/oxford-instruments.md)

Represents the Oxford Intelligent Temperature Controller 503.

## Publishing through instro

instro publishes the commands you send to a ITC503 and the values you read from it, through any [publisher](https://dev.nominal.io/instro/library/publishers.md). It takes two forms, both described in the [pymeasure guide](https://dev.nominal.io/instro/library/pymeasure.md). Install with `uv add "instro[pymeasure]"`.

### With a PymeasureInstrument

[`PymeasureInstrument`](https://dev.nominal.io/instro/library/pymeasure.md#write-new-instro-code) wraps the driver in an instro instrument, with tags and background polling. The instrument is created inside the `with` block, and `.device` is the pymeasure instrument.

```python
from pymeasure.instruments.oxfordinstruments import ITC503
from instro.pymeasure import PymeasureInstrument

with PymeasureInstrument(
    name="itc",
    instrument=ITC503("GPIB::24"),
    dataset_rid="<dataset rid>",
) as itc:

    itc.device.control_mode = "RU"         # Set the control mode to remote
    itc.device.heater_gas_mode = "AUTO"    # Turn on auto heater and flow
    itc.device.auto_pid = True             # Turn on auto-pid

    print(itc.device.temperature_setpoint) # Print the current set-point
    itc.device.temperature_setpoint = 300  # Change the set-point to 300 K
    itc.device.wait_for_temperature()      # Wait for the temperature to stabilize
    print(itc.device.temperature_1)        # Print the temperature at sensor 1
```

### With existing pymeasure code (`attach()`)

[`attach()`](https://dev.nominal.io/instro/library/pymeasure.md#publish-from-existing-code) adds publishing to pymeasure code you already have. The imports, the `attach()` call after the instrument is created, and `recorder.close()` are all that instro adds.

```python
from pymeasure.instruments.oxfordinstruments import ITC503
from instro.lib import NominalCorePublisher
from instro.pymeasure import attach

itc = ITC503("GPIB::24")        # Default channel for the ITC503
recorder = attach(itc, "itc", [NominalCorePublisher(dataset_rid="<dataset rid>")])

itc.control_mode = "RU"         # Set the control mode to remote
itc.heater_gas_mode = "AUTO"    # Turn on auto heater and flow
itc.auto_pid = True             # Turn on auto-pid

print(itc.temperature_setpoint) # Print the current set-point
itc.temperature_setpoint = 300  # Change the set-point to 300 K
itc.wait_for_temperature()      # Wait for the temperature to stabilize
print(itc.temperature_1)        # Print the temperature at sensor 1

recorder.close()  # flush and close the publishers
```

The examples are adapted from the [pymeasure documentation for `ITC503`](https://pymeasure.readthedocs.io/en/latest/api/instruments/oxfordinstruments/itc503.html#pymeasure.instruments.oxfordinstruments.itc503.ITC503), which lists every property and method.
