The Daily CLAD

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

Re: Control Reference and explicit Property Nodes

SercoSteveB
Active Participant

The Event Strucutre in the question contains; a Timeout Event and a "stop" : Value Change event only.  What is the value of Numeric Value Out following execution of the VI?

ValSgnl.jpg

a) 3

b) 4

c) 5

d) Undefined (the VI does not complete)

Comments
BenoitP.
Member

The event loop could have other events case able to modify the Numeric value Out particularly the timeout case ... So obviously Ans d.

Propriety Node change the value of Boolean Stop with the particular option (Sgnl) ((which generate a value change event associated with the object)).

So we enter in the event structure with 3. Plus 1. The stocked value out is 4.

In parallele, the second propriety Node change the value of the Numeric Value Out to 5.

We go out of the event structure and the Numeric Value Out take the value stocked 4 !

Answer b.

YogeshShivarudrappa
Member

HI, In Stop value change event, writing 5 to Numeric Value Out will result in Numeric Value change event (because of the Value(Signl) property node. So, there are possibilities of changing the value in this event.

Also the tunnel connected to Numeric value out is made "Default if un wired", So, in other events it will be written ZERO.

Since the other event case are not shown, Ans will be d.

Thanks,

Yogesh

StefanoFacchine
Member

Hi everyone,

it is not clear to me why answer D should be the correct one. The event structure does not require all cases to be executed, it might be that only one is triggered and a value would be written on the Numeric Value Out indicator. If we enter in the Stop case than at the end of the case some value must be present on the Numeric Value Out indicator, am I right? Now I would say that the correct answer could be either B or C, depending on which is the last value  written to the indicator..

SercoSteveB
Active Participant

Agreed.  The Event Structure could contain other events.  In this case, I am not sure that those events would make a difference to the answer.  I will modify the question for clarity.

NOTE:  This is an Explicit Property Node question, with some Event Structure and Dataflow elements mixed in.

StefanoFacchine
Member

I would say that the Timeout case does never execute since the Timeout terminal is unwired. Therefore, only the Stop-value change is triggered. The addition node provides a value of 4 at the output tunnel, but this value is made available to the indicator only when all outputs of the event structure are set. This also includes the error cluster coming from the property node, that is therefore executed before exiting the event case. So, initially a value of 5 is written to the indicator, but then when the case is completed this value is overwritten by the result of the addition node, and the indicator displays a value of 4.

I go with answer B

YogeshShivarudrappa
Member

Nice explaination StefanoFacchinetti

I go with the ans B

BenoitP.
Member

I am not sure that those events would make a difference to the answer

Create this event : "Numeric Value Out" : Value change in the event structure and you will see :] !

You right ! (if you run the vi just one time and not continuously). Mea culpa !

SercoSteveB
Active Participant

Hi BenoitP.. Not sure I understand what you mean, please explain. 

Adding a "Numeric Value Out" : Value Change event into the Event Structure does not change the answer.  Have you tried it, and seen different behaviour?

dfjuggler
Member

I think that, without user interaction, answer D is correct.

The Val(Sgnl) done on stop would flag an event that would be acted upon by all event structures that were listening at that time to that event. Due to data flow, the event structure will only start listening until that Val(Sgnl) operation has finished (so this event will not be catched).

Once the programm has arrived at the event structure, it will stay there until one of the events it listens to takes place. If the user presses the stop button, this will generate the event that will enable the flow to continue. In that case, I agree with Stefano's explanation.

Nice one, Steve!

mini09
Active Participant

need to create a program on my own with the conditions given. is there any group?

How to make bool strict in the above program?

mini09
Active Participant

Great explanation friends... the ans is 4. I have a queries we change the valu sgnl to 5 but there is no change in the output y so?

RobCole
Active Participant

These questions are a bit irksome. If "following execution of the VI", means that you have pressed the Run button, and done nothing else, the answer is D as Raul says.

If "following execution of the VI" means after the VI has stopped (user would have to hit the Stop button), then the answer is B.

Questions written this way are too ambiguous to be useful for testing a person's LabVIEW knowledge. Better written questions would be more worth NI's while.

     Rob

SercoSteveB
Active Participant

Hi Robert and welcome to 'The Daily CLAD'.  Thanks for your comments. However; as you seem to be the only person struggling with the wording of the questions, I am going to stick with the current style. 

FYI "following execution of the VI" means press the run button only.  If further operator action is required, I attempt to include that action in the question.

Regards

Steve

SercoSteveB
Active Participant

Answer: B  Nice one BenoitP, StefanoFacchinetti, YogeshShivarudrappa and RobertCole.  Nice explanation BenoitP and StefanoFacchinetti.

As suggested in an earlier post this question has an element of dataflow about it.   The Val(Sgnl) property node causes the  Stop : "Val Changed" event to fire, which updates the value of Numeric Value Out to 5 (via the proerty node).  Following completion of the event the value of Numeric Value Out is overwritten from 5 to 4 by the value coming out of the standard tunnel.

john111
Member

So let's say we won't have any property nodes here. But we will have a local variable inside a event structure...which was writing to numeric value out...So it execute before increment node...so property node is some kind of a local variable..just it can not only change the value but also other properties...??