I am using a Global variable to transfer data from one VI to other. In one VI, I am writing to the global variable contineously.
And in the second VI, I am reading this global variable and writing it in a text file. Both the processes ( writing to and reading from GV) occur simultaneously. I have tested the software for 24 hours and I had no problems like race condition.
My question is, I have to run this software non-stop for 180 days for permanant monitoring and logging.
I want to know if the Global variable approach is reliable in my case?
Pet peeve of mine.
I inherited a VI much like what you are describing. It somehow worked on a test system for many many years. Then there was a computer upgrade and suddenly only 1/4 of the data was logged. Race conditions.
Luckily, I was already changing that VI to use Queues and then it worked perfectly and didn't burn up the CPU nearly as much.
Look into the Producer/Consumer. That is what you really need to do.
I have never used producer/consumer loop. I have looked into the producer/consumer example but it was to transfer data between two
different loops in the same VI.
In my case, I have two different VI's (not SubVI). Could you please give me an example of how to do it using producer/consumer loop
for two different VI's ?
I would appreciate if you could help me.
Thanks in advance.
You just need to pass the queue reference into your two VIs.