12-01-2010 10:12 PM
Task:
pass variant data in a cluster as a queue data type, i.e., bundle a boolean and a string (the string is converted to a variant). Create two while loops (producer + consumer).
All works fine in the consumer using Variant to Labview data function IF timeout for the dequeue function is -1. Then when data is sent (as a response to a button press in the producer) the data is received and displayed correctly.
However change the timeout of the consumer to say 500ms, then each time timeout occurs Error 91 pops up as shown in the attachment.
I would like to know what I am doing wrong, as it is not completely obvious to me why it works with infinite timeout but not 500 ms timeout.
Solved! Go to Solution.
12-01-2010 10:31 PM
Hi,
When "dequeue" timeouts the function provides a empty cluster as output. When you try to convert a blank to a type of string it throws an error.
Just dont pass the data to the conversion operation when the dequeue tiimeouts.
12-03-2010 09:12 PM
It is a simple enough item to include in the help file. I guess no one has done so because it is so obvious to many, but it remains an undocumented behavior none the less. Thanks for the quick reponse!