Data Trending
The Data Trending tab is used to
observe and configure the trending status and its variables.
Within the tab, the Retention Policy Option and the Retention Policy (D/W/M/Y) can be edited.
-
Retention Policy Option: This option defines a schedule of the life-cycle of the Variable Data.
-
Retention Policy (D/W/M/Y): This option defines a schedule for number of days/week/months/year life-cycle of a Variable Data.
If any change is made to the Retention Policy or Retention Policy Option, click the Save Button to save the changes.
Adding Variable for Trending
To add a Variable to the Data Trending Tab, it is needed to follow a step by step:
-
At the bottom right of the screen, click Add;
The configuration parameters are:Parameter Description Variable Name The source Variable Name. Priority(ms) The Priority defines the frequency (ms), that the device variable are read. - Select the Device Variable;
- Select the Priority in Milliseconds and then click Add.
Starting Trending
To start a Data Trending it is a pre-requisite to have a Variable that already exists. Only then can the Data Trending be started.
To start, click the button "Start" at the bottom left of the Data Trending tab, the trending status will then be changed to "Started".
Stopping Trending
To stop the Data Trending, click the second button from the bottom left of the tab, which says "Stop". The trending status will then be changed to "Stopped".
Deleting Trending
To delete a Trending, select the Trending Variable from the table and press the button "Delete" at the bottom of the tab. A confirmation pop-up will appear, asking if the deletion is supposed to proceed. Click Yes and the selected variable will be deleted.
Service Input / Output JSON
Command Name | Input/Output | Service Name | JSON Format | Description |
---|---|---|---|---|
trend.service | Input | start | {"cmd": "start","variable":"*"} | "*" All Variables |
Output | {"Status":"OK"} | |||
Input | stop | {"cmd": "stop", "variable": "*"} | "*" All Variables | |
Output | {"Status":"OK"} | |||
Input | start | {"cmd": "start","variable":"simulationDev.Random.INT1"} | Starting Specific Variable | |
Output | {"Status":"OK"} | |||
Input | stop | {"cmd": "stop","variable":"simulationDev.Random.INT1"} | Stopping Specific Variable | |
Output | {"Status":"OK"} | |||
Input | list | {"cmd": "list","variable":"*" } | List all trending variables | |
Output | {"TrendVariable":[{"id":1,"name":"SimulationDevice. Waveforms.Sine","createdDate":"2023-02-11 01:04:57","priority":500,"sampleRate":1000}]} | |||
Input | fetch | {"cmd":"fetch","from_date":"2023-02-06 16:09:05", "to_date":"2023-02-06 16:10:55", "Variable": "simulationDev.Random.INT1", "seed":"0", "max_items":"10"} | Max 10 samples to be fetched | |
Output | {"tablename":"TREND_2023_02_06","seed":19, "variableName":"simulationDev.Random.INT1", "sampleRate":5000, "dataSamples":[{"ts":"1675699767000", "segment":[-9,90,-31,101]}, {"ts":"1675699793000","segment":[-4,102]}, {"ts":"1675699843000", "segment":[-22]},{"ts":"1675699849000", "segment":[-93,12,-108]}]} | |||
Input | delete | {"cmd": "delete", "variable":"simulationDev.Random.INT1"} | ||
Output | {"Status":"Deleted", "variable":"simulationDev.Random.INT1"} | |||
Input | add | {"cmd": "add","variable":"simulationDev.Waveforms.Sine", "priority":"1000"} | ||
Output | {"Status":"OK"} |