12-08-2011 06:49 PM
Okay, this one's driving me nuts. I have a subvi that contains a String Indicator and a Combo Box, along with a few buttons on the Front Panel. My problem is that when I run the program (in LabVIEW, not an exe) sometimes the Question Window (the indicator) accepts the string and updates the Caption.Text property, sometimes it doesn't. At the same time, sometimes the Answer Box (the Combo Box) accepts the cluster array into it's StringsAndValues property, sometimes it doesn't. They both either work, or they don't. Never a problem with the Question Window indicator accepting the string.
The Block Diagram:
Here's an example of the code feeding the subvi.
I don't get any kind of error message.
Probes at the input of the offending property nodes indicate that the correct data is getting to them, it's just being "ignored". Once it starts messing up, it usually continues to do it.
It appears that the only way I can get it to behave correctly is to exit LabVIEW, then restart LabVIEW and run the vi. Then it will usually runs correctly a few times before it starts acting up.
(Win 7, LabVIEW 9.0f3)
Thoughts?
thx
Solved! Go to Solution.
12-08-2011 07:12 PM
Can you attach the actual VIs with some reasonable default data?
Why is there a coercion dot at the subVI input?
12-08-2011 11:09 PM
What is the source of the error wire that goes into your Q&A subVI? Is it possible you are getting errors on that wire?
If there is an error, then those property nodes won't execute.
12-09-2011 01:51 AM
Ravens beat me to it, if you get an error in the property nodes wont execute.
/Y
12-09-2011 02:45 AM - edited 12-09-2011 02:46 AM
I agreee, this is definitely the most likely scenario, even though he said: "I don't get any kind of error message.". 😉
Are errors actually handled somewhere in the program or are they silently discarded, using the error wire only to determine execution order?
12-09-2011 08:22 PM
Thanks, I found the problem with ya'lls help, and learned a few things, too.
To follow up on the questions:
I was indeed using the Error In/Out for order of execution only, "silently discarding" them to the Error Ether. I temporarily tossed an error indicator on the front panel and, once I got it to fail, fairly quickly figured it out. So, I was overstating it when I said I wasn't getting any errors. Thank you for ignoring that bit of blissful ignorance.
The root cause was feeding an existing file name to the Open/Create/Replace File vi located in another (earlier) state. (I thought my fingers were generating random strings.) "create" was wired to the Operation input on that vi, so it generates Error 10 if the file already exists. Changing it to "open or create" eliminates the problem by overwriting the file if it already exists.
Good catch on the coercion dot. It blends into the array wire well enough that I didn't see it. I have a 1-D array of cluster of two strings where it should have been a 1-D array of cluster of a string and a value.
Lessons Learned:
1: Property nodes don't execute with an error in (doh!). I'll never forget that.....
2: Make my error indicator visible in the event of an error.
3: Only God can create a truly random string.
4: Sometimes you have to look really close to see the coercion dots.
thx!