Adjustments; Example: Voltage Adjustments - HP E1328A Service Manual

4-channel d/a converter
Hide thumbs Also See for E1328A:
Table of Contents

Advertisement

Adjustments

Example: Voltage
Adjustments
68 Verification Tests - C Programs
These programs are designed to assist with the adjustment procedures found
in Chapter 5 - Adjustments.
This program uses the measured minimum, default, and maximum values
you enter to update the voltage adjustment constants for Channels 1, 2, 3,
and 4.
/* Voltage Adjustments
#include <stdio.h>
#include <sicl.h>
#define ADDR "hpib7,9,9"
void main ()
{
INST id;
float min, def, max;
int chan;
#if defined(__BORLANDC__) && !defined(__WIN32__)
_InitEasyWin();
#endif
ionerror(I_ERROR_EXIT);
id = iopen (ADDR);
for(chan = 1; chan <= 4; chan++)
{
printf ("\nVoltage Adjustments on Channel %u", chan);
iprintf (id, "CAL%u:STAT OFF\n", chan);
iprintf (id, "VOLT%u MIN\n", chan);
printf ("\n\nChannel %u is set to minimum (-12V)", chan);
printf ("\nEnter measured value (in V to 5.5 digits) : ");
scanf ("%f", &min);
iprintf (id, "VOLT%u DEF\n", chan);
printf ("\nChannel %u is set to default (0V)", chan);
printf ("\nEnter measured value (in V to 5.5 digits) : ");
scanf ("%f", &def);
iprintf (id, "VOLT%u MAX\n", chan);
printf ("\nChannel %u is set to maximum (+12V)", chan);
printf ("\nEnter measured value (in V to 5.5 digits) : ");
scanf ("%f", &max);
iprintf (id, "CAL%u:VOLT %f,%f,%f\n",chan,min,def,max);
E1328A */
/* Address of device */
/* Define id as an instrument */
/* Exit on error */
/* Open instrument session */
Appendix B

Advertisement

Table of Contents
loading

Table of Contents