5.3 Reference Guide for REX.HMI.Graph
Time-based graph component which is shown on the bottom of the web page. Graph can read arbitrary signal connected via alias and cstring or all signals from TRND* blocks. The Graph is shown when first signal is added over addSignal or addTrend function.
The REX.HMI.Graph has following functions:
- .resume()
- .pause()
- .show()
- .hide()
- .addSignal(opt)
- .addTrend(opt)
- .setSize(size)
- .setRefreshRate(period)
- .hideLegend()
REX.HMI.Graph.resume() Resume redrawing the graph
Example
REX.HMI.Graph.pause() Pause redrawing the graph
Example
REX.HMI.Graph.show() Show graph
Example
REX.HMI.Graph.hide() Hide graph
Example
REX.HMI.Graph.addSignal(opt) Add arbitrary signal from the REX executive to the trend. Warning! The data are stored inside the web page once refreshed all the data will be lost.
Param |
Type |
Description |
|
||
opt |
Object |
Main configuration object |
opt.alias |
string |
Alias for the connection |
[opt.cstring] |
string |
Connection string of the signal from REX |
[opt.desc] |
Array. <string> |
Signal’s description |
[opt.period] |
number |
Signal refresh period [ms] |
|
||
|
||
|
Example
REX.HMI.Graph.addTrend(opt) Add signals from TRND* blocks to the common graph in HMI
Param |
Type |
Description |
|
||
opt |
Object |
Main configuration object |
opt.cstring |
string |
Connection string for TRND* block |
[opt.labels] |
Array. <string> |
Array of signal labels |
[opt.period] |
number |
Graph redraw period |
|
||
|
||
|
Example
REX.HMI.Graph.setSize(size) Change size of the graph. The size is in percent of the page.
Param |
Type |
Default |
Description |
|
|||
size |
number |
0.39 |
Size of the graph in percents <0;1> |
|
|||
|
|||
|
Example
REX.HMI.Graph.setRefreshRate(period) Change refresh rate of all signals and trends.
Param |
Description |
|
|
period |
Refresh period [ms] |
|
|
|
|
|
Example
REX.HMI.Graph.hideLegend() Hide legend of the graph
Example
[Previous] [Back to top] [Up]