Agilent Technologies E1463A User's Manual And Scpi Programming Manual page 89

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

Advertisement

Appendix B
/*SUB VER_TIME*/
ver_time( )
{
struct timeval first,
second,
lapsed;
struct timezone tzp;
gettimeofday(&first,&tzp);
for (j=0; j<=10000; j ++);
gettimeofday ($second,&tzp);
if (first.tv_usec > second.tv_usec)
{
second.tv_usec +=1000000;
second.tv_sec--;
}
lapsed.tv_usec = second.tv_usec - first.tv_usec;
lapsed.tv_sec = second.tv_sec - first.tv_sec;
printf("Elapsed time for closing a channel is: %ld sec %ld usec \n",
lapsed.tv_sec, lapsed.tv_usec);
}
/*SUB MAKE_MEAS*/
int make_meas(reg_ptr)
DEV_REGS *reg_ptr;
{
/*close bit 1 of bank0 */
reg_ptr->bank0_channels=0x0001;
for (j=0; j<=10000; j ++);
printf("\n Making Measurement");
.
.
.
/*open bit 1 of bank0*/
reg_ptr->bank0_channels=0x0000;
return;
}
/*wait for switch to close*/
/*make measurements*/
Register-Based Programming 89

Advertisement

Table of Contents
loading

Table of Contents