244 43-TV-25-35 GLO Iss.4 Dec 06 UKA5E01001767-04Full Maths & Script ProcessingWith script above, BLKV (all Variables) are used to maintain values. It should be noted thatBLKV’s do not persist over a power removal, and if the application were to require a non-volatile count, then BLKVn should be substituted with PSTVn.Example 3The application described in Examples 2 and 3 is to be extended to totalise the amount oftime that Input 1 is the highest of 1, 2, 3 & 4.Again scripting can be used to easily solve this requirement.The Pseudo code is written asIf input 1 is indicated as the current highest value, then display the timer.If input 1 is not the highest input value, then stop totalising time and return the current timervalue.We know that in Example 1, the highest value channel number is contained with GLBV1,and as this is a global variable it is also accessible from this script.if (A3>A2) Tests if A3 is bigger than A2{if(BLKV1==1) If it was then tests if A3 was bigger than A2 lasttime period{return BLKV2; If it was return with the current change counter}else If not then{BLKV1=1; Set flag to show that A3 has just exceeded A2BLKV2=BLKV2+1; Increment the change counter by 1Return BLKV2; Return the new change counter total} }else If A3 is not bigger than A2{BLKV1=0; Set flag to show A2 is bigger than A3 this timeReturn BLKV2; Return current change counter}if (GLBV1==1) Tests if the global variable 1 is equal to channel 1{