To Use Limits To Filter Data Before Measuring Statistics (Turbo C) - HP 53131A/132A 225 MHz Programming Manual

225 mhz universal counter
Table of Contents

Advertisement

/* This program instructs the counter to determine the statistics of
50 Period measurements that are within programmed test limit values.
Periods that are outside of the limits are not included in the statistics.
The Limit graph is displayed so you can see if measurements are in limit.
To alert the program that the statistics are ready, bit 8 in the Operation
Status Register is used. When statistics are being calculated, this bit is
high, when they are complete, this bit goes low. By using the transition
filters, an SRQ can be generated when statistics are complete (the
transition from high to low of bit 8 in the Operation Status register.)*/
#include <stdio.h>
#include <dos.h>
#include "CHPIB.H"
#include "CFUNC.H"
void sendhp(char *);
/* global data */
long ctr=703;
/* Counter is at address 03. HP-IB is at select code 7 */
int
error;
void main()
{
long isc=7;
int condition=1;
int status;
int state=1;
char mean[23];
char minimum[23];
char maximum[23];
char sdev[23];
int length=23;
clrscr();
IORESET(isc);
sendhp("*RST");
sendhp("*CLS");
sendhp("*SRE 0");
sendhp("*ESE 0");
sendhp(":STAT:PRES");
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
To Use Limits to Filter Data Before Measuring Statistics (Turbo
C)
/* used for printf() */
/* used for delay() */
/* HP-IB library constant declarations */
/* HP-IB library function prototypes */
/* function to send command to counter */
/* Select code 7 */
/* Used in IOSTATUS */
/* Used in IOSTATUS */
/* Used in IOEOI
/* mean variable */
/* minimum variable */
/* maximum variable */
/* standard deviation variable */
/* Used in IOENTERS */
/* Clear the computer CRT */
/* Clear the HP-IB interface */
/* Reset the counter */
/* Clear event registers and error queue */
/* Clear service request enable register */
/* Clear event status enable register */
/* Preset enable registers and transition
filters for operation and questionable
status structures */
Programming Guide
*/
3-93

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents