Variables and Variable Types

View of the variables in Q Studio

In a project, variables can be created in a folder within an object or another variable. If they are in a folder, in Q Studio they can be displayed in Project. If they are in an object or other variable, they can be displayed in Properties.

Note

variables cannot be created in the UI folder.

Creating a Variable

From the Context Menu

  1. In Project, click the folder in which to create the variable.

  2. Click image1 and choose a variable type inside the Model menu: a new variable is created in Project.

From the Types

Drag a variable type from Types > Model to Project into the desired node.

From the Properties Panel

  1. In Project, click the object or variable in which to create the variable.

  2. Click image2 and chose a variable type.

    Note

    the created variable is only visible and editable in Properties.

Creating a Variable Type

Drag an existing variable from Project to a folder in Types: a variable type is created, saved in the same folder in Project and identified with the “(type)” suffix, and the original variable becomes an instance of it.

Setting the Unit of Measure for a Variable

In numeric variables, the unit of measurement to be associated with the figure can be added:

  1. In the Properties panel, using the mouse right-click the numerical value desired, then select New > EUInformation: a window opens with the list of available units of measure.

  2. Select the unit of measure desired and click Select: the unit of measure appears in the variable’s value field.

Changing the Unit of Measure of a Variable

  1. In the Properties panel, in the value field for the desired variable, click the unit of measure: a window with a list of the available units of measure opens.

  2. Select the unit of measure and click Select: the new unit of measure appears in the value field of the variable.

Removing the unit of measure for a variable

  1. In the Properties panel, in the value field for the desired variable, click the unit of measure: a window with a list of the available units of measure opens.

  2. Click Delete > OK: the unit of measure is removed from the value field of the variable.

Add the minimum and maximum limits of a variable

In numeric variables, the minimum and maximum limits and the behavior when the value is not within the limits can be added:

  1. In the Properties panel, right-click the desired numerical variable, then point to New > Interval: the EURange property appears with its properties.

  2. Set the limits and constraint of the values (see Properties of an analog variable).

See also

Related concepts

Variables

References

API to create variables