Programming for experts
P.
115 of 349
Visualisation of time series
Advanced Mtimechart (EXT)
Mtimechart diagram with extended
applications for moving, outfading ,
zooming from graphes
Comparing time series: Field Δd
Adjust the memory size to the needs
With the EibPC (from V3.000)time series can be easily added, pemanently stored and visualised. For
this purpose a (global) diagram element art (p. 279) is availabe on the webserver.
As given in the definition on p. 279, diagrams can be labeled with two axes and the scaling can be
chosen automatically or by value range specification. There are diagrams in sizes DOUBLE (2,2),
TRIPLE (3,2), QUAD (4,2),LONG (4,4) specified with the unit heights and widths as shown in the
parentheses.
In addition there are the EXT-diagrams EXTDOUBLE, EXTRIPLE, EXTLONG, they are enable the
advanced functionality with a simpler parametrization. With these we want to start. We first define a
webelement mtimechart with sixfold width, where both axes are displayed and are scaled
automatically.
[WebServer]
page(1)[$Log$,$Room1$]
mtimechart(R1_ID)[EXTLONG,NOAUTOSCALE,192,17,30,0,100] ( $Temp$,LEFTGRAF, ChartBuffer0,
$Control$,RIGHTGRAF,ChartBuffer1 )
In the definition is set beside the specification, that no automatic scaling of the the axes is desired,
that the diagram max. 192 pairs of value (value/time) represents. In this case 256 pairs are possible.
The first y-axis represents values in the range from 17 to 30, the second from 0 to 100. The first
buffer (buffer0) is assigned to the left axis and the second buffer (buffer1) to right axis.
Picture 6: Timechart webelement EXTLONG
Picture 6 shows this mtimechart-diagram, which displays two of the four possible time series. The
user can scroll left and right in the time series (buttons << respectively >>), as well as zooming. Both
operations are applied to all graphs of a mtimechart. With the field Δd can be an offset in days for the
displayed time series individually adjusted, in order e.g. to compare the consumption data from two
time series during the year. These control functions are part the EXT-diagrams itself so no further
expenditure occurs by programming the webelement. Only the time series (timebuffer) have to be
configured and recorded.
Now consider the following definition (comp. 254):
timebufferconfig
(
ChartBufferID, MemTyp, Length, DataTyp
)
This function allows up to 256 (ID 0 to 255) various buffers for recording time series.
MemTyp
indicates whether the memory in the ring (0) or linear (1) is decribed (more on this below). The length
of the max. recording of time series is specified with
Length
(0u16 to 65565u16). Per stored value
(see below) time series requires 12 bytes regardless of the stored
DataTyp
. It is recommendable to
adjust the size of the memory to the real needs: A time series with the max. length occupies 780 kB
RAM.
DataTyp
displays a representative number of time series e.g. 0f16 for 16-bits numbers or 3% for u08
values. The number itself is not further processed and serves the compiler to win only the type
information. We use the timebuffer with ID 0 for recording the temperature group address 1/2/3 (type
f16) and the ID 1 for the adjusting size of the heat-controller 1/2/4 (u08).
[EibPC]
R1_ID=1
// Timebuffer IDs vergeben:
ChartBuffer1=1
ChartBuffer1=2
// timebufferconfig: Einen Zeitbuffer konfigurieren
MemTyp=0
Len=35040u16
Datatyp=3.3f16
timebufferconfig(ChartBuffer1, MemTyp, Len, "Temperature-1/2/3")
timebufferconfig(ChartBuffer2, MemTyp, Len, "Controll-1/2/4")
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]