‎10-14-2009 07:54 AM
Hi all,
We have an architecture where multiple VIs will be running simultaneously and have some common controls. The value change in a VI has to be reflected in other VIs too. So we decided to generate an user event with the corresponding case and value. About 70% of the times this works correctly i.e. if there are 3 VIs configured for this user event, all 3 VIs respond about 70% times. The remaining 30% of the time just a single VI responds. What could be the problem?
Thanks,
Priyadarsini
Solved! Go to Solution.
‎10-14-2009 08:00 AM
‎10-14-2009 08:07 AM
Do you have a unique Event Registration Refnum for each VI?
Felix
‎10-14-2009 08:09 AM
F. Schubert wrote:Do you have a unique Event Registration Refnum for each VI?
Felix
For a better understanding of Felix' answer have a look here.
Ton
‎10-14-2009 08:11 AM
Thanks for your reply. But if we register separately in each VI the refnums turn out to be different and the VIs are no more synchronized. Could you post a sample code to get better understanding?
‎10-14-2009 08:14 AM - edited ‎10-14-2009 08:16 AM
They should get the event with the same time stamp.
Ton
‎10-14-2009 08:51 AM
‎10-14-2009 08:58 AM
Or use one event and use another architecture such as quees to handle the event reading ???
Maybey 🙂
‎10-15-2009 12:54 AM
Thanks everybody for your response. Having an unique Event Registration Refnum for each event structure solved the problem. But here we have to note that the User Events refnum and other controls refnum used for this registration are the same for all the VIs. Just the registration refnum varies.
Thanks once again.
Priyadarsini
‎08-25-2011 01:29 PM
Platform = LabVIEW2011 Win7 64BIT
Topic = Using Dynamic Events
..
Question = When I create an event, and wire that same event to 4 separate "register for event" expandable pull down VIs, then wire each registered dynamic event to its own event structure and send a dynamic event, can I expect all 4 of those event structures respond?
..
Actual behavior = The first two responded perfectly, when adding a third event structure to recieve the same event within its own register of events, one of the other previous two event structures fails to respond.
..
Purpose = Provide a shell program as simple as possible, but not simpler, to ease the creation and use of cooperative parallel tasks in LabVIEW, without the clutter wires to the left and right of the block diagram. The asynchronous parallel tasks are subVI on the block diagram of the main VI to start simple.
..
Background = I have created all the events and registered them all in a "creator" style VI. The output is a single cluster with 6 created events and 5 registrations made from groupings of them. I also have a "destroyer" style VI which takes the same cluster and unregisters then destroys the events. Between the creator and destroyer I have my main program which is a JKI state machine. This main program sends out a single dynamic command event. All four of the other parallel tasks are supposed to respond when commanded to initialize or shutdown various functions. These functions are generic such as init hardware, close hardware, pause, resume, and exit. The four parallel tasks are DI, DO, AI, and AO for my program. I want to make a generic shell program that allows adding various hardware asynchronously under the control of a main program. In the past I have done this with Notifyers and Queues mostly. I heard that events are supposed to work like a notify at the sender because it broadcasts, while the event structures provide their own queues, if that is true, and it works well, is efficient, and not too many events are used at once, then it will make a good generic structure for many uses. After this program works I will add more types of asynchronous tasks for communication protocols etc..
..