The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Case Structure - State Machines

SercoSteveB
Active Participant

The following shows a State Machine VI followed by ALL of the Case Structure frames within the state machine.  What is the value of Numeric Value Out following execution of the VI?:

Question 85 State Mach.png

All of the hidden frames of the Case Structure from the question are shown below:

State Machine 2.bmp

a) 10

b) 12

c) 14

d) 16

Comments
Eddie_Rickey
Member

c.14. I think since there is no State 3, the structure executed is the default.

BenoitP.
Member

=> In while loop

1 iteration : enter in case : "State 1" // 0+1 // F // Next state : State 5

2 iteration : enter in case : "State 5" // 1+3 // F // Next state : State 3
3 iteration : enter in case : "Default" (because, "State 3" doesn't exist) // 4+6 // F // Next state : State 4

4 iteration : enter in case : "State 4" // 10+4 // T // Next state : State 2

=> Out while loop with Numeric Value Out = 14

(Answer c)

@gnshmrthy yeah sure ! I corrected it in my explanation. Thks

mini09
Active Participant

yeah i with Eddie and Benoit the ans is 14.

@benoit the last state executed is state 4 i suppose, if it`s state 2 the program should be aborted.

dharmendra
Member

Answer : C) 14

I am with gnshmrthy & Benoit.

Thanks gnshmrthy for your hints.

mini09
Active Participant

@dharmendra the enum constant is State 1 so initialy the state i is performed so please do check that.

SercoSteveB
Active Participant

Nice one guys.  I am going to stop officially answering the posted questions, unless the concensus is wrong.

mini09
Active Participant

Steve Please i don agree with this your comment at last the answer is nedded here because the members new to the blog may have trouble in finalizing and your comment will help them to finalise and understand the concepts of the program.

SercoSteveB
Active Participant

Answer: C.  Nice one guys.  Good explanantion from BenoitP.

mini09
Active Participant

Thanks Steve consideraring my thoughts...

ashwinilele
Member

Ans is 14