Next: The label Token
Up: The Lexical GUI builder
Previous: Introduction
The Available Tokens
The available tokens are broken down into two lists: the required and
optional tokens. The required tokens are necessary for every
project. They define some critical information about a particular
control problem. All user_GUI.par files must contain these tokens:
- inputs: defines the number of inputs for the controller (e.g. number of A/D inputs). Its argument, an integer, denotes the number of inputs. This number can later be extracted in the user's controller file (user_controller.c) via the constant NUM_CONTROL_INPUTS.
- outputs: like the above, but defines the number of outputs for the controller (e.g. the number of D/A outputs). Its argument, an integer, denotes the number of outputs. The value itself can be extracted via the NUM_CONTROL_OUTPUTS macro.
- data_size or datasize or num_data_pts_per_set: defines the number of data points per cycle that will be transferred between the embedded tasks and the non-real time tasks via the RETURN_VAL macro (see chapter 4). This token takes one argument, an integer.
As of the latest revision, the user_GUI.par parser understands
the following optional tokens. The macro used to extract the numeric
value from the numerically oriented tokens is shown next to each of
the tokens below. Unless otherwise stated, all numerically oriented
tokens have a numerical resolution of
:
- timeout or 60_second_timeout: forces the embedded tasks
to stop their execution after sixty seconds. This is especially good
for debugging purposes. This token takes no arguments.
- noIO or no_hardware_IO: forces the embedded tasks to not perform any physical reads and/or writes to the hardware. This is useful for debugging purposes. This token takes no arguments.
- frequency or run_time_frequency: used to specify the default run-time frequency for a given controller. It takes one argument, and it should be specified in Hertz (Hz). The frequency can be extracted during run-time via the constant GET_RUN_FREQUENCY.
- tx_rate or downsample: used to specify the downsampling rate between the number of times that the controller executes to the number of times that a data point is transmitted to the non-real time tasks. For example, a downsample ratio of 2 would imply that a data point will be transferred to the non-real time tasks during every other execution of the embedded controller. This token takes one argument, the which should be specified as an integer.
- end_col: Ends the column. Please refer to section
3.2.3 for a description of its usage.
- end_row: Ends the row. Please refer to section
3.2.4 for a description of its usage.
- h_separator: Introduces a horizontal line to separate
widgets. Please refer to Section 3.2.5 for a description
of its usage.
- label: Puts a given piece of text on the window. Please
refer to Section 3.2.1 for a full description of this widget.
- matrix: Used to read in a full
matrix. Please
refer to Section 3.2.7 for a full description of this
widget. The values for this token are extracted by the macro MATRIX_ELEMENT() from within the user_controller.c file. The
row and column dimensions are extracted with the macros MAT_DIM_M() and MAT_DIM_N(), respectively, from within the
user_controller.c file.
- slider: Creates a horizontal slider. Please refer to
section 3.2.9 for a more thorough description of the slider
token. The value of this token is extracted from within user_controller.c using the GET_SCALAR_PARAMETER() macro.
- slider_with_label: Same as above, but with a
label. Please refer to section 3.2.8 for a more
thorough description of the slider token. The value of this token is
extracted from within user_controller.c using the GET_SCALAR_PARAMETER() macro.
- spin: Creates a spin button. Please refer to section
3.2.11 for a more thorough description of the spin
token. The value of this token is extracted from within user_controller.c using the GET_SCALAR_PARAMETER() macro.
- spin_with_label: Same as above, but with a
label. Please refer to section 3.2.10 for a more
thorough description of the spin_with_label token. The value
of this token is extracted from within user_controller.c using
the GET_SCALAR_PARAMETER() macro.
- start_col: Begins a new column. Note that this
token takes an argument. Please refer to section 3.2.3 for a
full description of this token.
- start_row: Begins a new row. Note that this token takes
an argument. Please refer to section 3.2.4 for a full
description of this token.
- title: Puts a title field. This is exactly the same as
the label widget but it draws a nice box around the label
itself. Please refer to Section 3.2.2 for a description of the
usage of this token.
- toggle: creates a toggle button which takes the values of
either ``0'' or ``1''. Please refer to section 3.2.12 for a full
description of this token. The value of this token is extracted from
within user_controller.c using the GET_SCALAR_PARAMETER()
macro.
- trigger: same as above, but momentary. That is, releasing
the button will cause the button to revert to its original
state. Please refer to section 3.2.13 for a full description of
this token. The value of this token is extracted from within user_controller.c using the GET_SCALAR_PARAMETER() macro.
- v_separator: Introduces a vertical line to separate
widgets. Please refer to Section 3.2.6 for a description
of its usage.
- vslider: Creates a vertical slider. Please refer to
section 3.2.14 for a more thorough description of the slider
token. The value of this token is extracted from within user_controller.c using the GET_SCALAR_PARAMETER() macro.
- # (the pound sign): Insert a comment. Any characters that
appear between the # and the end of the line are ignored.
The following sections give a more detailed explanation for some of the aforementioned tokens.
Subsections
Next: The label Token
Up: The Lexical GUI builder
Previous: Introduction
Michael Barabanov
2001-06-19