Commands and functions
P.
247 of 349
Web server functions
Button (Webbutton)
Chart (Webchart)
Definition
●
Function
button
(
id
)
●
Identical to function
webbutton
of former releases.
Arguments
●
Argument
id
of data type u08. This argument must not change at the runtime of the
program.
Effect
●
By operating the button of a web button element (e.g.
button
or
shifter
) with the
id
(page
265 and the following), the function assumes a value not equal to zero for the duration of
one processing pass, and zero in all other cases.
●
For a
button
element, the return value when operated is 1.
●
For a
shifter
element, the return value when operated is 1, 2, 3 or 4 (u08) depending on the
actually operated element of the web button. The return values refer to the order of the
buttons (from left to right).
Data type result (Return)
●
Data type u08, values 0,1,2,3,4
Example: sendmail
A detailed example can be found on page 75 and the following.
Definition
●
Function
chart
(
id, var, x1, x2
)
●
compatible with function
webchart
Arguments
●
Arguments
id, var
of data type u08
●
Arguments
x1, x2
of data type c14
Effect
●
This function addresses the XY diagram
chart
. If there are multiple occurrences of
id
, all
elements of this id are addressed.
●
When calling this function, the XY diagram of the value
var
is activated. Values in the
range of 1...30 can be displayed. 0 refers to the value not being displayed, and values
greater than 30 are not permitted and are interpreted like 0. Every call of the function
displays the values beginning from the left side. When the end is reached after 47 function
calls, the values are shifted to the left.
●
The labeling of the x-axis is given by the arguments
x1, x2
(data type c14).
Data type result (Return)
●
Data type u08 (internal state of the webchart)
Example display percentage value
In an XY diagram of the web server (element
chart
), a percentage shall be displayed.
Implementation in the user program:
[WebServer]
chart(ChartWebID)[$0%$,$50%$,$100%$]
[EibPC]
PercentageValue='1/3/5'u08
ChartWebID=0
if stime(0) then\\
webchart(ChartWebID,convert(convert(PercentageValue,0f32)/8.5f32,0), $now$c14,$-
47min$c14) endif
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]