Apply(): Difference between revisions
(Added Sequencer procedure Navbox) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
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 | 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 instrument driver 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. | It is good practice to convert the value to the type that you need to process it, e.g. float or str because there is no convention whether self.value must be always str, int, or float, or any other type. | ||
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. | |||
{{Sequencer_procedure}} | {{Sequencer_procedure}} |
Latest revision as of 09:57, 24 October 2024
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 instrument driver as 'self.value' and is automatically updated once a new Sweep value is available.
It is good practice to convert the value to the type that you need to process it, e.g. float or str because there is no convention whether self.value must be always str, int, or float, or any other type.
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.