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.
raw_command
Section titled “raw_command”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
| Name | Type | Required | Description |
|---|---|---|---|
bridge_name | string | Yes | Name of the bridge |
command | string | Yes | Full ++ command string (e.g., ++ver, ++addr 5, ++macro 0) |
Example
# Read firmware versionresult = await client.call_tool("raw_command", { "bridge_name": "bench-a", "command": "++ver"})
# Show current GPIB addressresult = await client.call_tool("raw_command", { "bridge_name": "bench-a", "command": "++addr"})
# Save configuration to NVS flashresult = await client.call_tool("raw_command", { "bridge_name": "bench-a", "command": "++savecfg"})
# Read bridge identity nameresult = await client.call_tool("raw_command", { "bridge_name": "bench-a", "command": "++id name"})
# List stored macrosresult = 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.29raw_scpi
Section titled “raw_scpi”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
| Name | Type | Required | Description |
|---|---|---|---|
bridge_name | string | Yes | Name of the bridge |
address | integer | Yes | GPIB address to send to (0—30) |
data | string | Yes | Raw data string to send on the bus |
read_after | boolean | No | If true, perform ++read eoi after sending (default: false) |
Example
# Send a proprietary command to an older HP instrumentresult = await client.call_tool("raw_scpi", { "bridge_name": "bench-a", "address": 3, "data": "F1R3T4", "read_after": True})
# Send data without reading a responseresult = 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+01With read_after=false:
Sent to address 3: F2R4T3bus_diagnostic
Section titled “bus_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 |
|---|---|---|---|
bridge_name | string | Yes | Name of the bridge |
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("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 highresult = 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 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 |
parallel_poll
Section titled “parallel_poll”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
| Name | Type | Required | Description |
|---|---|---|---|
bridge_name | string | Yes | Name 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