07-24-2008 04:36 PM
07-24-2008 04:44 PM - edited 07-24-2008 04:44 PM
You do have a race condition. The reading of the global variable is not dependent on anything, so it could happen right away even before the subVI that would be puts a value in that global variable executes.
You would need at least 1 frame of a sequence structure where a wire coming out of the sub VI passes through the frame that the global read occurs. If you take your picture and turn the oval you true into a frame, and pass one of the pink wires nearby through the frame (since those are dependent on the completion of the subVI), it will do what you want.
07-24-2008 05:17 PM - edited 07-24-2008 05:22 PM
07-24-2008 09:24 PM
That's the only way I know of. I don't think a single frame sequence in this case looks bad.
One other way to do it is if you were using a shared variable rather than a global variable. Shared variables have an error in and error out on their block diagram icon that would allow you to use the error cluster through it to enforce data flow. However you need LV 8.0 or above to use them. I don't remember which version of LV you are using from your other posts. And I can't remember which version of LabVIEW had the error cluster going from a pink wire to the yellow/gold/green wire.
07-24-2008 10:04 PM
krispiekream wrote:
so that would be the only way to do it?
07-25-2008 02:19 AM
07-25-2008 12:22 PM
07-25-2008 12:31 PM
07-25-2008 01:07 PM - edited 07-25-2008 01:09 PM
krispiekream wrote:
- i dont think i understand what you mean by this "The comparison palette contains a primitive to check for "empty string/path?". No need for the equal and the empty path constant."
- also, can you show me what you mean by this "Instead of the concatenations of all these six strings, you could use a simple format into string with two DBL inputs and a format specifier that contains all the strings and delimiters.
Always pick the alternative with less code. 😄
07-25-2008 01:22 PM