From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

missed dynamic events

Hi,
 
Im trying to use Dynamic Events to pass commands from one VI to another.  The Command eventually controls
a spectrum analyser. 
 
I have transmit Events (events to send to the analyser) and receive events (events received from the analyser).
 
The problem is in the transmit event.  Its Generate User Event is in a loop that runs every 100ms in the GUI, the Event Structure is in a loop that runs every 10ms
in the TX vi.  Ive initialised the events and refrences in another (init) VI and pass these to the TX, RX and GUI VI's.  
 
I see aprox 1 in 9 of the Generated events in the Event Structure.  I've got no idea why i dont see every one, can
anyone shed any light ?  Thanks.
 
Graham 
0 Kudos
Message 1 of 5
(2,398 Views)
Can you attach 2 simple VIs that show the issue so we can look at it?
0 Kudos
Message 2 of 5
(2,391 Views)

Evan,

I've zipped the project, the top level is runtime.vi

Many thanks

 

Graham

0 Kudos
Message 3 of 5
(2,382 Views)

Ok I have good news and bad news.  I couldn't run your stuff but that is no problem.  Take a look at the simple examples I created.  Hit the go button and notice the string.  Notice that it switches between the loops.

Basically you registered the user event 1 time.  Then you asked multiple event structures to watch the same event.  So every now and then the wrong loop gets the event.  Your code is the same as my top2 where I have to loops and 2 event structures.

So due to dataflow you can't tell who will execute when.  Try to run your code and see if the times that you "miss" the event, it didn't actually get picked up by the other VI.

0 Kudos
Message 4 of 5
(2,372 Views)

Evan,

Do you think this is the wrong way to approach the task, would the queue be better ? or have two user events (i thought i'd set up two 😞  )

and Yes the target vi is missing the event, where else is it getting looked at ?

 

Thanks

 

Graham

0 Kudos
Message 5 of 5
(2,361 Views)