LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a vi with *optional* queue refnum?

I'm trying to make a (sub)vi that accepts either a queue refnum that the user supplies, or will obtain the queue itself using a default queue name.  (Want to do that to limit the amount of wires in my program)
 
So, I'm first using the Get Queue Status to check wether the queue refnum is valid.  If so, then I use that refnum.  If not (error code = -1),  I use the Obtain Queue with a string & datatype to get the queue reference.  However, I can't put both queue references to the case output...  Labview says that the types don't match.    Presumably because Obtain Queue has knowledge about the queue contents; its wire is colored differently....    But how do I solve this?
 
vi is attached.
0 Kudos
Message 1 of 2
(2,791 Views)

Never mind.... I found the solution.   Simply had to make a control using the output from the Obtain queue, instead of creating one from the Status vi's...   

Argghh!  It's so simple...   Why did I only figure this out 10 minutes after I posted a question about it?  I had been looking at this the whole morning!    Smiley Sad

Message 2 of 2
(2,787 Views)