Programming - First steps
P.
85 of 349
mchart and picture
Embedding external graphics
XY charts
Visualization wizard
The configuration of the elements plink and link, respectively, is handled equal to the button element.
By means of the function
pdisplay
the Icon and the text can be changed.
With it, we reach two further important web elements for visualization with the Enertex® EibPC, the
mchart
. This element can be utilized for embedding external camera pictures or weather forecasts as
well as for displaying up to four different graphs for the visualization of arbitrary runs.
Embedding external sources is achieved as follows:
page(WeatherID)[$Miscellaneous$,$Weather$]
mchart[DOUBLE,CENTERGRAF]($The weather$, \\
$http://
de.weather.yahoo.com/images/eur_germany_outlook_DE_DE_440_dmy_y.jpg$) \\
mchart[DOUBLE,CENTERGRAF]($Satellite picture$ ,\\
$
http://
de.weather.yahoo.com/images/eur_satintl_440_dmy_y.jpg$)
You will find the exact syntax of
mchart
and
mpchart
, respectively, particularly the visualization
options, on page 278. At this, the design of an XY chart is to be configured as follows:
mpchart[DOUBLE,XY]($Temperature$,TempID,LINE,$Flow$,FlowID,LINEDOTS,\\
$OutdoorTemperature$,OutdoorID,COLUMN) \\
mpchart[DOUBLE,XY]($Temperature$,TempID,LINE)
The first statement defines a
chart
which records up to three graphs, whereas at the second
statement only one graph is recorded.
To fill these in the application program with data every 15 minutes, we proceed as follows:
[EibPC]
TempID=0
FlowID=1
OutdoorID=2
//Time display
Time=convert(hour(),0.0)+convert(minute(),0.0)/60.0
if mtime(15,0) then mpchart(TempID,Time,'2/3/5'f16,WeatherID) endif
if mtime(15,0) then mpchart(FlowID,Time,'2/3/4'f16,WeatherID) endif
if mtime(15,0) then mpchart(OutdoorID,Time,'2/3/4'f16,WeatherID) endif
Congratulation
. You have now reached the end of this comprehensive introduction and should now
be able to work with the Enertex
®
EibPC on your own.
From EibStudio® V2.200, you can also create web pages using the visualization wizard.
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]