Promotic

Variables - configuration window

Description:
Definition of global variables and constants, that can be accessed in scripts directly by their names.
The form of this tab is common to more Pma objects and therefore the common description is stated in the description of the "PmaObject > Data" tab.
This configuration window can be opened on the "PmaRoot > Other" tab.

Global variables in this configuration window are obsolete and it is better to use the variables in the PmaData object. Accessing the global variables is easy, but brings many disadvantages. For example are functional only in the VBScript language, cannot be called in different thread (in the PmaSequencer object), etc.
Buttons:
Opens Variable list menu.
Activate the cell mode - Toggles the variable list table from row mode to cell mode. In the cell mode, individual cells of the table can be selected and edited. For more information about row and cell mode, see Basic control of the variable list. This menu option is visible only if the table is in the row mode.
Deactivate the cell mode - Toggles the variable list table from cell mode to row mode. In the row mode, only entire rows of the table can be selected. For more information about row and cell mode, see Basic control of the variable list. This menu option is visible only if the table is in the cell mode.
Export to XML file - see Data export to the XML text file. Various export types to the XML file are described in Import/Export in the editor of Pma objects.
Export to CSV file - see Data export to CSV text file
Import from the XML file - see Data import from XML text file
Import from the CSV file - see Data import from CSV text file
Import from the OPC server - This item is available only in the PmaOpcDaClientGroup object. Opens the "Viewing the OPC server address space" configuration window. On the selected level, it is possible to select multiple variables (by using the Ctrl or Shift key), that are then added into this tab.
Maximize tab - Maximizes the variable list tab to the entire development environment. In the maximized state, the Pma object tree and other tabs of the active Pma object are not displayed. This menu option is visible only if the variable list tab is not in the maximized state.
Cancel tab maximization - Cancels the maximization of the variable list tab and displays the Pma object tree and other tabs of the active Pma object. This menu option is visible only if the variable list tab is in the maximized state.
Sort - If sorts variables in the alphabetical order by the variable name. The order of variables is changed. Be careful in cases when variables are accessed not by the name but by index (order).
Data extensions - Opens the "List of data extensions" configuration window, displaying a list of all found data extensions (defined anywhere in the application), designed for this specific target object (see the "Target object" configurator in the corresponding data extension).
Adding one or multiple new variables.
New variable (empty) - Opens the "Variable" configuration window, where new variable can be added. The values of the properties of the variable will be empty.
New variable (copy of selected) - Opens the "Variable" configuration window, where new variable can be added. The values of the properties of the variable will be copied from currently selected variable.
Multiple new variables - Opens the "Multi items adding" configuration window, where any number of variables can be added.
Opens Row/cell context menu.
Edit cell - Switches the active cell to edit mode, in which the cell text can be entered directly. To exit the edit mode with confirmation of the entered text, press the Enter or Tab key. To exit the edit mode without confirming the entered text, press the Esc key. This menu option is visible only if the table is in the cell mode.
Edit variable ... - Opens the "Variable" configuration window in which the selected variable can be edited.
If the table is in the cell mode, then the selected variable specifies the row on which the active cell is located.
Cut - If the table is in the row mode, then it removes the selected variables from the variable list and saves the variable data to the clipboard in XML format.
If the table is in the cell mode, then it removes the text of the selected cells and saves the data to the clipboard in CSV format (the default value separator is the tab character).
Copy - If the table is in the row mode, then it copies the selected variables from the variable list to the clipboard in XML format.
If the table is in the cell mode, then it copies the text of the selected cells to the clipboard in CSV format (the default value separator is the tab character).
Paste - If the table is in row or cell mode and the clipboard contains complete variable data in XML or CSV format,
then it inserts the variables from the Windows clipboard into the variable list after the active variable. If the table is in the cell mode and the clipboard contains data in CSV format, then it inserts the data from the Windows clipboard into the cells of the variable list table.
Delete - If the table is in the row mode, then it deletes all selected variables from the variable list.
If the table is in the cell mode, then it deletes the text of all selected cells.
Delete rows - Deletes all selected rows from the list of variables.
This option can be used if you need to delete entire rows instead of deleting text in the cells of the selected rows. This menu option is visible only if the table is in the cell mode.
Copy as ... - Opens the "Copy as" configuration window. After setting the data format and other parameters, the selected data is copied to the clipboard.
Paste as ... - Opens the "Paste as" configuration window, in which the value separator, position and other parameters for pasting the data can be set. It then pastes the data from the Windows clipboard into the list of variables.
Find ... - Opens the text search window
Replace ... - Opens the text replacement window. This menu option is enabled only if the table is in the cell mode.
Move - Opens a menu with options for moving the selected rows. You can scroll only one selected row or a continuous range of selected rows.
Select - Opens a menu of row or column selection options.
Show only selected rows - Displays only the currently selected rows in the variable table. Other rows will be hidden. The row filter will automatically be set to the system filter $current.
Hide selected rows - Hides the currently selected rows in the variable table. The remaining rows will remain displayed. The row Filter is automatically set to the system filter $current.
Show all rows - Displays all rows in the variable table. The row Filter is automatically set to the system filter $all.
Row filter ... - Opens the "Row filter" configuration window, in which you can select, add, delete or edit row filters. After selecting the desired filter, only rows that satisfy the filter condition are displayed in the variable table.
If the table is in the row mode, then it deletes all selected variables from the variable list.
If the table is in the cell mode, then it deletes the text of all selected cells.
Moves the selected variable up in the list.
Moves the selected variable down in the list.
Switches between row and cell modes of the variable table. For more information about row and cell modes, see Basic control of the variable list.
Opens window for text search.
Maximizes/de-maximizes the variable list tab. In the maximized state, the Pma object tree and other tabs of the active Pma object are not displayed.
Opens the "Row filter" configuration window, in which you can select, add, delete or edit row filters. After selecting the desired filter, only rows that satisfy the filter condition are displayed in the variable table.
Opens the "Configuration of columns" configuration window, in which you can select, add, delete or edit the configuration of columns. When the desired configuration is selected, the columns defined in the column list of the given configuration are displayed in the variable table.
Note:
Contrary to variables in other objects, the variable data type in this object can be set to Constant. This constant is then available as read only from all scripts. The constant data type itself is then defined by the data type of the evaluated initialization expression (e.g. true, false, 0, 1000, 1.33, "BoilerPlant1", etc.).
Example:
There is as defined global constant ccc and global variable vvv. There is the PmaData object with Number1 and Number2 data items. The value of the constant ccc will be written into the Number1 item. the vvv variable will be filled with the value of the Number2 item and then increased by 1.
JavaScriptVBScriptSelect and copy to clipboard

var oData = pMe.Pm("/Data");
oData.Item("Number1").Value = ccc;
vvv = oData.Item("Number2").Value;
vvv += 1;
PROMOTIC 9.0.24 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.