![Tektronix 2714 Programmer'S Manual Download Page 244](http://html1.mh-extra.com/html/tektronix/2714/2714_programmers-manual_1077901244.webp)
Programming
6–46
2714 & 2715 Programmer Manual
The number of bytes in the response is less than 5000 for all queries except
PLOT?
and
FILE?
.
The
PLOT?
query may require as much as 37,000 bytes for HPGL plots and
61,100 for Epson plots. The number of points in a
PLOT?
response depends on
the number of waveforms present, and the acquisition mode.
It is possible for a User-Defined Program (UDP) to occupy all available memory.
As a result,
UDPxx
files larger than 100,000 bytes are possible. However,
5000 bytes are adequate for most UDPs.
Error Trapping
There are three types of errors that can occur in your program: DOS, GPIB
System, and instrument-related. Different techniques are used to deal with each
type. Errors are typically trapped so corrective action can be taken, or the
program is caused to end in a non-destructive manner (gracefully).
DOS errors may occur on instruments equipped with either the GPIB or RS-232
interface. DOS errors typically happen when trying to access a device that is
missing or not ready. They are traditionally handled with the
BASIC ON ERROR
statement. Following the declarations at the head of the program, you must add
this line:
ON ERROR GOTO ERR.TRAP
Next you should construct a subroutine to deal with the problem. This routine
may be used to end the program in a non-destructive manner (gracefully):
ERR.TRAP:
PRINT DOS ERROR HAS OCCURRED."
PRINT CHECK YOUR SYSTEM SETUP."
END
RESUME NEXT
With this routine the program stops if a DOS error is encountered. You simply
check your system and restart. Consult a BASIC programming manual for
selective error trapping techniques and other approaches.
Instruments with a GPIB interface may encounter GPIB system errors. (Refer to
programming examples in RS-232 Program Examples on page 6–2 for RS-232
error handling techniques.) These errors are detected by examining
IBSTA%
following each GPIB function call.
DOS Errors
GPIB System Errors
Summary of Contents for 2714
Page 4: ......
Page 11: ...Introduction ...
Page 12: ......
Page 38: ...Introduction to Programming 1 26 2714 2715 Programmer Manual ...
Page 39: ...Message Structure ...
Page 40: ......
Page 54: ...Instrument Specific Message Structure 2 14 2714 2715 Programmer Manual ...
Page 55: ...Functional Groups ...
Page 56: ......
Page 85: ...Command Query ...
Page 86: ......
Page 179: ...Status Reporting ...
Page 180: ......
Page 197: ...Programming ...
Page 198: ......
Page 266: ...Programming 6 68 2714 2715 Programmer Manual ...
Page 267: ...Appendices ...
Page 268: ......
Page 276: ...Appendix A RS 232 Concepts A 8 2714 2715 Programmer Manual ...
Page 296: ...Appendix B GPIB System Concepts B 20 2714 2715 Programmer Manual ...
Page 297: ...Index ...
Page 298: ......
Page 307: ......
Page 308: ......