ISaGRAF WinCE ViewPAC User Manual , V.1.6 , 1/2017 by ICP DAS
5-11
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);
}
…
The blinking period, unit is ms
Setup a timer to handle the blinking
action
1: to blink , 0: no blink
Blink step 1:
To display “Error !” in red color.
Blink step 2:
To display “” (nothing) in red color.
Содержание ISaGRAF VP-23W7
Страница 44: ......
Страница 118: ......
Страница 134: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS 9 2 On line help of ICP DAS add on functions function blocks ...
Страница 176: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 16 Appendix C Hardware Interface Dimension ...
Страница 177: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 17 VP 23W7 23W6 Unit mm ...
Страница 178: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 18 VP 25W7 25W6 Unit mm ...
Страница 179: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 19 ...
Страница 180: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 20 VP 41x7 41x6 Unit mm ...
Страница 185: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 25 ...