crelf Posted March 1, 2008 Report Share Posted March 1, 2008 QUOTE(neB @ Feb 29 2008, 02:54 PM) Some of us have obviously watched too many diagrams run in execution highlighting mode. yep - spent many a midnight hour defocussing over execution highlighting QUOTE(neB @ Feb 29 2008, 02:54 PM) Another pattern I noticed is that if more than one "flow" has their inputs available, the thread that was dropped on the diagram first will be executed first. That's something I noticed years ago too - I'm not sure if it's still the case(?) Quote Link to comment
Justin Goeres Posted March 1, 2008 Report Share Posted March 1, 2008 QUOTE(PaulG. @ Feb 29 2008, 09:25 AM) The "correct" answer is not necessarily the answer you think is right, but the answer NI wants to hear. A friend of mine recently took the CLAD exam, and there's a question floating around on it that has to do with when a For Loop will stop executing. One of the (supposedly wrong) answers is something to the effect of "when the value at its Stop terminal is true." Of course, starting with LabVIEW 8.5 that's a perfectly correct answer. So now the (multiple-choice, computer-based) test has two choices that are correct. :headbang: I was relating that story to my wife the other day, and she said, "Why doesn't NI get the community involved in writing/revising the exam questions?" Quote Link to comment
crelf Posted March 1, 2008 Report Share Posted March 1, 2008 QUOTE(Justin Goeres @ Feb 29 2008, 03:06 PM) I was relating that story to my wife the other day, and she said, "Why doesn't NI get the community involved in writing/revising the exam questions?" That confirms another engineering law: always listen to your missus. Quote Link to comment
Daklu Posted March 4, 2008 Report Share Posted March 4, 2008 Makes me wonder about the "seasoned" programmers the OP mentioned--especially the one who insisted NI's answer was wrong. Moral of the story: When in doubt, ask LavaG. Quote Link to comment
crelf Posted March 5, 2008 Report Share Posted March 5, 2008 QUOTE(Daklu @ Mar 3 2008, 06:10 PM) Makes me wonder about the "seasoned" programmers the OP mentioned--especially the one who insisted NI's answer was wrong. Hey - I was in the group who got it "wrong" by trying to think outside the box, and I think that my reasoning was justified: if I was concerned about dataflow, then I would never have programmed it like this. Just because you answer a question the way your examiner expects, doesn't mean that you're technically correct (my high school finals English exam is a case in point: Abagail Williams wasn't evil, she was a young girl frightened by the societal pressures on her natural urges...) Quote Link to comment
richlega Posted March 5, 2008 Author Report Share Posted March 5, 2008 Not that I consider the matter closed... discussion is always good. I want to thank the LavaG people who responded to the original question. The level of knowledge here is amazing, almost as great as my lack of understanding. (but I am still learning ) Quote Link to comment
Aristos Queue Posted March 5, 2008 Report Share Posted March 5, 2008 QUOTE(neB @ Feb 29 2008, 01:54 PM) Another pattern I noticed is that if more than one "flow" has their inputs available, the thread that was dropped on the diagram first will be executed first. Only a probability, not a certainty. The first dropped node is on the node list first, so whenever the LV compiler doesn't care about the order, that one will tend to go first. But... a) If you have a multi-core machine, this is substantially less likely to occur because the first node may go to one processor and the second node may go to the second processor and it depends on which processor gets around to handling the node first. That's OS and hardware dependent. b) The LV compiler may care about the order and explicitly schedule them in reverse. c) Turning on execution highlighting tends to smooth out parallelism so that things are easier to watch. Using single stepping obviously forces serialization of node execution even when the nodes would normally be parallel. QUOTE(PaulG. @ Feb 29 2008, 10:25 AM) Some of us seem to have forgotten the (unwritten) First Rule of NI Tests and Certifications: The "correct" answer is not necessarily the answer you think is right, but the answer NI wants to hear. And, as a result of this conversation, there's now a discussion internally about what answer we want to hear. The wording of this question may get some adjustment. :-) Quote Link to comment
crelf Posted March 5, 2008 Report Share Posted March 5, 2008 QUOTE(Aristos Queue @ Mar 4 2008, 12:28 PM) And, as a result of this conversation, there's now a discussion internally about what answer we want to hear. The wording of this question may get some adjustment. :-) :thumbup: Quote Link to comment
jaegen Posted March 6, 2008 Report Share Posted March 6, 2008 QUOTE(crelf @ Feb 29 2008, 11:39 AM) So, in summary, the order that the inputs of a VIs are satisfied is not necessarily the order in which those VIs are executed. This is pretty clear when using execution highlighting - sometimes LabVIEW likes to "finish a flow" before it goes back to others that are waiting mid-flow This brings up a small question I've always been a bit uneasy about: Within a given VI, does execution highlighting show us exactly what order things will run in once execution highlighting is turned off? (Assuming there are no other parallel threads running outside of the VI I'm watching). Jaegen Quote Link to comment
Aristos Queue Posted March 6, 2008 Report Share Posted March 6, 2008 QUOTE(jaegen @ Mar 5 2008, 05:00 PM) Within a given VI, does execution highlighting show us exactly what order things will run in once execution highlighting is turned off? (Assuming there are no other parallel threads running outside of the VI I'm watching). No. It shows you one possible order. Remember that the order that parallel nodes execute in can be different every time that section of code executes. There are parallel threads *within* the VI and those threads go in whatever order they want to proceed. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.