SELECTOR mode HISTORICAL
See also
Example
Further information
Select the data that appears in a grid control animation. This topic is only for the mode HISTORICAL. For all other modes, see the main SELECTOR topic.
WebVue support - No. Returns an unsuccessful code if used in this context.
If using a project with multiple regions, you must set the region before executing any instructions that interacts with the HMI. For further information, see the REGION topic.
Sub-mode Mnemonic |
Syntax |
GETCOUNT | 1 |
INSERTTREND | 2 |
REMOVETREND | 3 |
CLEARTRENDS | 1 |
SETTREND | 4 |
GETTRENDBYINDEX | 5 |
GETINDEX | 6 |
RESTOREDEFAULT | 1 |
CANCEL | 1 |
REQUEST | 7 |
EXPORT | 1 |
Arguments common to all modes
Argument |
Meaning |
Window |
The name of the window that contains the grid control to be used. Type STR. |
Branch |
The branch of the window (if any). Using a "*" means the current branch of the program. Type STR. |
Identity |
The identity of the grid control within the specified window. Type STR. |
Syntax 1
IntVal = SELECTOR("HISTORICAL", Sub-mode, Window, Branch, Identity);
Return type: INTEGER.
Execution
Sub-mode |
Action |
GETCOUNT |
Return the number of trended variables in the list. |
CLEARTRENDS |
Remove all trended variables in the list. |
RESTOREDEFAULT |
Reload the list of trended variables and thresholds as originally configured in the grid control. |
CANCEL |
Cancel the current historical request. |
EXPORT |
Starts the Export Wizard from the specified grid control. |
All modes return 0 if unsuccessful (incorrect parameter or executed in WebVue context). |
Syntax 2
IntVal = SELECTOR("HISTORICAL", Sub-mode, Window, Branch, Identity, VarName [, Index]);
Return type: INTEGER.
Argument |
Meaning |
VarName |
The name of a variable. Type STR. |
Index |
The index in the list. 1 = start of the list. Type INTEGER. |
Execution
Sub-mode |
Action |
INSERTTREND |
Insert a new trended variable to the list of variables at the Index position. If the Index parameter is omitted the variable is inserted at the start of the list. |
Syntax 3
IntVal = SELECTOR("HISTORICAL", Sub-mode, Window, Branch, Identity[, Index]);
Return type: INTEGER.
Argument |
Meaning |
Index |
The index in the list. 1 = start of the list. Type INTEGER. |
Execution
Sub-mode |
Action |
REMOVETREND |
Remove the trended variable, at the Index position, from the list of variables. If the Index parameter is omitted the variable at the end of the list is removed. |
Syntax 4
IntVal = SELECTOR("HISTORICAL", Sub-mode, Window, Branch, Identity, Index, VarName[, Thresholds]);
Return type: INTEGER.
Argument |
Meaning |
VarName |
The name of a variable. Type STR. |
Index |
The index in the list. 1 = start of the list. Type INTEGER. |
Thresholds |
A flag. Type INTEGER. 0 - Remove the threshold system (default) 1 - Keep the threshold system |
Execution
Sub-mode |
Action |
SETTREND |
Change the trended variable at the Index position and keep or remove the threshold system according to Threshold. |
Syntax 5
StrVal = SELECTOR("HISTORICAL", Sub-mode, Window, Branch, Identity, Index);
Return type: STR.
Argument |
Meaning |
Index |
The index in the list. 1 = start of the list. Type INTEGER. |
Execution
Sub-mode |
Action |
GETTRENDBYINDEX |
Return the name of the trended variable at position of the Index parameter. |
Syntax 6
IntVal = SELECTOR("HISTORICAL", Sub-mode, Window, Branch, Identity, VarName);
Return type: INTEGER.
Argument |
Meaning |
VarName |
The name of a variable. Type STR. |
Execution
Sub-mode |
Action |
GETINDEX |
Return the index of the trended variable VarName. |
Syntax 7
IntVal = SELECTOR("HISTORICAL", Sub-mode, Window, Branch, Identity, StatusVariable [,StartTime, EndTime[, SamplingRateInterval[, SamplingRateValue[, SynchroSecondValue, SynchroMinuteValue, SynchroHourValue, SynchroDayValue]]]]));
Return type: INTEGER.
Argument |
Meaning |
StatusVariable |
The name of a register variable. Set to 1 while the request is running, else 0. Type STR. |
StartTime |
Equivalent to the value provided by the Start time variable in the Grid Control configuration dialog, Historical Period tab. Type DOUBLE. |
EndTime |
Equivalent to the value provided by the End time variable in the grid control configuration, Historical Period tab. Type DOUBLE. |
SamplingRateInterval |
Equivalent to the sampling rate units in the Grid Control configuration dialog, Historical Sampling tab. Type INTEGER. 0 = milliseconds |
SamplingRateValue |
Equivalent to the Sampling Rate property in the Grid Control configuration dialog, Historical Sampling tab. Type INTEGER. |
SynchroSecondValue |
Equivalent to the Second property in the Grid Control configuration dialog, Historical Sampling tab. Type INTEGER. |
SynchroMinuteValue |
Equivalent to the Minute property in the Grid Control configuration dialog, Historical Sampling tab. Type INTEGER. |
SynchroHourValue |
Equivalent to the Hour property in the Grid Control configuration dialog, Historical Sampling tab. Type INTEGER. |
SynchroDayValue |
Equivalent to the Day property in the Grid Control configuration dialog, Historical Sampling tab. Type INTEGER. |
Execution
Sub-mode |
Action |
REQUEST |
Generate a new historical request for the grid using the supplied parameters. See the grid control help for a full explanation of the operation of the parameters. |
Example
For an example, select the Example link above.