Measure()

From SweepMe! Wiki
Jump to navigation Jump to search

The measure() function in SweepMe! is used to trigger the acquisition of new data from an instrument. It is designed to initiate a measurement without waiting for the data to be ready. This non-blocking behavior allows multiple devices to be triggered in parallel, improving measurement efficiency.

Complementary Functions: request_result() and read_result()

The request_result() and read_result() functions work together with measure(). measure() starts the measurement, request_result() asks the instrument for the result, and read_result() waits until the result is available and reads it. Because each of these phases is executed for all modules of the branch before the next phase starts, several instruments can measure at the same time.

If several channels of one instrument share the same port, it is often safer to request and read the result in the same phase, e.g. using self.port.query(...), and to only return the stored value in call(). See request_result() for details.

Driver Development

measure() is used only for modules that acquire some data such as SMU, Logger, or Temperature. It is not needed for Switch drivers that only set values.