Keysight B2980 Programming Guide, Edition 1
2- 27
Programming Examples
Using Program Memory
Using Program Memory
A program example for using program memory is shown in Table 2-7. This example
is used to store a program in the program memory and execute it.
Program memory can be set and controlled by using the following commands.
operation
is RUN to change to the running status, PAUS to change to the paused
status, CONT to change to the running status, STOP to change to the stopped status,
or STEP to perform step execution.
Function
Command
Returns the names of all programs defined
in the program memory
:PROG:CAT?
Specifies memory program
:PROG:NAME “
name
”
Defines memory program
a
a. This function is effective for the memory program previously specified
by the :PROG:NAME command.
:PROG:DEF
program_code
Adds program code to the end of the
memory program
a
:PROG:APP
program_code
Sets a value to the variable specified by
n
b
b. Variables can be used in the memory program. They must be expressed
as %
n
% (
n
: integer. 1 to 100) in the memory program.
:PROG:VAR
n
“
value
”
Executes memory program
a
:PROG:EXEC
Changes status of memory program
a
:PROG:STAT
operation
Blocks other commands until the program
execution status changes to Paused or
Stopped
a
:PROG:WAIT?
timeout_in_seconds
Deletes a memory program
a
:PROG:DEL
Deletes all memory programs
:PROG:DEL:ALL