02-28-2017 01:49 PM
I am converting a program I wrote that worked great for over a year in non-compiled mode. I switched over to LV15 and changed how things were done. Instead of running separate LV vi's and passing the reference to a shared queue to each vi, I am trying to use Timed Structures. My intent is to be able to compile the app ultimately, but that is not being done yet.
Is it possible to share a queue between timed structures? Even when I put them in the same core, it seems to have problems. In one timed structure, I poll the queue status to find out how many elements are in the queue and it gives an error. The other structures have not even written to the queue yet or executed a queue vi yet.
02-28-2017 02:00 PM
Tell us more about "the problem" to help us help you.
Ben
02-28-2017 02:02 PM
Unless you are in an RT system, the Timed Loops are a waste. They add overhead that you do not need and add very little if anything on a Windows System. If your code was working before, why change it? And if you are getting an error, it is likely you have yet to obtain the queue before passing it to your subVIs.
02-28-2017 02:02 PM
I am working on cutting the program down to the bare minimum that still gives the problem. I will post up shortly.
02-28-2017 02:19 PM
I assume you are still working on the same application you were discussing previously (here). Besides the fact that Timed Structures are probably not going to help you (as previously suggested) there is no problem with using a queue reference in multiple timed structures. It will potentially interfere with their execution (since they all have to wait on the same reference) along with any cache misses etc. between cores but you aren't designing a "real-time" application.
I suspect a race condition but will wait till you post the example before any more speculation.