10-11-2018 10:06 PM
Dequeue function for string is not executed upon troubleshooting. Why is that?
I've connected the same reference. please see the pictures below
Solved! Go to Solution.
10-11-2018 10:45 PM - edited 10-11-2018 10:48 PM
It would help to see the actual vi, but things look very constipated. The lower string indicator will only update if the string queue receives an element, AND the Boolean queue receives a TRUE, AND the enum is "acquisition" (or default) AND the event structure times out (which can never happen because no timeout value seems to be wired). Will probably never happen overall and the string never updates. In fact I believe you code is not even runnable unless there are hidden objects.
The lower loop requires both queues to fire to even proceed to the first case structure.
Start with a few tutorials and look at the guidelines for event structures. They should never be hidden inside deep stacks of structures.
(Sorry, posting by phone, might have missed a few subtle details)
10-11-2018 11:39 PM
Actually, there is a data from the VISA read function and entering the Enqueue function. However, I've tried to place the string indicator outside of the case structures and event structure and yet the Dequeue function, upon placing a probe, indicates "Not Executed"
10-11-2018 11:53 PM
Attaching the Problematic VI Will actually helps others to understand your problem and can give you solution to
the best of their knowledge.
10-11-2018 11:56 PM - edited 10-11-2018 11:59 PM
Please see the attached VI. Note that it is not yet complete.
10-12-2018 01:31 AM
Your problem might rely in the get byte at serial port.
How can you be sure that you are not getting fragmented data?
Read till get 0 byte with a delay of at least 10ms between loop. then all the data from a shift register will ensure that you have all data.
Benoit
10-12-2018 01:50 AM
Yes, I'm sure about the data I get. It can be seen through the probe window
10-12-2018 02:25 AM
First the Architecture Needs to be reframed
The Problem is you have two Queue, One for Login Details and other for Serial data Transfer, Login Works Only Once But it waits in Dequeue indefinitely state as you haven't given Timeout, so even Data Queue is also waiting along with Login Queue.
10-12-2018 02:28 AM - edited 10-12-2018 02:30 AM
Hi PJason,
It can be seen through the probe window
Did you also check which data is written into your string queue?
On your VI:
The whole "middle" loop (the VISARead part) can be simplfied to just 2 (two!) cases:
- Why do you need 20+ cases, when they all do the very same? (Their only difference was that "tag", but that again is the same as the case selector value…)
- Why do you need that BuidlArray in every case? Place it before the case structure!
Edit: remove that wait from the loop, it's not needed anymore!
How did you make sure you received exactly those tag values (nothing more, nothing less) within 500ms?
10-12-2018 03:04 AM
So what can you suggest with the architecture? I'm really confused on the architecture itself so I've tried different ways but it has similar problem.