660 ! ********************* SEND THE DATA **********************************
670 ! Make sure buffer is not empty.
680 !
690 IF Nu mbytes=0 THE N
700 PRINT "BUFFER IS EMPTY"
710 GOTO 1170
720 END IF
730 !
740 ! ********************* SEND THE DATA COMMAND **************************
750 ! Send the Setup co mmand
760 !
770 OUTPUT @Comm US ING "#,14A";": SYSTEM:DATA #"
780 PRINT "SYSTEM:DATA command has been sent"
790 PAUSE
800 !
810 ! ********************* SEND THE BLOCK DATA ****************************
820 ! Send the block data header to the logic analyzer in the proper format.
830 !
840 Byte=LEN(VAL$(Numbytes))
850 OUTPUT @Comm US ING "#,B";(Byt e+48)
860 IF Byte=1 THEN OUTPUT @Comm USING "#,A";VAL$(Numbytes)
870 IF Byte=2 THEN OUTPUT @Comm USING "#,AA";VAL$(Numbytes)
880 IF Byte=3 THEN OUTPUT @Comm USING "#,AAA";VAL$(Numbytes)
890 IF Byte=4 THEN OUTPUT @Comm USING "#,AAAA";VAL$(Numbytes)
900 IF Byte=5 THEN OUTPUT @Comm USING "#,AAAAA";VAL$(Numbytes)
910 IF Byte=6 THEN OUTPUT @Comm USING "#,AAAAAA";VAL$(Numbytes)
920 IF Byte=7 THEN OUTPUT @Comm USING "#,AAAAAAA";VAL$(Numbytes)
930 IF Byte=8 THEN OUTPUT @Comm USING "#,AAAAAAAA";VAL$(Numbytes)
940 !
950 ! *********************** SAVE BUFFER POINTERS *************************
960 ! Save the transf er buffer pointe r so it can be restore d after the
970 ! transfer.
980 !
990 STATU S @Buff,5;St reg
1000 !
1010 ! ************** TRANSFER DATA TO THE LOGIC ANALYZER *****************
1020 ! Transfer th e data from the buff er to the logic anal yzer.
1030 !
1040 TRANSFER @Buff TO @Comm;COUNT Numbytes,WAIT
1050 !
1060 ! ********************** RESTORE BUFFER POINTERS ***********************
1070 ! Restore the transfer buffer pointer
1080 !
1090 CONTROL @Buff,5;Streg
1100 !
Programming Examples
Transferring the logic analyzer acquired data36–19