Name:
Data Types:
1. What is the typical range of a 16-bit signed integer, and how does it differ from an unsigned
integer? (just show the working, not need to provide the actual number)
2. We need to store value of an Analog Pressure Transmitter in SCADA, what data types can be
used to store the value typically?
A. Bool
B. Integer
C. String
D. Float
3. We need to store value of a Pressure switch in SCADA, what data types can be used to store the
value typically?
A. Bool
B. Integer
C. String
D. Float
4. A value of “14.75” can be stored in the following data types only:
A. Bool
B. Integer
C. Float
5. There is a floating-point Tag A with value 14.75 and there is an integer Tag B with value 15.
What will be the answer to the following script?
B=A;
6. Convert the binary (base 2) number 00101001 into Decimal (Base 10)
7. Convert the following hexadecimal (base 8) number 01001 into Decimal (Base 10)
Logic Gates:
8. Provide response (true or false) to the following expressions, considering Boolean tags A, B, C &
D:
a) (A OR B) AND (C OR D)
[A=TRUE, B=FALSE, C=FALSE, D=FALSE]
b) (A AND B) AND (C OR D)
[A=TRUE, B=FALSE, C=FALSE, D=FALSE]
c) (A AND B) OR (C AND D)
[A=TRUE, B=FALSE, C=FALSE, D=TRUE]
d) A AND (B and (NOT C))
[A=TRUE, B=TRUE, C=FALSE, D=TRUE]
e) C XOR D
[A=TRUE, B=TRUE, C=FALSE, D=TRUE]
Logical Expressions & Scripting:
9. Provide response to the following scripts:
Script A:
Dim A,B,C,D as integer;
Dim E as Bool;
E=false;
A=0;B=0;C=0;D=0;
If E==false then
A=12;
B=14;
Else
C=130;
D=140;
Endif;
Provide the values of A,B, C & D after this script is executed.
Script B:
Dim A,B,C,D as integer;
Dim E as Bool;
E=false;
A=0;B=0;C=0;D=0;
If E==false then
A=12;
B=14;
E=true;
Else
C=130;
D=140;
Endif;
Provide the values of A,B, C & D after this script is executed.
Script C:
Dim A,B,C,D as integer;
Dim E as Bool;
E=false;
A=5;B=10;C=15;D=20;
If A=5 AND B=10 then
E=true;
Elseif C=15 AND D=20
E=false;
Endif;
Provide the value of E after this script is executed
Script D:
Dim A,B,C,D as integer;
Dim E as Bool;
E=true;
A=5;B=10;C=15;D=20;
If A=5 AND B=11 then
E=true;
Elseif C=15 OR D=21
E=false;
Endif;
Provide the value of E after this script is executed
Script E:
Dim A,B,C,D as integer;
Dim E as Bool;
E=true;
A=5;B=10;C=15;D=20;
If A=5 AND B=10 then
E=false;
If C=15 AND D=20 then
E=true;
Endif;
Endif;
Provide the value of E after this script is executed
Script F:
Dim str as string;
Dim index as integer;
Str=””; index=0;
For (index = 0 , index <=10, index=index+1)
if index >=3 then
str=str+int
Provide the value of E after this script is executed