09-28-2017 12:14 PM
I am using LabVIEW 15. I am trying to make a priority-based queue. The program organizes the elements in the correct way. However, the build array function seems to just send everything at once to the Dequeued Elements array. I can't figure out how to send each elements individually. The "processes" will have a completion time so having the elements being sent to the dequeued array at the same time is not ideal. I have been working on this for about 8 hours now over the course of three days. Also, the cluster has a process's name, priority, completion time(working), and a block option(This will be next).Thank you very much for taking the time to read this message. If there is any advice you can give me then I would appreciate it.
09-28-2017 12:30 PM
Well your example code doesn't include any of the PriorityQueue.lvclass members so we can't run it, but I am pretty sure the problem is that the "Dequeued Elements" indicator needs to be moved inside the While loop. Dataflow means that until the While loop terminates, no wires coming from the loop update their value.
09-28-2017 01:04 PM
You also need to make sure at least 1 element that you are enqueueing has the Stop condition set to TRUE. Otherwise, that second loop will never stop. This is my guess for why you are not seeing your data after the loop (the loop never stopped).