> For the complete documentation index, see [llms.txt](https://tk233.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tk233.gitbook.io/notes/tools/lab-automation.md).

# Lab Automation

Most of the lab equipments support Ethernet connection, and it is possible to programmatically control the equipments with [Standard Commands for Programmable Instruments](https://en.wikipedia.org/wiki/Standard_Commands_for_Programmable_Instruments) (SCPI) protocol.

Here's a Python wrapper for the SCPI protocol. Various instruments will be added to this library.

{% embed url="<https://github.com/uncertainty-cc/SCPI-Python>" %}

> *Note: Most of the instruments use TCP socket connection on port 5025, but this is not specified by the spec, and may differ.*

### SIGLENT SPD3303X-E

port: 5025

<https://siglentna.com/wp-content/uploads/dlm_uploads/2022/11/SPD3303X_QuickStart_E02A.pdf>

#### Example

```python
import time

from cc.scpi import SiglentSPD3303X

device = SiglentSPD3303X("128.32.62.100")
device.connect()

print(device.getInstrumentIdentification())

device.setVoltage(0.1, device.Channel.CH1)
device.enableOutput(device.Channel.CH1)

time.sleep(1)

print(device.getVoltage(device.Channel.CH1))
print(device.getCurrent(device.Channel.CH1))
print(device.getPower(device.Channel.CH1))


device.disableOutput(device.Channel.CH1)
```

### Keysight 81134A

port: 5025

<https://www.keysight.com/us/en/assets/9018-02477/programming-guides/9018-02477.pdf>

#### Example

```python
import time

from cc.scpi import Keysight81134A

device = Keysight81134A("128.32.62.102")
device.connect()

print(device.getInstrumentIdentification())


device.enableOutput(Keysight81134A.Channel.CH1)
device.disableOutput(Keysight81134A.Channel.CH1)
```

EagleX Bench Initialize Script

```python
import time
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tk233.gitbook.io/notes/tools/lab-automation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
