Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 67075

Event Structure Weirdness

$
0
0

Last night, Seve posted an interesting question on his blog (The Daily CLAD).

 

In short, we create a dynamic event, register it, and generate two events with the data being 1 and 2.  We then start an event structure that is registerd to the dynamic event.  Inside of the event case is another event structure that is also registered to the dynamic event inside of a FOR loop set to run twice.  The data from the event was autoindexed and went straight to the final output.  Now logic would state that the output should be {1,2}.  But when I run it, I get {1,1}.  I thought that was really strange.  So of course I had to play.

 

I changed the FOR loop to run 3 times.  Oh, it sits there and waits for another event.  So it is seeing two events, as it should.  It is just that the data for the second event isn't passed properly.

 

But let's play some more.  I put another FOR loop around the outer event structure and made it run twice.  It doesn't see the second event at all (ie, sits there and waits for another event on the second iteration).  Why not?  It is registered for it?  It saw the first event?  Why shouldn't it have the second event in its queue?

 

Now if I remove the inner FOR loop and leave my outer FOR loop, everything works perfectly as I would expect.

 

Now it gets even weirder.  I added a button and the Value Change for that button to my outer event structure (both event structures with FOR loops to iterate twice).  The outer event structure is also ignoring my button's value change event.

 

NI, what the #*$&@* is happening here?


Viewing all articles
Browse latest Browse all 67075

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>