To Optimize Throughput (Turbo C) - HP 53131A/132A 225 MHz Programming Manual

225 mhz universal counter
Table of Contents

Advertisement

/* This program sets up the counter to transfer data at the fastest
possible rate. Note that the arming mode is AUTO. This mode provides
the least resolution of all the arming modes.
The program comments discuss the meaning of each command.
ASCII result format is used to preserve resolution.
For optimal performance, compile for best speed. */
#include <stdio.h>
#include <string.h>
#include "CHPIB.H"
#include "CFUNC.H"
void sendhp(char *); /* function to send command to counter */
/* global data */
long ctr=703;
int
error;
void main()
{
long isc=7;
int status;
int state=1;
int i;
float exp_freq;
int readings = 1000;
int length=23;
char freq[1001][23];
char destination[130];
IORESET(isc);
sendhp("*RST");
sendhp("*CLS");
sendhp("*SRE 0");
sendhp("*ESE 0");
sendhp(":STAT:PRES");
IOEOI(isc,state);
sendhp(":FUNC 'FREQ 1'");
sendhp(":FREQ:ARM:STAR:SOUR IMM");
sendhp(":FREQ:ARM:STOP:SOUR IMM");
sendhp(":EVENT1:LEVEL 0");
Chapter 3 Programming Your Universal Counter for Remote Operation
Programming Examples

To Optimize Throughput (Turbo C)

/* used for printf() */
/* used for strlen() */
/* HP-IB library constant declarations */
/* HP-IB library function prototypes */
/* Counter is at address 03. HP-IB is at select code 7 */
/* Select code 7 */
/* Used in IOSTATUS */
/* Used in IOEOI
/* Used for loop counter */
/* Expected frequency value */
/* Number of measurements to take */
/* Max number of bytes per measurement */
/* Array to hold measurements */
/* Used for expected frequency */
/* 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 */
/* Enable use of EOI */
3-96
*/
/* Make a frequency measurement */
/* These 2 lines enable the */
/* AUTO arming mode*/
/* Set a trigger level for
channel 1. This disables the
auto trigger, increasing
throughput */
Programming Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents