GPIB Operation
|
|
Plotting/Printing with
a GPIB Controller
1. Data read by controller
and sent to printer/plotter
2. Oscilloscope sends data to
controller and printer/plotter
26
If a controller is connected to the GPIB, data transfers must be
supervised by the controller. The oscilloscope must be set to an
address between 0 and 30 which differs from the controller’s and
the hard-copy device’s address. Different schemes can be used to
transfer the screen contents:
1. The controller reads the data into internal memory and then
sends them to the printer/plotter. This alternative can be
done with simple high-level GPIB function calls.
2. The oscilloscope sends data to both the controller and the
printer/plotter.
3. The controller goes into a standby state. The oscilloscope
becomes a talker and sends data directly to the printer/plot-
ter.
The controller stores the full set of printer/plotter instructions and
sends them afterwards to the graphics device. This method is the
most straightforward way of transferring screen contents but it re-
quires a large amount of buffer storage (110K for 4 traces).
CMD$ = "SCDP"
CALL IBWRT(SCOPE%,CMD$)
FILE$="PLOT.DAT"
CALL IBRDF(SCOPE%,FILE$)
CALL IBWRTF (PLOTTER%,FILE$)
The oscilloscope puts the printer/plotter instructions on to the bus.
The data is directly plotted out and saved in scratch memory in the
controller. The contents of the scratch file can be deleted later on.
Stage 1: Controller talker, oscilloscope listener. Issue the
screen dump command
CMDI$="?_@$": CALL IBCMD(BRD0%,CMDI$)
CMD$="SCDP": CALL IBWRT(BRD0%,CMD$)
Stage 2: Oscilloscope talker, controller and plotter listeners.
Plot data while storing data in scratch file SCRATCH.DAT
CMD2$="?_ D%": CALL IBCMD(BRD0%,CMD2$)
FILE$="SCRATCH.DAT": CALL IBRDF(BRD0%,FILE$)
n
i
i
I
i
m
I
I
l
n
il
n
n
ii
ii
ii