Truncated data when reading large GPIB arrays (e.g., SCPI MEAS:ARR?) #1

Open
opened 2026-01-15 06:58:31 +00:00 by mira · 0 comments
Owner

Current impl of gpib_receive is unable to handle large data payloads from instruments (like Agilent PSUs) that return large ASCII or bin arrays. When a command like MEAS:ARR:CURR? is sent (returning many points), the interface only returns the first few hundred bytes and then stops...

This is because io.raw_data buffer is limited to 256 bytes in app_scratchpad_t and then we untalk gpib_write_byte(GPIB_CMD_UNT, 0) the instrument when our 256 buf is full. We should probably stream the data directly to usb in process_command do_read_operation block (just push to usb_tx_buffer ring buffer).

Current impl of `gpib_receive` is unable to handle large data payloads from instruments (like Agilent PSUs) that return large ASCII or bin arrays. When a command like `MEAS:ARR:CURR?` is sent (returning many points), the interface only returns the first few hundred bytes and then stops... This is because `io.raw_data buffer` is limited to 256 bytes in `app_scratchpad_t` and then we untalk `gpib_write_byte(GPIB_CMD_UNT, 0)` the instrument when our 256 buf is full. We should probably stream the data directly to usb in `process_command` `do_read_operation` block (just push to `usb_tx_buffer` ring buffer).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mira/hp3478a_ext#1