ICP DAS USA ISaGRAF WinCE ViewPAC User Manual page 99

Table of Contents

Advertisement

5.4.2.5 Trigger A Boolean Object To Blink
Demo example: vphmi_02 and vphmi_05
Some application may need a message to blink when the Boolean value changes. For example, If
boolean_val*12+ is False, it means "OK".
However if boolean_val*12+ is True, it means "Error !" . User may want to make this "Error !" blink to
attract viewer's attention.
The below code can do this job.
...
var blink_period=500;
setTimeout("blink_obj()", blink_period);
var B12_blink=0;
// init as 0:not blink
var blink_step=0;
function blink_obj()
{
if(blink_step==1)
{
blink_step=0;
if(B12_blink==1)
{
B12.innerText="Error !" ;
font_B12.color="red";
}
}
else
{
blink_step=1;
if(B12_blink==1)
{
B12.innerText="" ;
font_B12.color="red";
}
}
setTimeout("blink_obj()", blink_period);
}
...
(section
1: to blink , 0: no blink
ISaGRAF WinCE ViewPAC User Manual , V.1.6 , 1/2017 by ICP DAS
3.1)
The blinking period, unit is ms
Setup a timer to handle the blinking
action
Blink step 1:
To display "Error !" in red color.
Blink step 2:
To display "" (nothing) in red color.
5-11

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents