User`s manual
450 DIM Message$[256]
460 !Read AFG status byte register and clear service request bit
470 B=SPOLL(@Afg)
480 !End of statement if error occurs among coupled commands
490 OUTPUT @Afg;""
500 OUTPUT @Afg;"ABORT" !abort output waveform
510 REPEAT
520 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue
530 ENTER @Afg;Code,Message$
540 PRINT Code,Message$
550 UNTIL Code=0
560 STOP
570 SUBEND
Turning Off
(Suppressing) the
End-Of-Line Terminator
As mentioned earlier, coupled commands must be contiguous and executed
in the same program statement. By suppressing the end-of-line (EOL)
terminator (Line Feed) on a command line, coupled commands can be sent
on separate lines, yet as a single program statement.
In BASIC programs, the EOL terminator is suppressed by placing a
semicolon (;) following the quotation mark (") which closes the command
string. In the previous program, the commands in lines 240–270 are in the
frequency coupling group, line 280 is in the frequency/voltage coupling
group, and line 290 is in the voltage coupling group. The semicolons
following the command strings in lines 240 through 280 suppress the EOL
terminator; therefore lines 240–290 are sent as a single statement. Since the
command in line 290 is not coupled to the commands in lines 300–320, the
EOL terminator is not suppressed on line 290.
Chapter 1 Getting Started 31