Switch: Difference between revisions

From SweepMe! Wiki
Jump to navigation Jump to search
No edit summary
Line 13: Line 13:
== GUI ==  
== GUI ==  


The Switch module has a section 'Configuration' that can be used to apply a value according to the current Sweep Mode. It can be used to apply a value and stop the instrument if no measurement is running in order to test the instrument or to apply a value to adjust the setup.
The Switch module has a section 'Test' that can be used to apply a value according to the current Sweep Mode. It can be used to apply a value and stop the instrument if no measurement is running in order to test the instrument or to apply a value to adjust the setup.


== Device class programming ==
== Device class programming ==
Line 22: Line 22:


In the 'Test' section of the module, there are the button "Apply" and "Stop" that can be used to do basic communication tests with the driver.
In the 'Test' section of the module, there are the button "Apply" and "Stop" that can be used to do basic communication tests with the driver.
These buttons trigger a series of semantic standard functions so that each driver automatically supports these buttons if semantic standard functions are correctly filled.
These buttons trigger a series of semantic standard functions so that each driver automatically supports these buttons if semantic standard functions are correctly filled. As the programmer of the driver, you have to make sure that after calling these functions, the new set value is either applied or the instrument is stopped.


'''Apply triggers the following functions:'''
'''Apply triggers the following functions:'''

Revision as of 18:17, 24 March 2023

The Switch module is generic one that can be used to create and load instrument drivers that do not match to any of the more specific device modules.

Typical instruments

Typical instruments are ones where the main task is to apply a value rather than reading values.

  • Motor
  • Relais or switching matrix
  • Lamp
  • Digital or analog outputs
  • Filter wheel

GUI

The Switch module has a section 'Test' that can be used to apply a value according to the current Sweep Mode. It can be used to apply a value and stop the instrument if no measurement is running in order to test the instrument or to apply a value to adjust the setup.

Device class programming

The module Switch has the standard fields 'Label', 'Device', 'Port', and 'Channel'. Further parameters can be arbitrarily chosen and will be presented in the field 'Paremeters'. How to creaete drivers and define custom user input fields is described on the page Device Class Programming.

Apply & Stop buttons

In the 'Test' section of the module, there are the button "Apply" and "Stop" that can be used to do basic communication tests with the driver. These buttons trigger a series of semantic standard functions so that each driver automatically supports these buttons if semantic standard functions are correctly filled. As the programmer of the driver, you have to make sure that after calling these functions, the new set value is either applied or the instrument is stopped.

Apply triggers the following functions:

  • connect
  • initialize
  • configure
  • poweron
  • signin
  • start
  • apply
  • disconnect

Because 'configure' is used, the parameters of the Parameter section are applied at the beginning. The sweep value that is applied in "apply" will be handed over from the field "Configuration" right next to the Apply button.

Stop triggers the following functions:

  • connect
  • signout
  • poweroff
  • unconfigure
  • deinitialize
  • disconnect