
Programming the Enhanced Monitor
55
Chapter 3
/* Read and Print temperature TRACe data for slot OUTF5 */
/* Compute the number of elements in teh tracArray[] */
siz = sizeof(tracArray) / sizeof(tracArray[0]);
/* siz is initially max data count */
/* Read TRACe raw data for slot 5 Front (OUTF5) into tracArray[] and get the actual
data count */
errStatus = viQueryf(en_mon, “TRAC:DATA? OUTF5\n”, “%#hb%*t”,
&siz, tracArray);
/* siz receives actual data count */
CHECKERR(errStatus, __LINE__);
/* Now read the PREamble that describes this trace data. Note that you
MUST read the TRAC data immediately prior to reading the PREamble. */
errStatus = viQueryf(en_mon, “TRAC:DATA:PRE? OUTF5\n”, “%t”, preamble);
CHECKERR(errStatus, __LINE__);
printf(“PREamble: %s\n”, preamble); /* For visual reference */
/* Extract the various fields of the PREamble. */
sscanf(preamble, “%hd,%hd,%hd,%hd,%hd,%ld,%hd,%f,%hd,%hd”,
&format, &type, &points, &count, &xincrement, &xorigin,
&xreference, &yincrement, &yorigin, &yreference);
/* Print scaled Temperature trace data */
if (siz > 0) {
/* we have some trace data */
printf(“Scaled times:temperatures for trace OUTF5\n”);
/* Note that TRAC data for +2 (2 seconds after turn-on) is not valid.
Invalid (unacquired) data in TRAC is set to -1 (-0.1 degree) */
for (i=0; i<siz; i++) {
/* scale it, store it, and display it. */
scaledTimes[i] = ((i-xreference) * xincrement) + xorigin;
scaledTemps[i] = ((tracArray[i]-yreference) * yincrement) + yorigin;
printf(“%5d: %3.1f, “, scaledTimes[i], scaledTemps[i]);
}
}
/* Read and print temperature HISTogram data for slot OUT5 into histArray[] */
/* Set units of returned data to seconds */
errStatus = viPrintf(en_mon, “HIST:UNIT:TIME SEC\n”);
/* max precision */
CHECKERR(errStatus, __LINE__);
/* Get the array of histogram values */
errStatus = viQueryf(en_mon, “HIST:TEMP:HIST? OUT5\n”, “%,10d”, histArray);
CHECKERR(errStatus, __LINE__);
/* Get the array of histogram “buckets” minima */
errStatus = viQueryf(en_mon, “HIST:TEMP:HIST? OUT5,MIN\n”, “%,10d”,minArray);
CHECKERR(errStatus, __LINE__);
/* Get the array of histogram “buckets” maxima */
errStatus = viQueryf(en_mon, “HIST:TEMP:HIST? OUT5,MAX\n”, “%,10d”,maxArray);
CHECKERR(errStatus, __LINE__);
Summary of Contents for E8402A
Page 8: ...10 Contents ...
Page 12: ...14 Notes ...
Page 14: ......
Page 26: ...28 Getting Started Chapter 1 ...
Page 42: ...44 Using the Enhanced Monitor Chapter 2 ...
Page 214: ...216 Servicing Your Mainframe Chapter 5 ...
Page 226: ...228 HP E8402 E8404A Product Specifications Appendix A ...