09-21-2006 10:40 AM
09-21-2006 10:58 AM
Your VI seems to work fine. Enums are stricly typed so your subvi will only be able to work with those as inputs.
David
09-21-2006 11:18 AM
Do you mean it works by itself? It does work by itself for me, too, but I can't seem to use it as a sub VI. Whenever I wire it up to use it, I get wiring conflicts.
Were you able to successfully use this sub VI in another VI? Especially with different dimensioned enums coming in?
Thanks again for any help that can be provided.
09-21-2006 11:31 AM
Its like I said. The subvi will only accept inputs from the caller if the enums are the same datatype. The enum is strictly typed.
Thats why you are getting the wiring conflicts.
David
09-21-2006 11:41 AM
09-21-2006 11:46 AM - edited 09-21-2006 11:46 AM
You can only wire like typed enums to each other.
If the do not match-up, LV will warn you by breaking the wire. This is good.
You could type cast the enums as U16 if you want to compare the numeric values.
The attached images shows what a sub-VI to compare the strings of the selected enums would look like.
It uses "format into string" before comparing the resulting strings.
I hope this helps,
Ben
Message Edited by Ben on 09-21-2006 11:46 AM
09-21-2006 11:49 AM
09-21-2006 11:58 AM
Thanks to everyone who replied with some information. I will just put the sub VI's code in the place of the sub VI itself. I just wanted to do things quicker than having to write the same 3 function code over and over again. I was hoping to boil it down to a single sub VI that will do the same thing.
Again, I appreciate all of the assistance.
09-21-2006 12:17 PM
09-21-2006 02:15 PM