06-20-2011 02:15 AM
I have a Main Sequence. In that I have an array of type. Type is a container of boolean. I want to pass this array to a Sub sequence using parameters. How do I do this?
I have attached my Main sequence and Sub sequence. The Main Sequence is done and it has the array in Locals. The Sub Sequence is also attached.
06-20-2011 02:19 AM
Sorry..missed the attachment last time.
06-20-2011 03:33 AM
Hi,
I can not look at your attachments at the moment, but all you do is assign an arary to the array in the Parameter List as you do another other variable. eg Locals.MyArray -> Parameters.MyArray.
06-20-2011 05:02 AM
But the problem is my array element is a type. When I aasign the array to the parameter it is giving type conflict. (Type is same but the names are different. TestStand dose'nt allow to create two types with the same name even in different sequences)
06-20-2011 09:36 AM - edited 06-20-2011 09:37 AM
Then change the type of the parameter to match the type of the local...
06-20-2011 10:00 AM
@LabVIEWan wrote:
But the problem is my array element is a type. When I aasign the array to the parameter it is giving type conflict. (Type is same but the names are different. TestStand dose'nt allow to create two types with the same name even in different sequences)
You are misunderstanding how types work. You should put them same type in both files (you can copy and paste it from one file to the other). Or better yet, put your type in a type palette file (such as mytypes.ini) in order to avoid issues with types getting out of date in one file or the other.
All you have to do to pass the parameter is create a parameter of the same kind and type in the subsequence's parameter object. There is nothing special or different for this case other than you should be using the same type in both files.
Hope this helps,
-Doug
06-21-2011 12:45 AM
I got it working, by going with Doug's solution, by creating the type under "Mytypes.ini". It becomes like a file global (just in view of scope). But I am just curious to know. Can we make it work by creating the types under sequences locally? ie the same type will be created with different names under my Main Sequnce and Subsequence.
06-21-2011 09:31 AM
You can turn off type checking for parameters entirely by right-clicking on the parameter and unchecking the "check types" menu item. I don't recommend this though. I think adding various versions of types with different names could quickly turn into a maintenance nightmare. Also, disabling type checking basically means it doesn't check the type at all and you could pass anything at all instead of the expected type.
-Doug
06-23-2011 05:29 AM
One more question, is "types" in TestStand similar to "typedefenitions" in LabVIEW? Will it update all its copies with changes made in any copy?
06-23-2011 11:50 AM
The way custom data types in teststand work by default is that the structure is enforced. You can only change the structure in the type definition, the instances will not allow structure editing (at least with supported editors), and changing the structure in the definition changes the structure of the instances too. Values and some other minor settings can differ between the definition and instances though. Not completely sure how labview type definitions work so I can't say for sure if it is similar.
Hope this helps,
-Doug