Example: Making Measurements (C/Hp-Ux) - Agilent Technologies E1463A User's Manual And Scpi Programming Manual

32-channel, 5 amp, form c switch scpi programming guide
Hide thumbs Also See for E1463A:
Table of Contents

Advertisement

Example: Making
Measurements
(C/HP-UX)
88 Register-Based Programming
This C/HP-UX programming example closes bit 1 on bank 0, waits for a
measurement to be made, and then opens the channel. You must insert
your own programming code for the measurement part of this program. For
example, if you are using the E1411B, see the E1326B/E1411B Multimeter
User's Manual for programming examples.
The sub ver_time allows time for switch closures. This sub should print a
time around 10 ms. If the time is less, you must change the value of j in
the for loop. For example, instead of 10000, you might need to use 12000.
/******************************************************/
/***
/******************************************************/
#include
<time.h>
#include
<sys/vxi.h>
#include
<fcntl.h>
#include
<stdio.h>
#define logical_address 120
int fd;
typedef unsigned short word;
typedef struct dev_regs{
} DEV_REGS;
main( )
{
/*open the controller VXI interface*/
fd=open("/dev/vxi/primary",O_RDWR);
if (fd){
perror("open");
exit(1);
}
/*retrieve the A16 pointers*/
dev=(struct dev_regs *)vxi_get_a16_addr(fd,logical_address);
/*sub to verify the time to close the switch*/
ver_time( );
/*sub to close switch and make measurement*/
make_meas(dev);
} /* *END of main program*/
Continued on next page
makemeas.c
/*source file for controller VXI drivers*/
/*logical address of Form C Switch*/
/*set up pointers*/
unsigned short id_reg;
unsigned short device_type;
unsigned short status_reg;
unsigned short bank0_channels;
***/
Appendix B

Advertisement

Table of Contents
loading

Table of Contents