
244
43-TV-25-35 GLO Iss.4 Dec 06 UK
A5E01001767-04
Full Maths & Script Processing
With script above, BLKV (all Variables) are used to maintain values. It should be noted that
BLKV’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 3
The application described in Examples 2 and 3 is to be extended to totalise the amount of
time 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 as
If 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 timer
value.
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 last
time 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 A2
BLKV2=BLKV2+1;
Increment the change counter by 1
Return 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 time
Return BLKV2;
Return current change counter
}
if (GLBV1==1)
Tests if the global variable 1 is equal to channel 1
{
Summary of Contents for SIREC D200
Page 2: ......
Page 176: ...170 43 TV 25 35 GLO Iss 4 Dec 06 UK A5E01001767 04 Firmware Credit System ...
Page 222: ...216 43 TV 25 35 GLO Iss 4 Dec 06 UK A5E01001767 04 ...
Page 238: ...232 43 TV 25 35 GLO Iss 4 Dec 06 UK A5E01001767 04 ...
Page 258: ...252 43 TV 25 35 GLO Iss 4 Dec 06 UK A5E01001767 04 ...
Page 270: ...264 43 TV 25 35 GLO Iss 4 Dec 06 UK A5E01001767 04 ...
Page 274: ...268 43 TV 25 35 GLO Iss 4 Dec 06 UK A5E01001767 04 Modbus Function Codes ...
Page 284: ...278 43 TV 25 35 GLO Iss 4 Dec 06 UK A5E01001767 04 ...
Page 285: ......