Apply()

From SweepMe! Wiki
Jump to navigation Jump to search

The function 'apply' is where the new Sweep value (i.e. set value) should be send to a measurement device. The latest Sweep value is simply available in each Device Class as 'self.value' and is automatically updated once a new Sweep value is available.

The functions 'apply()' and 'reach()' are only called if the sweep value has changed. This prevents that a set value is sent multiple times to an instrument. For example, a repetitive measurement at a voltage of 0 V, only requires to set 0 V at the first measurement point. However, for all subsequent measurement points, sending 0 V is not needed, which is why apply is called again.