04-10-2007 09:20 PM
04-10-2007 09:21 PM
04-10-2007 09:54 PM
04-11-2007 04:28 AM - edited 04-11-2007 04:28 AM
Message Edited by Kevin Price on 04-11-2007 05:29 AM
04-11-2007 07:56 AM - edited 04-11-2007 07:56 AM
Not to pre-empt Kevin but because this is AE week for me and because you are working LV 6.1 I offer this example that may help.
Besides I wanted an an example of a AE that demonstrated self-inititalization using the "First Call" function.
Ben
Message Edited by Ben on 04-11-2007 07:57 AM
04-11-2007 11:38 AM
Thanks all for your suggestions. I was able to combine most of everyone's idea, and also created some test drivers to verify the functionality.
Files are written in LV 8.20. Sorry didn't have time to port over to 6.1.
04-11-2007 03:11 PM
04-11-2007 04:14 PM
@conni wrote:
Cliff, thanks for those examples, I'd add just a few comments:
1) why do you put the data right back into the queue in operation "get" ? this way the data is not locked, or do I miss something ? i think, it should be possible to "get" the data only once (queue is empty afterwards, other callers have to wait) and have to put it back using "set" afterwards.
2) If you make the VI reentrant and always use obtain queue to get the queues refnum, it is possible for one thread to wait in operation "get" endlessly without polling, while one thread is working with the data and can put it back afterwards using "set".
1. My application is to follow a similar Get / Set function. Once a user "set"s the value, repeated "get"s will just pull the data from the queue. It enqueues the data back, so that other parallel running VIs can obtain "get" the value.
2. Yes this is possible. LabView 8.20 has built in examples of this. See the Producer Consumer state machine. Or you could do a NI search in the discussion forum for "queue state machine".
Hope I was able to answer your question. If not perhaps you can post and example.
-crazycliffy
04-15-2007 02:27 PM