Assessment (Data Types-Scripts) 1
Assessment (Data Types-Scripts) 1
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
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]
e) C XOR D
[A=TRUE, B=TRUE, C=FALSE, D=TRUE]
Logical Expressions & Scripting:
Script A:
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;
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;
Dim E as Bool;
E=false;
A=5;B=10;C=15;D=20;
E=true;
E=false;
Endif;
Dim E as Bool;
E=true;
A=5;B=10;C=15;D=20;
E=true;
E=false;
Endif;
Dim E as Bool;
E=true;
A=5;B=10;C=15;D=20;
E=false;
E=true;
Endif;
Endif;
Str=””; index=0;
str=str+int