Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 403

Multimètre

Publicité

BASIC Language for the 3458A
7
only one subprogram is running at a time. Subprograms can be nested up to 10
deep.
Subprogram PAUSE
The PAUSE command pauses the most recent subprogram executed with the
CALL command. Once a subprogram has been paused, you must execute the
CONT (continue) command to resume execution. The CONT command allows the
subprogram to continue running to completion, starting with the next command
after the PAUSE command.
The 3458AA will generate an error if you attempt to execute the CONT command
when a subprogram is not paused.
Knowing When a Subprogram is Paused
The PAUSED? query command returns a "1" if the subprogram is currently paused
or a "0" if the subprogram is running (or finished running). The following program
shows how to use the PAUSED? command.
10 OUTPUT 722; "RUN DMM_CONF;PAUSE"
20 OUTPUT 722; "PAUSED?"
30 ENTER 722; A
40 IF A=1 THEN PRINT "SUBPROGRAM IS PAUSED"
50 IF A=0 THEN PRINT "SUBPROGRAM IS NOT PAUSED"
60 END
Aborting a Subprogram
The GPIB CLEAR command (see
Appendix
B) aborts execution of a subprogram
executed with the CALL command. This returns control to the GPIB command
input buffer or the front-panel keyboard.
Exiting a Subprogram
A subprogram will continue to execute until it reaches the SUBEND command.
Control then reverts back to either the subprogram that called it (nested
subprograms) or to the GPIB input buffer or front-panel keyboard (whichever
executed the subprogram). The RETURN command can also be used to end the
subprogram. For example, if you want to have a conditional termination of the
subprogram, place RETURN within an IF...THEN loop in the subprogram. The
RETURN command returns control to the caller without executing the SUBEND
command. For example,
Keysight 3458A User's Guide
403

Publicité

loading