User manual

Table Of Contents
Part 6: IEEE 488.2 Command Reference
Response Format
<trace>:WAVEFORM <block>,<waveform_data_block>
Tip: It may be convenient to disable the response header if the waveform is to be restored to the
oscilloscope. See the COMM_HEADER topic for more information.
Examples (GPIB)
The following instruction reads the block DAT1 from Memory 1 and saves it in the file "MEM1.DAT". The
path header "M1:" is saved together with the data.
FILE$ = "MEM1.DAT"
CMD$ = "M1:WF? DAT1"
CALL IBWRT(SCOPE%,CMD$)
CALL IBRDF(SCOPE%,FILE$)
In the following example, the entire contents of Channel 1 are saved in the file "CHAN1.DAT". The path
header "C1:" is skipped to ensure that the data can later be recalled into the oscilloscope.
FILE$="CHAN1.DAT":RD$=SPACE$(3)
CMD$="CHDR SHORT; C1:WF?"
CALL IBWRT(SCOPE%,CMD$)
CALL IBRD(SCOPE%,RD$) ' Skip first 3 characters "C1:"
CALL IBRDF(SCOPE%,FILE$) ' Save data in file "CHAN1.DAT"
The following instruction illustrates how the waveform data saved in the preceding example can be
recalled into Memory 1:
FILE$ = "CHAN1.DAT"
CMD$ ="M1:"
CALL IBEOT(SCOPE%,0) ' disable EOI
CALL IBWRT(SCOPE%,CMD$)
CALL IBEOT(SCOPE%,1) ' re-enable EOI
CALL IBWRTF(SCOPE%,FILE$)
The "M1:" command ensures the active waveform is "M1". When the data file is sent to the oscilloscope, it
first sees the header "WF" (the characters "C1:" having been skipped when reading the file) and assumes
the default destination "M1".
Related Commands
INSPECT, COMM_FORMAT, COMM_ORDER, FUNCTION_STATE, TEMPLATE, WAVEFORM_SETUP,
WAVEFORM_TEXT
6-153