LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enqueue Process is delayed and struck

Hi team ,

 

I am using Queued message handler architecture Using one Producer loop and using one consumer loop .

 

Automation was like a when a user clicks on start button , one set of sequence of test case was run and completed after that again user  will click on start button to load same set of sequence for UUT testing .

 

During the first time there was no delay or struck when running the code . for the next time when i click on start button it takes nearly 20 - 30 seconds for next sequence load and run . what will be the issue ? weird

 

I probed and find that enqueue had a issue and there is no issue with dequeue .

 

what should be the process rate ? timeout for both enqueue and dequeue

please find attachment of enqueue and dequeue vi's

Download All
0 Kudos
Message 1 of 5
(1,237 Views)

Hi Mrtechie,

 


@Mrtechie wrote:

During the first time there was no delay or struck when running the code . for the next time when i click on start button it takes nearly 20 - 30 seconds for next sequence load and run . what will be the issue ?


The problem is in the VI(s) where you call those En-/Dequeue subVIs.

Unfortunately you didn't attach them as well…

 


@Mrtechie wrote:

I probed and find that enqueue had a issue and there is no issue with dequeue .


Why do you think so? Which "issue" did you notice?

Btw. I think your Dequeue also has a problem: it only dequeues when a certain condition is met (equal to "loop"). What's the point of that? Does the first queue element ever change when the condition is NOT fulfilled?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(1,226 Views)

@GerdW wrote:

 

 


@Mrtechie wrote:

I probed and find that enqueue had a issue and there is no issue with dequeue .


Why do you think so? Which "issue" did you notice?

Btw. I think your Dequeue also has a problem: it only dequeues when a certain condition is met (equal to "loop"). What's the point of that? Does the first queue element ever change when the condition is NOT fulfilled?


Shouldn't the enqueued element where the condition is met (equal to "loop") contain the desired data (string "event" & variant "Data"), so you shouldn't dequeue another element rather return the very element which met the condition?

Greets, Dave
0 Kudos
Message 3 of 5
(1,205 Views)
Spoiler
Btw. I think your Dequeue also has a problem: it only dequeues when a certain condition is met (equal to "loop"). What's the point of that? Does the first queue element ever change when the condition is NOT fulfilled?

hi gerdw ,

 

Initially i used 2 consumer loops . but after that i removed that consumer loop . so only i mentioned only one producer and one consumer loop and no conditions are set and doesn't change  . condition will be always satisfied . i checked .

 

i guess process rate ( timeout ) need to changed for enqueue and dequeue . what should be a ideal one . please advise

 

shall i add more delay ( timeout in ms) in enqueue ? .

 

In Producer loop  i enqueued set of testcases when user clicks on start button

 

Based on results of UUT , In consumer loop also i enqueued set of test cases based on the determination of UUT behaviour .

 

 

0 Kudos
Message 4 of 5
(1,198 Views)

Hi Dave,

 


@daveTW wrote:


Shouldn't the enqueued element where the condition is met (equal to "loop") contain the desired data (string "event" & variant "Data"), so you shouldn't dequeue another element rather return the very element which met the condition?


The first operation uses QueuePreview so you still need to dequeue afterwards. This whole VI is "interesting"…

 


@MrTechie wrote:


guess process rate ( timeout ) need to changed for enqueue and dequeue . what should be a ideal one . please advise

 

shall i add more delay ( timeout in ms) in enqueue ? .


Why do you want to add timeouts? This way you will not dequeue the desired elements faster from your queue.

Again I ask for the mainVI as it is important to detect the problems with your en-/dequeuing…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(1,188 Views)