User`s manual
Chapter 8 271
IBASIC Controller
PROGram Subsystem
Example 8-11 Syntax
PROGram[:SELected]
:DEFine <program> The DEFine command is used to create and
download an IBASIC program into the Test Set from an external
controller.
To download an IBASIC program, any currently resident IBASIC
program must first be deleted using the :DELete:ALL command.
Attempting to download a new IBASIC program while an IBASIC
program is currently resident causes IBASIC Error: -282 Illegal
program name.
NOTE
It is possible for the PROGram Subsystem to think that there is an
IBASIC program resident in the Test Set when, in actuality, there is
not. This situation would exist for example, if an IBASIC program had
been created and downloaded using the :DEFine command and then
deleted, from the front panel, using the SCRATCH ALL command from
the IBASIC Command line. Under this circumstance IBASIC
Error
−
282 would be generated when another attempt is made to
download a program with the PROGram Subsystem. It is recommended
that the :DELete:ALL command always be sent immediately before the
:DEFine command.
The IBASIC program downloaded into the Test Set must be transferred
as IEEE 488.2 Arbitrary Block Program Data. Refer to the IEEE
Standard 488.2-1987 for detailed information on this data type. Two
syntax forms are provided with the Arbitrary Block Program Data data
type: one form if the length of the program is known and another one if
it is not.
Example 8-12 Syntax (length of program not known)
PROGram[:SELected]:DEFine <#0><program><NL><END>
The following notation is used in the command description:
• <#0> = IEEE 488.2 Arbitrary Block Program Data header.
• <program> = the IBASIC program sent as 8 bit data bytes.
• <NL> = new line = ASCII line-feed character.
• <END> = IEEE 488.1 END message. This terminates the block
transfer and is only sent once with the last byte of the indefinite
block data.