Skip to content

Low-Level Tools

These tools bypass the higher-level instrument abstractions for direct interaction with the AR488 bridge and GPIB bus. Use them for debugging, diagnostics, non-standard instruments, and AR488 commands not covered by other tools.


Send a raw ++ command directly to the AR488 bridge. The command is passed through without interpretation. Use this for AR488-specific commands not exposed as dedicated tools.

Parameters

NameTypeRequiredDescription
bridge_namestringYesName of the bridge
commandstringYesFull ++ command string (e.g., ++ver, ++addr 5, ++macro 0)

Example

# Read firmware version
result = await client.call_tool("raw_command", {
"bridge_name": "bench-a",
"command": "++ver"
})
# Show current GPIB address
result = await client.call_tool("raw_command", {
"bridge_name": "bench-a",
"command": "++addr"
})
# Save configuration to NVS flash
result = await client.call_tool("raw_command", {
"bridge_name": "bench-a",
"command": "++savecfg"
})
# Read bridge identity name
result = await client.call_tool("raw_command", {
"bridge_name": "bench-a",
"command": "++id name"
})
# List stored macros
result = await client.call_tool("raw_command", {
"bridge_name": "bench-a",
"command": "++macro"
})

Returns

The bridge response as a string, or (no response) for commands that produce no output:

AR488 GPIB controller 0.51.29

Send raw data on the GPIB bus to a specific address. Lower level than instrument_query / instrument_write — sends data directly without any SCPI interpretation. Useful for instruments with non-standard command sets or binary data transfers.

Parameters

NameTypeRequiredDescription
bridge_namestringYesName of the bridge
addressintegerYesGPIB address to send to (0—30)
datastringYesRaw data string to send on the bus
read_afterbooleanNoIf true, perform ++read eoi after sending (default: false)

Example

# Send a proprietary command to an older HP instrument
result = await client.call_tool("raw_scpi", {
"bridge_name": "bench-a",
"address": 3,
"data": "F1R3T4",
"read_after": True
})
# Send data without reading a response
result = await client.call_tool("raw_scpi", {
"bridge_name": "bench-a",
"address": 3,
"data": "F2R4T3",
"read_after": False
})

Returns

With read_after=true, returns the instrument’s response:

+1.23456E+01

With read_after=false:

Sent to address 3: F2R4T3

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
bridge_namestringYesName of the bridge
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("bus_diagnostic", {
"bridge_name": "bench-a",
"mode": 0,
"value": 255
})
# Set only DIO1 high (bit 0)
result = await client.call_tool("bus_diagnostic", {
"bridge_name": "bench-a",
"mode": 0,
"value": 1
})
# Test control bus — set ATN high
result = await client.call_tool("bus_diagnostic", {
"bridge_name": "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

Conduct a parallel poll on the GPIB bus. Simultaneously reads one status bit from each configured device, returning the combined response byte. Each bit corresponds to a device that has been configured for parallel poll response via the PPE (Parallel Poll Enable) command.

Parameters

NameTypeRequiredDescription
bridge_namestringYesName of the bridge

Example

result = await client.call_tool("parallel_poll", {
"bridge_name": "bench-a"
})

Returns

Parallel poll result: 0x05 (decimal 5)
Binary: 00000101
DIO lines: DIO1=1 DIO2=0 DIO3=1 DIO4=0 DIO5=0 DIO6=0 DIO7=0 DIO8=0