Вы искали эту информацию? Посмотреть другие результаты поиска:

 

Связаться с экспертом

53131A/53132A/53181A: How do you know when the 53131A, 53132A, or 53181A counters have completed a measurement?

Use one of the following three methods to determine when the counter completes a measurement. Each method uses the counter's Standard Event Status Register to determine measurement completion.

1. Reading the Standard Event Status Register Method. This method continuously reads bit 0 (value of 1) of the Standard Event Status Register.

  1. *RST - Reset the counter
  2. *CLS - Clear the event registers and error queue
  3. *SRE 0 - Clear the service request enable register
  4. *ESE 0 - Clear the event status enable register
  5. STATus:PRESet - Preset the enable registers and transition filters
  6. Setup the counter using the CONFigure and associated commands.
  7. INITiate - Start the measurement
  8. *OPC - Set bit 0 in the standard event status register
  9. *ESR? - Use this command in a loop to read the event status enable register. As long as the counter is still measuring, the returned value is "0". Whenever the counter completes the measurement, the command returns "1".
  10. FETCh? - Return the measurement.

If it takes too long for the counter to make the measurement, use the program to exit the loop, but do not send the FETCh? command. The counter can then be programmed for other operations.

2. Reading the Status Byte Method - This method continuously reads to determine if bit 6 (value of 64) of the Status Byte is set.

  1. *RST - Reset the counter
  2. *CLS - Clear the event registers and error queue
  3. *SRE 0 - Clear the service request enable register
  4. *ESE 0 - Clear the event status enable register
  5. STATus:PRESet - Preset the enable registers and transition filters
  6. STATus:OPEReration:PTRansition 0
    STATus:OPEReration:NTRansition 16 - Sets bit 4 (value 16) of the Status Operation Register to determine the transition from measuring to non-measuring
  7. STATus:OPERation:ENABLe 16 - Enable bit 4 (value 16) of the Status Operation Register
  8. *SRE 128 - Enable a Require Service (SRQ) on the Service Request Enable Register
  9. Setup the counter using the CONFigure and associated commands.
  10. INITiate - Start the measurement*OPC - Set bit 0 in the standard event status register
  11. *OPC - Set bit 0 in the standard event status register
  12. Read the Status Byte using the appropriate function (depends on the I/O library used) in a loop. While the counter is measuring, the returned value is 0. When the measurement completes, bit 6 (value of 64) of the Status Byte is set.
  13. FETCh? - Return the measurement.

If it takes too long for the counter to make the measurement, use the program to exit the loop, but do not send the FETCh? command. The counter can then be programmed for other operations.

3. Generating an Interrupt Method - This method is the same as the "Reading the Status Byte Method", except instead of reading the Status Byte, it generates an interrupt. This method does not work in Visual Basic and in some GPIB cards.

  1. *RST - Reset the counter
  2. *CLS - Clear the event registers and error queue
  3. *SRE 0 - Clear the service request enable register
  4. *ESE 0 - Clear the event status enable register
  5. STATus:PRESet - Preset the enable registers and transition filters
  6. STATus:OPEReration:PTRansition 0
    STATus:OPEReration:NTRansition 16 - Sets bit 4 (value 16) of the Status Operation Register to determine t he transition from measuring to non-measuring
  7. STATus:OPERation:ENABLe 16 - Enable bit 4 (value 16) of the Status Operation Register
  8. *SRE 128 - Enable a Require Service (SRQ) on the Service Request Enable Register
  9. Setup the counter using the CONFigure and associated commands.
  10. INITiate - Start the measurement
  11. *OPC - Set bit 0 in the standard event status register
  12. Whenever the measurement completes, the counter generates an interrupt.
  13. FETCh? - Return the measurement