HP 16554A Programmer's Manual page 322

State/timing logic analyzers
Table of Contents

Advertisement

Programming Examples
Sending Queries to the Logic Analyzer
150
!
160
! ************* INTITIALIZE VARIABLE FOR NUMBER OF BYTES *****************
170
! The variable "Numbytes" contains the number of bytes in the buffer.
180
!
190
REAL Numbytes
200
Numbytes=0
210
!
220
! ************** RE-INITIALIZE TRANSFER BUFFER POINTERS ******************
230
!
240
CONTROL @Buff,3;1
250
CONTROL @Buff,4;0
260
!
270
! *********************** SEND THE DATA QUERY **************************
280
OUTPUT 707;":SYSTEM:HEADER ON"
290
OUTPUT 707;":SYSTEM:LONGFORM ON"
300
OUTPUT @Comm;"SELECT 2"
310
OUTPUT @Comm;":SYSTEM:DATA?"
320
!
330
! ******************** ENTER THE BLOCK DATA HEADER *********************
340
! Enter the block data header in the proper format.
350
!
360
ENTER @Comm USING "#,B";Byte
370
PRINT CHR$(Byte);
380
WHILE Byte<>35
390
ENTER @Comm USING "#,B";Byte
400
PRINT CHR$(Byte);
410
END WHILE
420
ENTER @Comm USING "#,B";Byte
430
PRINT CHR$(Byte);
440
Byte=Byte-48
450
IF Byte=1 THEN ENTER @Comm USING "#,D";Numbytes
460
IF Byte=2 THEN ENTER @Comm USING "#,DD";Numbytes
470
IF Byte=3 THEN ENTER @Comm USING "#,DDD";Numbytes
480
IF Byte=4 THEN ENTER @Comm USING "#,DDDD";Numbytes
490
IF Byte=5 THEN ENTER @Comm USING "#,DDDDD";Numbytes
500
IF Byte=6 THEN ENTER @Comm USING "#,DDDDDD";Numbytes
510
IF Byte=7 THEN ENTER @Comm USING "#,DDDDDDD";Numbytes
520
IF Byte=8 THEN ENTER @Comm USING "#,DDDDDDDD";Numbytes
530
Str1$=DVAL$(Numbytes,10)
531
! DVAL$ returns an 11 character string
532
PRINT Str1$[12-Byte]
540
!
18–20

Advertisement

Table of Contents
loading

This manual is also suitable for:

16555d16555a

Table of Contents