CSE211s_2023_Final_with_asnwers

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

AIN SHAMS UNIVERSITY

FACULTY OF ENGINEERING
Computer and Systems Engineering Department
Junior Level, Electrical power and Machines Engineering
Spring 2023 - Final Exam (Model Answer) Course Code: CSE 211s Time allowed: 2 Hrs.
INTRODUCTION TO EMBEDDED SYSTEMS
The Exam Consists of 50 Questions in Eleven Pages. Maximum Marks: 60 Marks 1 / 11
Important Rules: ‫تعليمات هامة‬
• Having a )mobile -Smart Watch- earphones) inside the examination hall ‫ سماعة األذن) داخل لجنة‬- ‫ الساعات الذكية‬-‫• حيازة (املحمول‬
is forbidden and is considered as a cheating behavior. . ‫المتحان يعتبر حالة غش تستوجب العقاب‬
• It is forbidden to have any references, notes, books, or any other
‫• ليسمح بدخول أي كتب أو مالزم أو أوراق داخل اللجنة‬
materials even if it is not related to the exam content with you in the
examination hall. .‫واملخالفة تعتبر حالة غش‬

Student Name: Student ID:

For each of the following 50 multiple choice questions (MCQs), select ONLY the ONE correct answer.
Mark your choice on the answer bubble sheet. .................................... [The 50 MCQs are equal in weight]
1. Using Arduino Uno board, which of the following statements can be used to define PIN3 as an output
port and set it to one?
A) pinMode (3, OUTPUT); digitalWrite (1, 3); B) pinMode (3, OUTPUT_PULLUP); digitalWrite (3, HIGH);
C) pinMode (3, OUTPUT); digitalWrite (3, HIGH); D) pinMode (3, INPUT); digitalWrite (HIGH, 1);

2. Using Arduino Uno board, what are the best parameters to send to an analogWrite function to generate
a square wave on PIN4 with a 4% duty cycle?
A) 4,40 B) 4,0.04 C) 4,4 D) 4,10
3. Which expression can be used to check if the 3rd bit on an 8-bit variable X is one?
A) ((X & 0x04)>>2) ==1 B) ((X & 0x04)>>3) ==1 C) ((X & 0x03) <<2) ==1 D) ((X | 0x04) >>3) ==1
4. Using Arduino Uno board, what is the third parameter to send to the function attachInterrupt
(digitalPinToInterrupt(3), ISR, ________); to call a function named “ISR” on every change from HIGH to
LOW only on PIN 3?
A) FALLING B) LOW C) RISING D)CHANGE
5. Using Arduino Uno board, what is the value of variable “y” after executing the statements
AnalogReference(EXTERNAL); int y=analogRead(0);, given that VR =2.50 V and 1.15 V is applied on analog
pin 0?
A) 235 B) 511 C) 470 D) 115
6. Which of the following is not a correct statement from I2C specifications?
A) Easy to add on slave devices B) Supports 5MB/s in the ultra-fast mode
C) A simple two-wire communication protocol D) Has an SCL line for data and an SDA line for clock.
7. How many wires are needed to communicate between a one microcontroller as a master and 7 devices
as slaves (4 using SPI and 3 using I2c)?
A) 10 B) 12 C) 9 D) 7
8. Given that the orange color can be represented by 0xFF7F27 using RGB888 (24-bits color depth), what is
the orange color value in RGB565 (16-bits color depth)?
A) 0xFBA3 B) 0xEA44 C) 0xFA4E D) 0xFBE4

MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A


AIN SHAMS UNIVERSITY, FACULTY OF ENGINEERING
Computer and Systems Engineering Department, @ Junior Level - Electrical power and Machines Engineering
Spring 2023 – Final Exam (Model Answer) Course Code: CSE 211s Time Allowed: 2 Hrs.
INTRODUCTION TO EMBEDDED SYSTEMS
The Exam Consists of 50 Questions in Eleven Pages. 2 / 11

9. Which PID controller setting(s) has/have a major effect on steady-state error and can eliminate it?
A) Ki B) Kp, Kd C) Kp D) Kd
10. Using Sony remote control (12-bit SIRC, command in 7 bits followed by the address in 5 bits), what is the
command sent in the following pattern?

A) 68 B) 84 C) 17 D) 21
11. How many wires are common between master and all slaves, when using SPI in communication?
A) 2 B) 1 C) 3 D) 4
12. The main advantage of I2C over SPI is: “it is easy to add new slave devices onto the bus in I2C, unlike SPI
that needs a dedicated line for each slave device.” What is the name of that line that is needed in SPI for
each slave device?
A) MOSI B) SS/CS C) MISO D) SCLK
13. Which PID controller setting(s) has/have a major effect on settling time and can increase the damping on
the output?
A) Kp B) Ki C) Kd D) Kp, Ki
14. Which function can be used to read an analog input?
A) Read () B) AnalogGet () C) analogRead () D) ReadAnalog ()
15. In a C-language code, X and Y are defined as char variables, if X= ‘3’ and Y= X+1, then Y is equal to ___.
A) 4 B) 31 C) ’31’ D) ’4’

Questions 16—22

An Arduino Uno
microcontroller is used to
control a stepper motor for
solar tracking system. The
used motor has unipolar
configuration, as shown in
the figure. We can turn the
motor clockwise (CW) by
driving B-, A-, B+, A+ in
sequential order. The
resistance of the used LDR
is almost zero with
maximum light intensity
and increases to 100k in
darkness. If the intensity of
the light on the left LDR is more than the right LDR, the motor should rotate counterclockwise (CCW) and vice
versa. The speed of the motor should be direct proportional to the difference between the two intensities of
the light on both LDRs. The motor should stop if the difference is zero. PROG1 performs this functionality.

MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A


AIN SHAMS UNIVERSITY, FACULTY OF ENGINEERING
Computer and Systems Engineering Department, @ Junior Level - Electrical power and Machines Engineering
Spring 2023 – Final Exam (Model Answer) Course Code: CSE 211s Time Allowed: 2 Hrs.
INTRODUCTION TO EMBEDDED SYSTEMS
The Exam Consists of 50 Questions in Eleven Pages. 3 / 11

PROG1 Q16-Q22
1 #define MOTOR_OUT_PIN_BASE 3
2 #define RIGHT_ANALOG_IN 5
3 #define LEFT_ANALOG_IN 4
4 #define MIN_DELAY 100
5 #define MAX_DELAY 500
6 byte output_value=1;
7 void setup () {for (int i=0; i<4; i++) pinMode(MOTOR_OUT_PIN_BASE+i, OUTPUT); }
8 void loop(void) {
9 for (int i=0; i<4; i++) digitalWrite (MOTOR_OUT_PIN_BASE+i, (<EXPR1>));
10 int error=analogRead (RIGHT_ANALOG_IN) – analogRead (LEFT_ANALOG_IN);
11 int abs_error=<EXPR2>;
12 int delay_v=map (abs_error, <V1>, <V2>, MAX_DELAY, MIN_DELAY);
13 if (<C1>) {
14 if (error>0) output_value=(output_value==<V3>)? <V4>: output_value>>1; //CCW
15 else output_value=(output_value==<V5>)? <V6>: output_value<<1; //CW
16 }
17 delay(delay_v);
18 }
16. In PROG1 line 9 the <EXPR1> should be
A) output_value>i & 0x1 B) output_value<i & 0x1 C) output_value>>i & 0x1 D) output_value<<i & 1
17. In PROG1 line 11 the <EXPR2> should be
A) (error<0)? error: -error B) (error>0)? error: -error C) (error==0)? error: -error D) (error<=0)? error: -error
18. In PROG1 line 12 the best value for <V1> should be
A) -1023 B) 0 C) -1013 D) -1000
19. In PROG1 line 12 the best value for <V2> should be
A)255 B) 1023 C) 1013 D) 1000
20. In PROG1 line 13 <C1> should be
A) delay_v<MAX_DELAY B) delay_v==MAX_DELAY C) delay_v<MIN_DELAY D) delay_v>MIN_DELAY
21. In PROG1 line 14 <V3>, <V4> should be
A) 8,1 B) 0,1 C) 8,0 D) 1,8
22. In PROG1 line 15 <V5>, <V6> should be
A) 8,1 B) 0,1 C) 8,0 D) 1,8

MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A


AIN SHAMS UNIVERSITY, FACULTY OF ENGINEERING
Computer and Systems Engineering Department, @ Junior Level - Electrical power and Machines Engineering
Spring 2023 – Final Exam (Model Answer) Course Code: CSE 211s Time Allowed: 2 Hrs.
INTRODUCTION TO EMBEDDED SYSTEMS
The Exam Consists of 50 Questions in Eleven Pages. 4 / 11

Questions 23—29

An Arduino Uno microcontroller is used to control


three servo motors using PWM. Three
potentiometers are used to adjust the motors’
angle from 0o to 180o according to the values of
VA2, VA3 and VA4 to control motors M1, M2 and
M3, respectively such as (0—5) Volts should
mapped to (0o—180o). The angle of the motor can
be controlled according to the duty cycle. The full
period should be 20 ms. Angle 0o can be achieved
with a high pulse for 1 ms, 180o using a high pulse
for 2 ms, as shown in the figure. The relation
between the angle and high duration is linear. The
Uno microcontroller runs PROG2 to perform the
described operation. Note: VR for ADC= 5 Volts.

Hint: PROG2 reads (VA2, VA3 and VA4), sorts them then calculates relative delay for each one.

PROG2 Q23-Q29
1 #include <MsTimer2.h>
2 #define ANALOG_IN_BASE 2
3 #define MOTOR_OUT_PIN_BASE 2
4 #define NO_OF_MOTORS 3
5 #define SWAP(A,B,temp) <EXPR1>
6 unsigned int Off_time [NO_OF_MOTORS], max_delay;
7 byte motor_index [NO_OF_MOTORS];
8 void sort_motor_delay () {
9 unsigned int temp;
10 for (byte k=0; k<NO_OF_MOTORS;k++) motor_index[k]=k;
11 for (byte i=0;<C1>; i++) {
12 for (byte <EXPR2>; j<NO_OF_MOTORS; j++) {
13 if(<C2>) {// sort the values ascending
14 SWAP(Off_time[i], Off_time[j], temp);
15 SWAP (motor_index[i], motor_index[j], temp);
16 }}}
17 }

MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A


AIN SHAMS UNIVERSITY, FACULTY OF ENGINEERING
Computer and Systems Engineering Department, @ Junior Level - Electrical power and Machines Engineering
Spring 2023 – Final Exam (Model Answer) Course Code: CSE 211s Time Allowed: 2 Hrs.
INTRODUCTION TO EMBEDDED SYSTEMS
The Exam Consists of 50 Questions in Eleven Pages. 5 / 11

18 void read_required_angle(){
19 for (byte k=0; k<NO_OF_MOTORS;k++) {
20 unsigned int v=analogRead (ANALOG_IN_BASE+k);
21 Off_time[k]=1000-map(v,0,1023,0,1000);
22 }}
23 void isr () {
24 read_required_angle (); sort_motor_delay();
25 max_delay=Off_time [NO_OF_MOTORS-1];
26 for (byte k=NO_OF_MOTORS-1; k>0; k--) <EXPR3>; //calculate relative delay
27 for (byte k=0; k<NO_OF_MOTORS;k++) {
28 delayMicroseconds (Off_time[k]);
29 digitalWrite(MOTOR_OUT_PIN_BASE+motor_index[k],1);
30 }
31 delayMicroseconds(<EXPR4>);
32 for (byte k=0; k<NO_OF_MOTORS; k++) digitalWrite(MOTOR_OUT_PIN_BASE+k,0);
33 }
34 void setup () {
35 for (byte k=0; k<NO_OF_MOTORS; k++) pinMode(MOTOR_OUT_PIN_BASE+k, OUTPUT);
36 MsTimer2::set(<V1>,isr);MsTimer2::start(); }
37 void loop(void) {}
23.3 In PROG2 line 5 the <EXPR1> should be
A) A=B; B=A; A=temp B) temp=B; A=B; B=temp C) B=temp;A=temp;B=A D) temp=A; A=B; B=temp
24. In PROG2 line 11 the <C1> should be
A) i<NO_OF_MOTORS-1 B) i<NO_OF_MOTORS C) i<NO_OF_MOTORS+1 D) i<NO_OF_MOTORS-2
25. In PROG2 line 12 the <EXPR2> should be
A) j=0 B) j=i C) j=i+1 D) j=i-1
26. In PROG2 line 13 the <C2> should be
A) Off_time[i]<Off_time[j] B) Off_time[i]==Off_time[j] C) Off_time[i]>Off_time[j] D) Off_time[i] !=Off_time[j]
27. In PROG2 line 26 the <EXPR3> should be
A) Off_time[k] +=Off_time[k-1] B) Off Off_time[k-1] + =Off_time[k]
C) Off Off_time[k-1] -=Off_time[k] D) Off_time[k] -=Off_time[k-1]
28. In PROG2 line 31 the <EXPR4> should be
A) 2000-max_delay B) 1000-max_delay C) 2000+max_delay D) 1000+max_delay
29. In PROG2 line 36 the <V1> should be
A) 1000 B) 18 C) 2000 D) 10

MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A


AIN SHAMS UNIVERSITY, FACULTY OF ENGINEERING
Computer and Systems Engineering Department, @ Junior Level - Electrical power and Machines Engineering
Spring 2023 – Final Exam (Model Answer) Course Code: CSE 211s Time Allowed: 2 Hrs.
INTRODUCTION TO EMBEDDED SYSTEMS
The Exam Consists of 50 Questions in Eleven Pages. 6 / 11

Questions 30—39
An Arduino Uno microcontroller is used to decode the received pattern from Sony remote controller using
IR-RCVR. As shown in the figure the pattern starts with the start bit followed by the command in 7 bits then
the address in 5 bits. An Uno microcontroller runs PROG3 to decode the received pattern into Command
and Address.

Note:
1) The IR-RCVR output level is inverted, such that the Start bit is received as logic “0” and the gap as logic
“1”.
2) Received signal timing durations can be increased/decreased with a tolerance 20%, i.e., exact value
for START bit duration equals to 2.4 ms and is acceptable to be (2.4±20%), that is 1.92—2.88 ms.

PROG3 Q30-Q39
1 #define IR_REC_PIN 3
2 #define START 2400 // 2.4 ms
3 #define ZERO_DURATION 600 // 0.6 ms
4 #define ONE_DURATION 1200 // 1.2 ms
5 #define TOL 0.2 // tolerance value 20%
6 #define COMMAND_N_BITS 7
7 #define ADDRESS_N_BITS 5
8 long time_duration;
9 byte rec_buffer [COMMAND_N_BITS+ADDRESS_N_BITS], rec_index=0;
10 void setup () {
11 pinMode (IR_REC_PIN, INPUT); Serial.begin(9600);
12 attachInterrupt (digitalPinToInterrupt (IR_REC_PIN), pin_isr,CHANGE);
13 }

MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A


AIN SHAMS UNIVERSITY, FACULTY OF ENGINEERING
Computer and Systems Engineering Department, @ Junior Level - Electrical power and Machines Engineering
Spring 2023 – Final Exam (Model Answer) Course Code: CSE 211s Time Allowed: 2 Hrs.
INTRODUCTION TO EMBEDDED SYSTEMS
The Exam Consists of 50 Questions in Eleven Pages. 7 / 11

14 void pin_isr(){
15 if (<C1>) {
16 time_duration= micros () - time_duration;
17 if ((time_duration> (1 - EXPR1) * EXPR2)) && (time_duration< (1+ EXPR1) * EXPR2)))
rec_index=0;

18 else if ((time_duration> (1- EXPR1) * EXPR3) && (time_duration< (1+ EXPR1) * EXPR3))
rec_buffer[rec_index++] =1;

19 else if ((time_duration> (1- EXPR1) * EXPR4) && (time_duration< (1+ EXPR1) *EXPR4))
rec_buffer[rec_index++] =0;

20 } else {time_duration=micros ();}

21 if (rec_index== EXPR5) {

22 byte command=0, address=0, i;


23 for (i =0; i< EXPR6; i++) EXPR8 +=rec_buffer[i]<<i;
24 for (i =0; i< EXPR7; i++) EXPR9 +=rec_buffer [i+ EXPR6] <<i;
25 Serial.print("Command: "); Serial.println(command);
26 Serial.print("Address: "); Serial.println(address);
27 }}
28 void loop () {}

30. In PROG3 line 15 the condition <C1> should be


A) IR_REC_PIN==0 B) IR_REC_PIN==1
C) digitalRead(IR_REC_PIN)==0 D) digitalRead(IR_REC_PIN)==1
31. In PROG3 lines 17, 18, 19 the <EXPR1> should be
A) START B) ONE_DURATION C) ZERO_DURATION D) TOL
32. In PROG3 line 17 the <EXPR2> should be
A) START B) ONE_DURATION C) ZERO_DURATION D) TOL
33. In PROG3 line 18 the <EXPR3> should be
A) START B) ONE_DURATION C) ZERO_DURATION D) TOL
34. In PROG3 line 19 the <EXPR4> should be
A) START B) ONE_DURATION C) ZERO_DURATION D) TOL
35. In PROG3 line 21 the <EXPR5> should be
A) COMMAND_N_BITS B) ADDRESS_N_BITS
C) COMMAND_N_BITS+ ADDRESS_N_BITS D) COMMAND_N_BITS- ADDRESS_N_BITS

MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A


AIN SHAMS UNIVERSITY, FACULTY OF ENGINEERING
Computer and Systems Engineering Department, @ Junior Level - Electrical power and Machines Engineering
Spring 2023 – Final Exam (Model Answer) Course Code: CSE 211s Time Allowed: 2 Hrs.
INTRODUCTION TO EMBEDDED SYSTEMS
The Exam Consists of 50 Questions in Eleven Pages. 8 / 11

36. In PROG3 lines 23, 24 the <EXPR6> should be


A) COMMAND_N_BITS B) ADDRESS_N_BITS
C) COMMAND_N_BITS+ ADDRESS_N_BITS D) COMMAND_N_BITS- ADDRESS_N_BITS
37. In PROG3 line 24 the <EXPR7> should be
A) COMMAND_N_BITS B) ADDRESS_N_BITS
C) COMMAND_N_BITS+ ADDRESS_N_BITS D) COMMAND_N_BITS- ADDRESS_N_BITS
38. In PROG3 line 23 the <EXPR8> should be
A) command B) rec_buffer C) address D) rec_index
39. In PROG3 line 24 the <EXPR9> should be
A) command B) rec_buffer C) address D) rec_index

Questions 40—50

The figure shows the connection between a water tank and its level controller. The controller has two inputs:
High-Level Sensor and Low-Level Sensor, which sense the level of the water inside the tank. Both sensors are
connected through signal conditioning circuits to output logic high/low voltage levels. High voltage level (logic
1) on the output of the signal conditioning circuits means that the water level reached the sensor. Controller
output (PUMP_PIN) is used to control a water pump. ON (Green) and ALARM (Red) LED indicators are used to
show the state of the pump. The controller runs PROG4 on Uno microcontroller. The pump should be turned
on, if the water level in the tank is below the low level until reaching the upper level, then it is turned off until
the water level drops again below the lower level. If it happens that the pump is on for 1 s without having the
water reaching the low-level sensor or 3 s without having the water reaching the high-level sensor, the pump
is turned off and the ALARM LED is switched on for 6 s. Then, the pump is switched on again (with ALARM LED
off), continuing as normal.
Note: On LED should be enabled only while switching on the pump

MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A


AIN SHAMS UNIVERSITY, FACULTY OF ENGINEERING
Computer and Systems Engineering Department, @ Junior Level - Electrical power and Machines Engineering
Spring 2023 – Final Exam (Model Answer) Course Code: CSE 211s Time Allowed: 2 Hrs.
INTRODUCTION TO EMBEDDED SYSTEMS
The Exam Consists of 50 Questions in Eleven Pages. 9 / 11

PROG4 Q40-Q50

1 #include<MsTimer2.h>

2 #define HIGH_LEVEL_PIN 2

3 #define LOW_LEVEL_PIN 3

4 #define ON_LED 4

5 #define ALARM_LED 5

6 #define PUMP_PIN 6

7 #define PUMP_OFF_STATE 0

8 #define PUMP_ON_STATE 1

9 #define PUMP_ALARM_STATE 2

10 #define COUNTER_TH <V1>

11 unsigned long on_state_counter;

12 byte PUMP_STATE=PUMP_OFF_STATE;

13 void timer_isr(){

14 MsTimer2::stop();

15 if (PUMP_STATE==PUMP_ALARM_STATE) {

16 PUMP_STATE=<EXPR1>;

17 on_state_counter=0;

18 } else {

19 on_state_counter+=1;

20 if (! digitalRead (LOW_LEVEL_PIN)) PUMP_STATE=<EXPR2>;

21 if (! digitalRead (HIGH_LEVEL_PIN) && on_state_counter==COUNTER_TH) PUMP_STATE=<EXPR2>;

22 }

23 check_water_level_isr();

24 }

25 void check_water_level_isr(){

26 if (PUMP_STATE==PUMP_OFF_STATE && !digitalRead(LOW_LEVEL_PIN)){

MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A


AIN SHAMS UNIVERSITY, FACULTY OF ENGINEERING
Computer and Systems Engineering Department, @ Junior Level - Electrical power and Machines Engineering
Spring 2023 – Final Exam (Model Answer) Course Code: CSE 211s Time Allowed: 2 Hrs.
INTRODUCTION TO EMBEDDED SYSTEMS
The Exam Consists of 50 Questions in Eleven Pages. 10 / 11

27 PUMP_STATE= <EXPR3>;

28 on_state_counter=0;

29 } else if (PUMP_STATE==PUMP_ON_STATE && digitalRead(HIGH_LEVEL_PIN)) {

30 PUMP_STATE= <EXPR4>;

31 }

32 if (PUMP_STATE==PUMP_OFF_STATE) {

33 digitalWrite (ON_LED, <V2>); digitalWrite(ALARM_LED, <V3>);digitalWrite(PUMP_PIN, <V4>);

34 }

35 if (PUMP_STATE==PUMP_ON_STATE) {

36 digitalWrite (ON_LED, <V5>); digitalWrite (ALARM_LED, <V6>); digitalWrite(PUMP_PIN,<V7>);

37 MsTimer2::set(<V11>,timer_isr);MsTimer2::start();

38 }

39 if (PUMP_STATE==PUMP_ALARM_STATE) {

40 digitalWrite (ON_LED, <V8>); digitalWrite(ALARM_LED, <V9>);digitalWrite(PUMP_PIN, <V10>);

41 MsTimer2::set(<V12>,timer_isr);MsTimer2::start(); on_state_counter=0;

42 }

43 }

44 void setup () {

45 pinMode (LOW_LEVEL_PIN, INPUT_PULLUP);

46 pinMode (HIGH_LEVEL_PIN, INPUT_PULLUP);

47 pinMode (ON_LED, OUTPUT); pinMode(ALARM_LED,OUTPUT); pinMode(PUMP_PIN,OUTPUT);

48 attachInterrupt (digitalPinToInterrupt (LOW_LEVEL_PIN), check_water_level_isr, <EXPR5>);

49 attachInterrupt (digitalPinToInterrupt (HIGH_LEVEL_PIN), check_water_level_isr, <EXPR5>);

50 check_water_level_isr();

51 }

52 void loop (){}

MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A


AIN SHAMS UNIVERSITY, FACULTY OF ENGINEERING
Computer and Systems Engineering Department, @ Junior Level - Electrical power and Machines Engineering
Spring 2023 – Final Exam (Model Answer) Course Code: CSE 211s Time Allowed: 2 Hrs.
INTRODUCTION TO EMBEDDED SYSTEMS
The Exam Consists of 50 Questions in Eleven Pages. 11 / 11

40. In PROG4 line 10 the <V1> should be


A) 2 B) 4 C) 3 D) 6
41. In PROG4 line 16 the <EXPR1> should be
A) PUMP_OFF_STATE B) PUMP_ON_STATE C) PUMP_ALARM_STATE D) COUNTER_TH
42. In PROG4 lines 20, 21 the <EXPR2> should be
A) PUMP_OFF_STATE B) PUMP_ON_STATE C) PUMP_ALARM_STATE D) COUNTER_TH
43. In PROG4 line 27 the <EXPR3> should be
A) PUMP_OFF_STATE B) PUMP_ON_STATE C) PUMP_ALARM_STATE D) COUNTER_TH
44. In PROG4 line 30 the <EXPR4> should be
A) PUMP_OFF_STATE B) PUMP_ON_STATE C) PUMP_ALARM_STATE D) COUNTER_TH
45. In PROG4 line 33 <V2>, <V3>, <V4> should be
A) 0,0,1 B) 0,0,0 C) 1,0,0 D) 0,1,1
46. In PROG4 line 36 <V5>, <V6>, <V7> should be
A) 0,0,1 B) 1,0,1 C) 1,0,0 D) 0,1,1
47. In PROG4 line 40 <V8>, <V9>, <V10> should be
A) 0,1,0 B) 1,0,1 C) 1,0,0 D) 0,1,1
48. In PROG4 line 37 the <V11> should be
A) 2000 B) 1000 C) 3000 D) 6000
49. In PROG4 line 41 the <V12> should be
A) 2000 B) 1000 C) 3000 D) 6000
50. In PROG4 lines 48, 49 the <EXPR5> should be
A) LOW B) CHANGE C) FALLING D) RISING

END of Exam

Examination Committee Exam Date: 9st of June, 2023


Dr. Ahmed M. Zaki.

MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A - MODEL A

You might also like