LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

QMH - Enqueue Element Error Code 1

Solved!
Go to solution

Hi, I have attached the VI I am having trouble with.

This is a rather simple QMH. It has an EHL and two MHL. When I run the VI in "Highlight Execution" mode no error is produced. However, if I run the VI at the speed it is intended to run at then there is an error produced in my EHL. Please note that I have implemented multiple error clusters so that is is easy to see where the error is coming from.

Hopefully, this is a fairly straightforward issue that I have somehow missed.

 

Any thoughts/suggestions on how to fix this error?

 

P.S. I have simplified this VI greatly from what it used to be - but it still does not work.

0 Kudos
Message 1 of 4
(3,057 Views)
Solution
Accepted by topic author TIW

Hi all, I have fixed my error. 

 

I neglected to place my "STOP" boolean control within my EHL and wire a "True" constant to the 'stop while loop'.

 

Please see the attached file for my fix.

 

Thanks!

0 Kudos
Message 2 of 4
(3,053 Views)

General Comments:

1.  A loop should only be reading from 1 queue.  If one queue does not have any data, it will keep you from processing data from the other queue.  So if one of your producer loops crashes, it will freeze your consumer loop.  The fix is to have 1 queue specific for the consumer loop and the other loops can write to the same queue.

 

2.  Only the loop that reads the queue should close it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 4
(3,032 Views)

Thank you for the feedback my friend.

 

I will definitely make sure I change my code accordingly.

0 Kudos
Message 4 of 4
(3,025 Views)