Example Of Output In Ascii Format - YOKOGAWA TA520 User Manual

Time interval analyzer gp-ib interface
Table of Contents

Advertisement

5.5 Example of Output in ASCII Format

'*********************************************************************
'*
'*
TA520 Sample Program4 for GP-IB interface
'*
'*
'*********************************************************************
'*
'*
Outputs the data measured in time stamp mode in ASCII format.
'*
'*********************************************************************
'
REM $INCLUDE: 'qbdecl4.bas'
'
DEVICE$ = "DEV1": CALL IBFIND(DEVICE$, TA%)
CALL IBSIC(TA%)
BORD$ = "GPIB0": CALL IBFIND(BORD$, BD%)
CALL IBSIC(BD%)
V% = 1: CALL IBSRE(BD%, V%)
CALL IBCLR(TA%)
'
CMD$ = "MEASURE:MODE TSTAMP"
CALL IBWRT(TA%, CMD$)
CMD$ = "MEASURE:FUNCTION TI,AB"
CALL IBWRT(TA%, CMD$)
CMD$ = "SAMPLE:GATE:MODE EVENT"
CALL IBWRT(TA%, CMD$)
CMD$ = "SAMPLE:GATE:EVENTSIZE 1000"
CALL IBWRT(TA%, CMD$)
'
CMD$ = "STATUS:FILTER1 RISE"
CALL IBWRT(TA%, CMD$)
CMD$ = "STATUS:EESR?"
CALL IBWRT(TA%, CMD$)
RES$ = SPACE$(100)
CALL IBRD(TA%, RES$)
'
CMD$ = "SSTART"
CALL IBWRT(TA%, CMD$)
CMD$ = "COMMUNICATE:WAIT 1"
CALL IBWRT(TA%, CMD$)
'
CMD$ = "MEMORY:DATASELECT MEASUREDATA"
CALL IBWRT(TA%, CMD$)
CMD$ = "MEMORY:FORMAT ASCII"
CALL IBWRT(TA%, CMD$)
'
ST% = 1: ED% = 1000
FOR I% = ST% TO ED% STEP 10
CMD$ = "MEMORY:START" + STR$(I%) + ";END" + STR$(I% + 9)
CALL IBWRT(TA%, CMD$)
CMD$ = "MEMORY:SEND?"
CALL IBWRT(TA%, CMD$)
RES$ = SPACE$(250)
CALL IBRD(TA%, RES$)
J% = 1
FOR K% = 0 TO 9
D# = VAL(MID$(RES$, J%))
PRINT I% + K%, D#
J% = INSTR(J%, RES$, ",") + 1
NEXT K%
NEXT I%
'
V% = 0: CALL IBSRE(BD%, V%)
'
END
Output Example
1
2
3
4
5
6
7
8
9
10
:
IM 704310-12E
Microsoft QuickBASIC 4.0/4.5 Version
.000000024075
.0000000259
.000000027850
.000000024225
.000000030625
.000000026425
.00000002
.0000000322
.00000002785
.0000000268
:
5.5 Example of Output in ASCII Format
*
*
*
*
*
*
*
'Hardware histogram mode
'Time interval measurement
'Event gate
'Sampling size to 1000 points
'Set transition filter
'Clear extended event register
'Start single measurement
'Wait for measured data to become valid
'Set the type of data to retrieve
'Set the format
'Set the start and end points
'Retrieve 10 points at a time
'Request measured data
'Receive measured data
'Convert ASCII to real number
'Display measured values
5
5-5

Advertisement

Table of Contents
loading

Table of Contents