LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dequeue not executed

Solved!
Go to solution

Dequeue function for string is not executed upon troubleshooting. Why is that?

 

I've connected the same reference. please see the pictures below

Download All
0 Kudos
Message 1 of 21
(3,405 Views)

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)

Message 2 of 21
(3,393 Views)

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"

0 Kudos
Message 3 of 21
(3,374 Views)

Attaching the Problematic VI Will actually helps others to understand your problem and can give you solution to

 

the best of their knowledge.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 21
(3,370 Views)

Please see the attached VI. Note that it is not yet complete. 

0 Kudos
Message 5 of 21
(3,368 Views)

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

0 Kudos
Message 6 of 21
(3,349 Views)

Yes, I'm sure about the data I get. It can be seen through the probe window

0 Kudos
Message 7 of 21
(3,345 Views)

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.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 8 of 21
(3,340 Views)

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:

check.png

- 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?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 21
(3,339 Views)

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. 

0 Kudos
Message 10 of 21
(3,333 Views)