Switch: Difference between revisions

From SweepMe! Wiki
Jump to navigation Jump to search
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:


* Motor
* Motor
* Relais or switching matrix
* Lamp
* Lamp
* Digital or analog outputs
* Digital or analog outputs
* Filter wheel
* Filter wheel
== 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.


== Device class programming ==
== 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]].
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]].
To use the section 'Configuration' of the GUI, one does not need to insert additional functions. When the button 'Set value' is used, the standard semantic functions [[connnect]], [[initialize]], [[configure]], [[start]] and [[apply]] are called. The new set value 'self.value' is automatically handed over and cooresponds to value in the field 'Configuration' of the GUI. When the stop button is clicked, the standard semantic functions [[connect]], [[unconfigure]], [[deinitialize]], [[disconnect]] are called. As the programmer of the driver, you just have to make sure that after calling these functions, the new set value is either applied or the instrument is stopped.




[[Category:Modules]]
[[Category:Modules]]
[[Category:Device Modules]]
[[Category:Device Modules]]

Revision as of 15:19, 20 April 2021

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 '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.

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.

To use the section 'Configuration' of the GUI, one does not need to insert additional functions. When the button 'Set value' is used, the standard semantic functions connnect, initialize, configure, start and apply are called. The new set value 'self.value' is automatically handed over and cooresponds to value in the field 'Configuration' of the GUI. When the stop button is clicked, the standard semantic functions connect, unconfigure, deinitialize, disconnect are called. As the programmer of the driver, you just have to make sure that after calling these functions, the new set value is either applied or the instrument is stopped.