07-29-2018 11:02 PM
Hi,
I have one queue and need to execute the following:
(a) One vi displays data from the queue by using dequeue function.
(b) Another vi parallely needs to save this data in a text file from the queue.
These two vi s are called as subvi s.
When (a) executes,that data will not be available in the queue and so (b) cannot save that data in a textfile since it is not available in the queue.
Please give the solution
07-29-2018 11:30 PM - edited 07-29-2018 11:31 PM
You can enqueue the data again after (a) executes so that it will not be lost.
Im thinking of something like this:
(1) Enqueue data.
(2) Dequeue your data on the vi displaying your data.
(3) Re-enqueue your data on that same display vi.
(4) Dequeue the data on the vi that logs the data
07-30-2018 01:06 AM
07-30-2018 01:19 AM
You can simply put the same data into two queues.
One for display, one for logging.
steve
07-30-2018 06:47 AM
I will give you two options.
1. Use a separate queue for each function.
2. Use User Events. In this case, each subVI would use an Event Structure and register for the User Event. But both would get all of the data.
Since you are already half way there, I would go with #1.
07-30-2018 09:30 AM
I suggest using a Channel Writer (Event Messenger type).
07-31-2018 12:18 PM
Why not save and display the data in one sub-vi?
Without seeing your code it seems silly to add a whole 'nother queue for this.