AR488 Tools
These 3 tools provide direct access to the AR488 adapter firmware for raw ++ commands, hardware diagnostics, and adapter configuration. They work only with AR488 backends.
For a complete reference of all ++ commands, see AR488 Commands.
ar488_command
Section titled “ar488_command”Send a raw ++ command directly to the AR488 adapter. The command is passed through without interpretation. Use this for AR488-specific commands not exposed as dedicated tools.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
backend | string | Yes | Name of the AR488 backend |
command | string | Yes | Full ++ command string (e.g., ++ver, ++addr 5, ++macro 0) |
Example
# Read firmware versionresult = await client.call_tool("ar488_command", { "backend": "bench-a", "command": "++ver"})
# Show current GPIB addressresult = await client.call_tool("ar488_command", { "backend": "bench-a", "command": "++addr"})
# Save configuration to NVS flashresult = await client.call_tool("ar488_command", { "backend": "bench-a", "command": "++savecfg"})
# Read adapter identity nameresult = await client.call_tool("ar488_command", { "backend": "bench-a", "command": "++id name"})
# List stored macrosresult = await client.call_tool("ar488_command", { "backend": "bench-a", "command": "++macro"})Returns
The adapter response as a string, or (no response) for commands that produce no output:
AR488 GPIB controller 0.51.29ar488_diagnostic
Section titled “ar488_diagnostic”Run bus diagnostics via ++xdiag. Writes a byte directly to the data or control bus lines and holds it for 10 seconds. Intended for hardware debugging — verifying signal integrity, checking cable continuity, and testing transceiver operation with a multimeter or logic analyzer.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
backend | string | Yes | Name of the AR488 backend |
mode | integer | Yes | 0 = data bus (DIO1—DIO8), 1 = control bus (IFC, ATN, SRQ, etc.) |
value | integer | Yes | Byte value to write (0—255). Individual bits map to individual lines |
Example
# Set all data lines high (DIO1-DIO8 = 0xFF)result = await client.call_tool("ar488_diagnostic", { "backend": "bench-a", "mode": 0, "value": 255})
# Set only DIO1 high (bit 0)result = await client.call_tool("ar488_diagnostic", { "backend": "bench-a", "mode": 0, "value": 1})
# Test control bus -- set ATN highresult = await client.call_tool("ar488_diagnostic", { "backend": "bench-a", "mode": 1, "value": 128})Returns
Diagnostic: writing 0xFF to data bus on bench-a for 10 secondsData bus bit mapping (mode 0):
| Bit | Value | Line |
|---|---|---|
| 0 | 1 | DIO1 |
| 1 | 2 | DIO2 |
| 2 | 4 | DIO3 |
| 3 | 8 | DIO4 |
| 4 | 16 | DIO5 |
| 5 | 32 | DIO6 |
| 6 | 64 | DIO7 |
| 7 | 128 | DIO8 |
configure_ar488
Section titled “configure_ar488”Change AR488 adapter configuration at runtime. All parameters except backend are optional; only the provided values are changed. Changes take effect immediately but are not persisted to NVS unless you send ++savecfg via ar488_command.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
backend | string | Yes | Name of the AR488 backend to configure |
read_timeout_ms | integer | No | GPIB read timeout in milliseconds (1—32000) |
auto_mode | integer | No | Auto-read mode: 0=off, 1=prologix, 2=on-query, 3=continuous |
eos | integer | No | End-of-send character: 0=CRLF, 1=CR, 2=LF, 3=None |
eoi | boolean | No | Whether to assert EOI on the last byte sent |
Example
result = await client.call_tool("configure_ar488", { "backend": "bench-a", "read_timeout_ms": 5000, "eoi": True})Returns
Configured bench-a: read_timeout_ms=5000, eoi=True