Agilent Technologies 66311A User Manual page 145

Table of Contents

Advertisement

D – Example Programs
330
!
340
ENTER @Ps;Curr_array(*)
350
PRINT Curr_array(*)
360
!
370
OUTPUT @Ps;"FETCH:CURR:MAX?"
measurement.
380
ENTER @Ps;Curr_max
390
PRINT "MAX CURRENT",Curr_max
400
!
410
OUTPUT @Ps;"FETCH:CURR:MIN?"
420
ENTER @Ps;Curr_min
430
PRINT "MIN CURRENT",Curr_min
440
!
450
OUTPUT @Ps;"FETCH:CURR:HIGH?"
460
ENTER @Ps;Curr_hi
470
PRINT "HIGH CURRENT",Curr_hi
480
!
490
OUTPUT @Ps;"FETCH:CURR:LOW?"
500
ENTER @Ps;Curr_low
510
PRINT "LOW CURRENT",Curr_low
520
!
530
END
When this program runs, it returns 100 measurement data points as well as the MIN, MAX, HIGH, and
LOW data in the following format:
.030585
.031869
.0320825
.031449
.0327249
.031013
3.13817
3.13624
.0331529
.0350788
.031869
.0329389
.0320829
.0325109
.0320829
.030371
.031441
.0337949
.031441
.0337949
.0322969
.031655
3.13453
3.13731
.0329389
.0333669
MAX CURRENT
MIN CURRENT
HIGH CURRENT
LOW CURRENT
Example 4. Voltage Pulse Measurement Using VISA Library Calls
#include <visa.h>
#include <stdio.h>
#include <stdlib.h>
ViStatus main(void)
{
ViSession defRM, instrumentHandle;
ViStatus err;
ViReal64 measvoltage, meascurrent;
ViReal64 resultDC, resultRMS, resultMIN, resultMAX, resultHIGH, resultLOW;
ViReal64 voltArray[10];
ViInt32
i, numReadings ;
142
.0344369
.031655
.031227
.031441
.0325109
.0333669
.977283
.0667496
.0348648
.0327249
.030371
.031655
.0333669
.0340089
.031449
.031227
.030371
.031655
.0327249
.031869
.0327249
.0340089
1.32438
.0836549
.0322969
.0333669
3.18632
.0245932
3.1371
.0314077
/* for printf */
! Enters all 100 data points
! Print all data points
! Get more data from previous
.0320829
.0325109
.0337949
.0327249
3.09751
3.1814
.0245932
.0280171
.031227
.0327249
.031869
.0329389
.0348648
.0327249
.031441
.0337949
.031869
.0329389
.031655
.031655
2.97661
3.18632
.0258772
.0284451
.0333669
.0340089
.031869
.031655
3.14266
3.13667
.031013
.031655
.031227
.030799
.031869
.0322869
.031227
.0327249
.031449
.0333669
.031869
.0293011
.0320829
.031227
3.14523
3.13496
.0275891
.0329389

Advertisement

Table of Contents
loading

Table of Contents