Agilent Technologies E8285A User Manual page 325

Cdma mobile station test set
Hide thumbs Also See for E8285A:
Table of Contents

Advertisement

Chapter 6, IBASIC Controller
PROGram Subsystem
Example querying the value of a simple variable
OUTPUT 714;"PROGram:SELected:NUMBer? Variable"
ENTER 714;Value
OUTPUT 714;"PROG:NUMB? Variable"
ENTER 714;Value
This example assumes that the variable named Value in the ENTER statement is the same
type as the variable named Variable in the IBASIC program.
Example querying the value of a one dimensional array [Array(5)] with 6 elements
OUTPUT 714;"PROGram:SELected:NUMBer? Array"
ENTER 714;Result_array(*)
OUTPUT 714;"PROG:NUMB? Array"
ENTER 714;Result_array(*)
This example assumes that the array named Result_array(*) in the ENTER statement is di-
mensioned exactly the same as the array named Array in the IBASIC program.
NOTE:
Individual array elements cannot be queried with the :NUMBer? command.
Example querying the value of a one dimensional array whose name is known but
whose current size is unknown
10 DIM Temp$[5000] !This will hold 250 numbers @ 20 characters each
20 DIM Result_array(500) !This array will hold up to 501 values
30 OUTPUT 714;"PROG:NUMB? Array" !Query the desired array
40 ENTER 714;Temp$ !Enter the values into a temporary string variable
50 N=-1 !Initialize array pointer, assume option base 0
60 REPEAT !Start loop to take values from string and put in array
70 N=N+1 !Increment array pointer
80 Pos_comma=POS(Temp$,",") !Find comma separator
90 Result_array(N)=VAL(Temp$[1,Pos_comma-1]) !Put value into array
100 Temp$=Temp$[Pos_comma+1] !Remove value from temporary string
110 UNTIL POS(Temp$,",")=0 !Check for last value in temporary string
120 Result_array(N+1)=VAL(Temp$) !Put last value into array
130 END
The above example assumes that the dimensioned size of the IBASIC array is smaller than
the dimensioned size of the array named Result_array.
NOTE:
Individual array elements cannot be queried with the :NUMBer? command.
324
S:\agilent\e8285\USRGUIDE\BOOK\CHAPTERS\ibasic.fb
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
or
or

Advertisement

Table of Contents
loading

Table of Contents