Skip to content

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.


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

NameTypeRequiredDescription
backendstringYesName of the AR488 backend
commandstringYesFull ++ command string (e.g., ++ver, ++addr 5, ++macro 0)

Example

# Read firmware version
result = await client.call_tool("ar488_command", {
"backend": "bench-a",
"command": "++ver"
})
# Show current GPIB address
result = await client.call_tool("ar488_command", {
"backend": "bench-a",
"command": "++addr"
})
# Save configuration to NVS flash
result = await client.call_tool("ar488_command", {
"backend": "bench-a",
"command": "++savecfg"
})
# Read adapter identity name
result = await client.call_tool("ar488_command", {
"backend": "bench-a",
"command": "++id name"
})
# List stored macros
result = 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.29

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

NameTypeRequiredDescription
backendstringYesName of the AR488 backend
modeintegerYes0 = data bus (DIO1—DIO8), 1 = control bus (IFC, ATN, SRQ, etc.)
valueintegerYesByte 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 high
result = 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 seconds

Data bus bit mapping (mode 0):

BitValueLine
01DIO1
12DIO2
24DIO3
38DIO4
416DIO5
532DIO6
664DIO7
7128DIO8

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

NameTypeRequiredDescription
backendstringYesName of the AR488 backend to configure
read_timeout_msintegerNoGPIB read timeout in milliseconds (1—32000)
auto_modeintegerNoAuto-read mode: 0=off, 1=prologix, 2=on-query, 3=continuous
eosintegerNoEnd-of-send character: 0=CRLF, 1=CR, 2=LF, 3=None
eoibooleanNoWhether 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