ICP DAS USA ISaGRAF WinCE ViewPAC User Manual page 97

Table of Contents

Advertisement

5.4.2.1 Displaying Dynamic Boolean Data
Demo example: vphmi_02 and vphmi_05
Let's look back to the refresh_data function. If user want to display the dynamic boolean value, the
below code can be used.
...
function refresh_data()
{
B1.src = "./img/circle_blue" + boolean_val[1] + ".jpg" ;
}
if boolean_val*1+=1, it display image "B1" as "img/circle_blue1.jpg"
...
if boolean_val*1+=0, it display image "B1" as "img/circle_blue0.jpg"
<body onLoad="init()">
...
<div style="position: absolute; width: 214px; height: 53px; z-index: 2; left: 102px; top: 79px">
<img name="B1" src="img/circle_blue0.jpg"></div>
...
</body>
5.4.2.2 Displaying Dynamic Float & Word & Timer Data
Demo example: vphmi_01 , vphmi_03 and vphmi_05
If user want to display the dynamic float value, the below code can be used.
...
function refresh_data()
{
F21.innerText = float_val[21] ;
}
...
<body onLoad="init()">
...
<div style="position: absolute; width: 214px; height: 53px; z-index: 2; left: 102px; top: 79px">
<b id="F21"> xxxx </b> </div>
...
The declaration of Text object "F21" is defined here by the "<b" tag & id="F21"
</body>
& "</b>" tag initial value of this F21 is "xxxx"
(section
The action of the image object "B1" is defined here.
The layout (or location) of the image object "B1" is defined here by the
"<div" and
The declaration of image "B1" is defined here by the "img" tag &
name="B1" src= ...  "src=" defines the initial value of B1
The action of the Text object "F21" is defined here.
If want to display Word data, please use "word_val* +"
If want to display Timer data, please use "timer_val* +".
For ex, F21.innerText = timer_val*21+ + " ms";
The layout (or location) of the Text object "F21" is defined
here by the "<div"
ISaGRAF WinCE ViewPAC User Manual , V.1.6 , 1/2017 by ICP DAS
3.1)
"</div>" tags.
(section
3.1)
"</div>" tags.
5-9

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vp-25w7Vp-23w7Vp-4137Vp-25w6Vp-23w6Vp-4136

Table of Contents