Chapter 3 Programming Your Universal Counter for Remote Operation
Programming Examples
3-94
Programming Guide
To Use Limits to Filter Data Before Measuring Statistics (Turbo
C) (Continued)
IOEOI(isc,state); /* Enable use of EOI */
sendhp(":FUNC 'FREQ 1'"); /* Make a frequency measurement */
sendhp(":FREQ:ARM:STAR:SOUR IMM"); /* These 3 lines enable */
sendhp(":FREQ:ARM:STOP:SOUR TIM"); /* time arming with a .001 */
sendhp(":FREQ:ARM:STOP:TIM .001"); /* second gate time */
sendhp(":STAT:OPER:ENABLE 256"); /* Computing statistics bit in
Operation Status register */
sendhp(":STAT:OPER:NTR 256"); /* When statistics are complete, */
sendhp(":STAT:OPER:PTR 0"); /* the bit will go from high to low
so a negative transition is
needed to enable the bit that is
summarized in the Status Byte
register. */
sendhp("*SRE 128"); /* This is the bit from the Operation
Status register that is summarized
in the Status Byte Register */
sendhp(":CALC3:LFIL:STAT ON"); /* Enable statistics filter */
sendhp(":CALC3:LFIL:LOWER 1 MHz"); /* Set lower limit to 1 MHz */
sendhp(":CALC3:LFIL:UPPER 2 MHz"); /* Set upper limit to 2 MHz */
sendhp(":CALC3:AVER ON"); /* Enable statistics */
sendhp(":CALC3:AVER:COUNT 50"); /* Use 50 measurements for stats */
sendhp(":CALC2:LIM:STAT ON"); /* Enable limit testing. This must
happen in order to see limit
graph */
sendhp(":CALC2:LIM:LOWER 1 MHz"); /* Set lower limit */
sendhp(":CALC2:LIM:UPPER 2 MHz"); /* Set upper limit */
sendhp(":CALC2:LIM:DISP GRAPH"); /* Display limit graph */
/* Waiting for the measurement to complete */
printf("Waiting for measurement to complete\n");
sendhp(":INIT:CONT ON"); /* Start making measurements */
do
{
IOSTATUS(isc,condition,&status); /* Check status byte */
delay(200); /* Wait 200 milliseconds */
}
while (status!=1); /* if =1 then measurement complete */
/* Measurement is complete, get the data */
Summary of Contents for 53131A
Page 1: ...Programming Guide HP 53131A 132A 225 MHz Universal Counter ...
Page 2: ......
Page 13: ...1 1 Before You Start ...
Page 24: ...Chapter 1 Before You Start Related Documentation 1 12 Programming Guide ...
Page 25: ...2 2 Command Summary A Quick Reference ...
Page 68: ...Chapter 2 Command Summary RST Response 2 44 Programming Guide ...
Page 69: ...3 3 Programming Your Universal Counter for Remote Operation ...
Page 167: ...4 4 Command Reference A Dictionary ...
Page 310: ...Chapter 4 Command Reference WAI Wait to Continue Command 4 144 Programming Guide ...
Page 311: ...5 5 Errors ...
Page 329: ......
Page 330: ...H Manual Part Number 53131 90044 Printed in U S A NOVEMBER 1996 ...