Agilent Technologies 8935 Series Manual do Utilizador Página 284

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 329
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 283
284 Chapter 8
O:\Manuals\E6380A_Progguid\Book\Ibasic.fm
IBASIC Controller
PROGram Subsystem
Example 8-42 Example of querying the value of a string array whose name is
known but whose current size is unknown
05 OPTION BASE 1
10 DIM Temp$[5000] !This will hold 5000 characters
20 DIM Temp_array$(50)[200]!Temp array: 50 elements of 200 character
30 OUTPUT 714;"PROG:STR? Array" !Query the desired array
40 ENTER 714;Temp$ !Enter the values into a temporary string variable
50 N=0 !Initialize array pointer
60 EPEAT !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 Temp_array$(N)=Temp$[2,Pos_comma-2] !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 Temp_array$(N+1)=Temp$[2,LEN(Temp$)-1]!Put last value in array
130 END
The above example assumes that the total number of characters in the
dimensioned size of the IBASIC string array named Array is smaller
than the dimensioned size of the string variable named Temp$. Also,
the maximum length of any element in the IBASIC string array Array
must be less than or equal to 200 characters.
:WAIT The :WAIT command stops the Test Set from executing any
commands or queries received through HP-IB until after the IBASIC
program exits the RUN state; that is, the program is either PAUSED or
STOPPED.
CAUTION
The Test Set will continue to process HP-IB commands into the HP-IB
input buffer up to the point that the buffer is full. If the external
controller attempts to send more commands than can fit into the HP-IB
input buffer before the IBASIC program is PAUSED or STOPPED, the
HP-IB bus will appear to be locked up. This is due to the fact that the
HP-IB bus and the external controller will be in a temporary holdoff
state while waiting for the HP-IB input buffer to empty.
If a query command is sent to the Test Set while the IBASIC program is
under the influence of a :WAIT command, no data will be put into the
Test Set’s Output Queue until the IBASIC program is either PAUSED
or STOPPED. If the external controller attempts to enter the queried
data before the IBASIC program is PAUSED or STOPPED, the HP-IB
bus will appear to be locked up. This is due to the fact that the HP-IB
bus and the external controller will be in a temporary holdoff state
while waiting for the data to be put into the Output queue to satisfy the
enter command.
Vista de página 283
1 2 ... 279 280 281 282 283 284 285 286 287 288 289 ... 328 329

Comentários a estes Manuais

Sem comentários