Sequencer procedure: Difference between revisions

From SweepMe! Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 3: Line 3:
SweepMe! version 1.5.4 or higher
SweepMe! version 1.5.4 or higher


{|
'''Sequencer Start:'''
'''Sequencer Start:'''
 
|-
* [[connect()]] - For all items from root to leaf: get and open a port object to communicate with a device.
| [[connect()]] || For all items from root to leaf: get and open a port object to communicate with a device.
* [[initialize()]] - For all items from root to leaf: Set values and configurations for devices to prepare for measurement.
|-
 
| [[initialize()]]|| For all items from root to leaf: Set values and configurations for devices to prepare for measurement.
'''If a new [[branch]] is entered and the module was not part of the previous branch:'''
|-
 
|colspan="2"| '''If a new [[branch]] is entered and the module was not part of the previous branch:'''  
* [[configure()]] - For all items from root to leaf: Set device configuration.
|-
* [[poweron()]] - For all items from root to leaf: Powers on the device.
| [[configure()]] || For all items from root to leaf: Set device configuration.
 
|-
'''If an item of the sequencer starts its parameter variation:'''
| [[poweron()]]|| For all items from root to leaf: Powers on the device.
 
|-
* [[signin()]] - Calls reconfigure() if needed. Can be used to perform actions before parameter variation starts.
|colspan="2"| '''If an item of the sequencer starts its parameter variation:'''
 
|-
'''For each measurement point:'''
| [[signin()]] || Calls reconfigure() if needed. Can be used to perform actions before parameter variation starts.
 
|-
Each step is performed for all items from root to leaf before the next step is started:
|colspan="2"| '''For each measurement point:'''
 
|-
* [[start()]] - Preparation before applying a new value.
|colspan="2"| Each step is performed for all items from root to leaf before the next step is started:
----------------------------------------------------------------------------------------------
|-
* [[apply()]] - '''Only called if the sweep value changes''': Sets a new value to a device .
| [[start()]] || Preparation before applying a new value.
* [[reach()]] - '''Only called if apply() was called''': Wait to reach the new value or start reaching a certain condition
|-
* sleephold() - Sleeps during hold time while set values are applied.
|colspan="2"| ----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
|-
* [[adapt()]] - Adapts measurement devices to new conditions.
| [[apply()]] || '''Only called if the sweep value changes''': Sets a new value to a device.
* [[adapt_ready()]] - Ensures all devices have adapted.
|-
* [[trigger_ready()]] - Prepares devices to be triggered.
| [[reach()]] || '''Only called if apply() was called''': Wait to reach the new value or start reaching a certain condition
* [[trigger()]] - Deprecated, continued for a while.
|-
----------------------------------------------------------------------------------------------
| sleephold() || Sleeps during hold time while set values are applied.
* [[measure()]] - Initiates/Triggers a measurement.
|-
* [[request_result()]] - Requests a result from the device buffer.
|colspan="2"| ----------------------------------------------------------------------------------------------
* [[read_result()]] - Reads a result from the port buffer.
|-
----------------------------------------------------------------------------------------------
| [[adapt()]] || Adapts measurement devices to new conditions.
* [[process_data()]] - Processes measured data after the measurement finishes.
|-
* [[call()]] - '''Mandatory''': Returns values to SweepMe! as defined by self.variables.
| [[adapt_ready()]] || Ensures all devices have adapted.
----------------------------------------------------------------------------------------------
|-
* [[process()]] - Deprecated, continued for a while.
| [[trigger_ready()]] || Prepares devices to be triggered.
* [[finish()]] - Cleans up before the next measurement.
|-
 
| [[trigger]] || Deprecated, continued for a while.
'''If an item of the sequencer finishes its parameter variation:'''
|-
* [[signout()]] - Optionally performs actions after parameter variation.    
|colspan="2"| ----------------------------------------------------------------------------------------------
 
|-
'''Leaving a branch and the module is not part of the next branch or run is stopped by error:'''
| [[measure()]] || Initiates/Triggers a measurement.
* [[poweroff()]] - For all items from root to leaf: Switch off modules and devices.  
|-
* [[unconfigure()]] - For all items from root to leaf: Unconfigure modules and devices.  
| [[request_result()]] || Requests a result from the device buffer.
 
|-
'''End of sequencer of run is stopped by error'''   
| [[read_result()]] || Reads a result from the port buffer.
* [[deinitialize()]] - For all items from root to leaf: Resets the status for any other user of the equipment.
|-
* [[disconnect()]] - For all items from root to leaf: Closes the port object.
|colspan="2"| ----------------------------------------------------------------------------------------------
 
|-
| [[process_data()]] || Processes measured data after the measurement finishes.
|-
| [[call(]] || '''Mandatory''': Returns values to SweepMe! as defined by self.variables.
|-
|colspan="2"| ----------------------------------------------------------------------------------------------
|-
| [[process()]] || Deprecated, continued for a while.
|-
| [[finish()]] || Cleans up before the next measurement.
|-
|colspan="2"| '''For each measurement point:'''
|-
| [[signout()]] || Optionally performs actions after parameter variation.
|-
|colspan="2"| '''Leaving a branch and the module is not part of the next branch or run is stopped by error:'''
|-
| [[poweroff()]] || For all items from root to leaf: Switch off modules and devices.  
|-
| [[unconfigure()]] || For all items from root to leaf: Unconfigure modules and devices.  
|-
|colspan="2"| '''End of sequencer of run is stopped by error'''   
|-
| [[deinitialize()]] || For all items from root to leaf: Resets the status for any other user of the equipment.
|-
| [[disconnect()]] || For all items from root to leaf: Closes the port object.
|}


== General rules ==
== General rules ==

Revision as of 11:02, 15 February 2024

This section provides an easy-to-understand overview of the functions executed in a SweepMe! Module. These functions are forwarded to a Driver if the Module can load drivers.

SweepMe! version 1.5.4 or higher

Sequencer Start:
connect() For all items from root to leaf: get and open a port object to communicate with a device.
initialize() For all items from root to leaf: Set values and configurations for devices to prepare for measurement.
If a new branch is entered and the module was not part of the previous branch:
configure() For all items from root to leaf: Set device configuration.
poweron() For all items from root to leaf: Powers on the device.
If an item of the sequencer starts its parameter variation:
signin() Calls reconfigure() if needed. Can be used to perform actions before parameter variation starts.
For each measurement point:
Each step is performed for all items from root to leaf before the next step is started:
start() Preparation before applying a new value.
----------------------------------------------------------------------------------------------
apply() Only called if the sweep value changes: Sets a new value to a device.
reach() Only called if apply() was called: Wait to reach the new value or start reaching a certain condition
sleephold() Sleeps during hold time while set values are applied.
----------------------------------------------------------------------------------------------
adapt() Adapts measurement devices to new conditions.
adapt_ready() Ensures all devices have adapted.
trigger_ready() Prepares devices to be triggered.
trigger Deprecated, continued for a while.
----------------------------------------------------------------------------------------------
measure() Initiates/Triggers a measurement.
request_result() Requests a result from the device buffer.
read_result() Reads a result from the port buffer.
----------------------------------------------------------------------------------------------
process_data() Processes measured data after the measurement finishes.
call( Mandatory: Returns values to SweepMe! as defined by self.variables.
----------------------------------------------------------------------------------------------
process() Deprecated, continued for a while.
finish() Cleans up before the next measurement.
For each measurement point:
signout() Optionally performs actions after parameter variation.
Leaving a branch and the module is not part of the next branch or run is stopped by error:
poweroff() For all items from root to leaf: Switch off modules and devices.
unconfigure() For all items from root to leaf: Unconfigure modules and devices.
End of sequencer of run is stopped by error
deinitialize() For all items from root to leaf: Resets the status for any other user of the equipment.
disconnect() For all items from root to leaf: Closes the port object.

General rules

  • At the beginning of a measurement, modules and drivers use connect and initialize. At the end deinitialize and [[disconnect] to bring the module or the driver back to an idle state and to close the connection.
  • When a module gets active, i.e. it is part of an active branch, it runs configure and poweron. If a module is not active anymore it runs poweroff and reconfigure.
  • At each measurement point, i.e. a combination of setpoint iteration steps of the all modules in a branch, a couple of functions are called to perform the measurement point such as start, apply, reach, adapt, measure, call to name the most important ones.