This script is used with a Graphic display to open another WebAccess VIEW inside a smaller window in the original graphic display. This runs on both ViewDAQ and VIEW, but VIEW is the second occurrence opened. The idea is to have displays rotate using pushbuttons on the side.
Figure 17.2.5.4 - Graphic with Video Window display a second WebAccess VIEW with the Overview display.
Pressing Button 8 opens the FAN Display (2ductahu.bgr).
Figure 17.2.5.5 - Graphic with Video Window display a second WebAccess VIEW with the 2ductAHU display.
proc switchvideo {arg1} {
if {$arg1 == 0} then {
SENDVDO a1=daq:overview=1#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 1} then {
SENDVDO a1=daq:fplgroup=3#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 2} then {
SENDVDO a1=daq:realtrd=1#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 3} then {
SENDVDO a1=daq:dlogtrd=2#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 4} then {
SENDVDO a1=daq:almsummary=time#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 5} then {
SENDVDO a1=daq:almgroup=3#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 6} then {
SENDVDO a1=daq:recipe=startup.rcp^ahu1^maintenance#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 7} then {
SENDVDO a1=daq:graph=car.bgr#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 8} then {
SENDVDO a1=daq:graph=2ductahu.bgr#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 9} then {
SENDVDO a1=daq:station#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 10} then {
SENDVDO a1=daq:alarmlog#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 11} then {
SENDVDO a1=daq:actionlog#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} elseif {$arg1 == 12} then {
SENDVDO a1=daq:graph=fouttrendingraph.bgr#proj=livedemo&node=scadanode1&capt=0&flag=2147519873
} else {
SENDVDO "a1=videooff#msg=Press 'Press To Turn On View' button to show view."
}
}
if {[GETVAL toggle] > 0} then {
SETVAL "toggle=0"
if {[GETVAL videooff] == 0} then {
SETVAL "videooff=1"
SETVAL "countold=@count"
SETVAL "pageold=@page"
switchvideo -1
} else {
SETVAL "videooff=0"
SETVAL "count=@countold"
SETVAL "page=@pageold"
SETVAL "page_press=@page"
switchvideo [GETVAL page]
}
}
if {[GETVAL videooff] == 0} then {
if {[GETVAL page_press] != [GETVAL page]} then {
SETVAL "page=@page_press"
switchvideo [GETVAL page]
if {[GETVAL videohold] == 0} then {
SETVAL "count=0"
} else {
SETVAL "pageold=@page"
}
}
}
if {[GETVAL videooff] == 0 && [GETVAL videohold] == 0} then {
SETVAL "count=%PLUS 1"
if {[GETVAL count] > 480} then {
SETVAL "page=%LOOPPLUS 1"
SETVAL "page_press=@page"
switchvideo [GETVAL page]
SETVAL count=0
}
}