Form

From SweepMe! Wiki
Jump to navigation Jump to search

A module to create forms to enter important parameters.

Screenshot of the user interface
Screenshot of the user interface

Usage

  • Use Form at the top of the sequencer in a first branch to read out values at the beginning of the measurement.
  • Use Form in a branch with a parameter variation to repetitively read out values.


Applications

  • Create a form with all important parameters that are needed to perform a measurement. Thus, users have a central place to change the measurement and do not have to adjust parameters in each used module.
  • Use a form to read out parameters during the measurement that can be used to hand them over to a measurement instrument.
  • Combine Form with Condition by defining CheckBoxes that define whether a certain branch of the sequence should be used. The Condition module then checks the user input and skips the current branch if needed.

Handling

  • Compose your form by adding fields with the buttons in the section "Add Field:".
  • Configure a field by double-click, by pressing Enter, or via the right-click menu "Configure (Enter)".
  • The right-click menu also allows you to change the type of a field ("Change type to..."), to insert a field above or below, to remove a field ("Remove (Del)"), and to move it up or down ("Move up (Page up)", "Move down (Page down)").
  • Each field is related to a parameter that can be used in other input fields of SweepMe! with the parameter syntax, see Input fields.
  • Check "Save" next to a field to add its current value to the measurement data file.
  • The Form module automatically creates a widget in the Dashboard that contains all added fields.
  • You can use multiple Form modules e.g. in order to separate input sections that are relevant to different instruments.

A Form widget looks like below:

Widget of the Form module that can be placed in the dashboard
Widget of the Form module that can be placed in the dashboard

Input fields

Input fields can be configured by double-click or by right-click on an element in the Form module.

All input fields (except Label) automatically register a parameter in the parameter system that consists of the label of the Form module, the variable name and the unit. For example, a field with the variable "Sample name" in the module "Form1" can be used as {Form1_Sample_name}. Alternatively, the configuration of each input field allows to enter an optional and custom parameter name that will be added as well to the parameter system. Further, there are options for a tooltip that is shown when the user hovers over the variable label or the input field. Some input fields have a placeholder text that is shown in grey if no value has been entered yet.


String

A field to enter a string.

Integer

A field to enter an integer. Optionally, a minimum ("Min") and a maximum ("Max") can be defined.

IntegerSpin

A spin field to enter an integer within the range given by "Min" and "Max".

Float

A field to enter a float value. Optionally, a minimum ("Min") and a maximum ("Max") can be defined.

FloatSpin

A spin field to enter a float value within the range given by "Min" and "Max". The number of decimals can be set with "Decimals".

Selection

A field to select from a list of options. Enter your options in the field "Options" separated by a | sign.

CheckBox

A field to select True or False.

Timestamp

A field to select date and time that is returned as datetime timestamp. The display format can be selected or entered in the field "Format", e.g. "yyyy-MM-dd HH:mm".

Path

A field to select a file or folder path. Choose with "Type" whether a file or a folder is selected. The optional "Default path" defines the folder in which the file dialog opens.

Port

A field to select from available ports provided by the Port Manager. Use "Port types" to restrict the list, e.g. "COM | GPIB".

Label

A text line without a variable, e.g. to add a heading or an empty line to the form. Enter the text in the field "Text". A Label does not register a parameter and has no "Save" check box.