CLD-R, practice exam 2 question 11 reads:
As part of shutting down your application, you need to turn off three values by writing false to three variables. Which of the following code segments ensures that the shutdown code executes reliably and all errors are reported?
2 answers out of 4 seems to satisify the requirement:
Answer A is listed as correct. Why?
The only difference between A and D that I spot is that the order in which those shared variables will be written to is undefined in D. However, since it is not specified which "Power" are we shutting down and whether and how the "Power" is related to "System Running" and "Output Enable" one can not make a desiciion that "executes reliably" = "shutting down the <<Power>> last".
Am I missing something obvious?
Its a trick question, maybe the sequence structure ensure the 3 shared variables are all set to false state consequentively by the sequence structure. If there are other writer to the shared variable then at anytime the other shared variable writer may set a variable to True preventing shutdown.
IMHO, it one of those way out there questions.
Every time I see something like this it makes my head explode. I don't care which on you use: A or D. LabVIEW sure as Hell, MI BETTER shut all of them down, reliably. If not then you would be better off throwing LabVIEW out the window as a "data flow" language. Who writes these questions?
I agree that the wording of the question is a little ambiguous, and you're correct in that it does not specifically state that reliable shutdown execution requires shutting down Power last. I believe it's just something that is supposed to be inferred from examining choices A, B, and C (all of which write false values in order from System Running -> Output Enable -> Power).
I got the answer correct right away but also groaned. Maybe this is why I spend too much time on my LabVIEW projects. If the first fails, why proceed with the next two operations? I understand the contrieved example yet it seems like poor practice to put inferior coding practices out there.
As i understood the sequence is playing the role here but why only using sequence loop for it is right choice, when we can control sequence using error wire also.
If there is error in switching off first two why to switch off power..
So in my opinion B should also be right option,
Thanks - HS