08-23-2019 10:17 AM - edited 08-23-2019 10:20 AM
Hi all,
I am having an issue with a queue, I am pretty sure it is a simple solution but I am just not seeing it, so I though I need more eyes to check it.
I am using a Queued Message Architecture and I used a separate parallel loop to keep track of the time the program takes to run one part in my equipment. So I have a queue to keep track of my time and one to update my program UI. In this loop I am just waiting for one second and then updating the UI to reflect the amount of seconds that have passed.
The weird thing is that the first time that the loop executes it does it correctly and my main VI with the UI recieves the message and updates the 0 in the UI, but for all subsequent executions of the same state in the program if I use debug or probes I can see that the enqueue function is being executed, and no error is being generated, but the update time message never makes it to the main application after the first one.
Note: I should also point out that this specific UI queue is being used by other queues with no problem, this Loop seems to be the only one having this issue.
Thanks!
Solved! Go to Solution.
08-23-2019 10:31 AM
No one is going to be able to debug this without more information or seeing the rest of your code. Who knows why you aren't seeing it - it could be that queue is getting overflowed with other messages, it could be you aren't ever calling dequeue again, etc.
08-23-2019 11:13 AM
@cesquivelf23 wrote:Note: I should also point out that this specific UI queue is being used by other queues with no problem, this Loop seems to be the only one having this issue.
As has been said, we don't have sufficient information to debug anything, but your sentence above is curious. What does "used" mean? If you also read the queue in other places, the element is removed there. What's the name of your queue functions? Are they from a toolkit? How do they differ from the stuff in the plain queue palette? What's the function of the blue (coerced) input?
08-23-2019 11:13 AM
The weird thing is that the first time that the loop executes it does it correctly and my main VI with the UI recieves the message and updates the 0 in the UI
Go back and check the UI Queue code. As shown by your code, the first time the loop executes the value at Probe 1 should be a 1.
08-23-2019 11:30 AM - edited 08-23-2019 11:31 AM
@paul.r wrote:
it could be that queue is getting overflowed with other messages, it could be you aren't ever calling dequeue again, etc.
Thanks!
That is what I needed, more ideas in what could be happening. You were right! The queue was getting overflowed with other messages.
When I start the timing in a different function at the same time I start a camera so I request reading of each frame, the problem is that I made a mistake and was requesting each frame in one loop and using the function to get it in a different one, so the queue was filling with request for frames, but the camera is obviously not as fast.
So the first time it worked because the queue was not filled up, but later it was not that it was not working but only that there were so many requests for the camera that the updates in time were delayed.
Thank you very much!
08-23-2019 11:32 AM
@altenbach wrote:
@cesquivelf23 wrote:Note: I should also point out that this specific UI queue is being used by other queues with no problem, this Loop seems to be the only one having this issue.
As has been said, we don't have sufficient information to debug anything, but your sentence above is curious. What does "used" mean? If you also read the queue in other places, the element is removed there. What's the name of your queue functions? Are they from a toolkit? How do they differ from the stuff in the plain queue palette? What's the function of the blue (coerced) input?
Looks like the queue library from the QSM template project.