LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Input parameter invalid at enqueue element

Hello,

 

I am running a program that was created on an earlier edition of LabVIEW by someone else. I am using LabVIEW 2015 and am still fairly new to LabVIEW. This vi is used to graph voltages from a Agilent 34401A multimeter along with much more. It was originally made for 6 Agilents but because I am only running one I have slightly changed the code. When it is ran I receive an error at the enqueue element that an input parameter is invalid. I have attached the code and error box.   

Download All
0 Kudos
Message 1 of 6
(2,836 Views)

What VI is calling this subVI?

 

The queue reference control is connected to the front panel.  So you must have a main VI that obtains the queue reference and passes it to this subVI.

Do you?

0 Kudos
Message 2 of 6
(2,823 Views)

Yes I do. I have attached it. I am trying to dissect this code to be able to run the Agilent off of the Run Agilent more independently and incorporate into my newer programs. Please let me know if this makes sense and thank you for your help!

0 Kudos
Message 3 of 6
(2,818 Views)

In that VI, I found a Run Agilent.vi, not a Run Agilent W Error.vi.  I'm going to assume they are essentially the same VI  (panels look the same) and you renamed one for posting.  I do see where you obtain the queue reference and pass it into this subVI, and to one other part of your code that dequeues.  My first thought was that perhaps you has a case structure or event structure somewhere that had the reference wire passing through, and you failed to wire all the tunnels, so it was defaulting to the value of 0 rather than a valid reference.  I don't see that, but it may still be possible in one of your other subVI's.

 

I suggest putting probes on your reference wires and error wires.  See if you can detect when and where the error is first occurring or where a queue reference maybe zero rather than a valid reference.

0 Kudos
Message 4 of 6
(2,811 Views)

It appears that you obtain the Queue once, pass the ref to the queue into the Agilent sub.vi and then destroy the queue ref in the sub.vi every time it is called.  Of course this means that the queue is destroyed since the only ref to the queue is destroyed (It's been a really long time since 6.i, it might have worked a bit different before AQ came along and fixed queues)

 

Replace the Flush Queue with Destroy Queue in the caller and remove it from the sub.vi

 

I really am stumped by the dequeue element with a 100mS timeout and a wait 100mS in the same loop- it makes no sense.

 

There are a lot of other unusual constructs in that code.  very hard to make recommendations without the full project (and, its not in a project is it?)


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 6
(2,794 Views)

Jeff nailed it.  I completely missed the destroy queue in the subVI.  That would do it.  Create a reference, use it once.  Destroy it.  It is no longer valid for anyone to use it again.

0 Kudos
Message 6 of 6
(2,760 Views)