NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Container of different type of element using Vi in teststand

Solved!
Go to solution

Hello, 

 

I have want to create Containers in Array of Element in teststand, which containe different element. for example I have .txt file like,

 

 

Name, Age, height, color

A, 20, 186, Black

B, 30 170, White

 

first row should be elements of Container and second row should be the value of element. Vlaues should be string, number or boolean.

then in second Container again element in first row and value in third row.

 

And all this Container should be under the array of element in fileglobals or locals.

Is there any suggestions how to do so??

 

Thank you very much in advance.

 

Regards, 

Ankit.

0 Kudos
Message 1 of 5
(4,850 Views)

Hello Ankit,

 

1) just create a container (in your case with Name, Age, height, color) in Types:

 

Creating Custom Data Types - NI TestStand™ 2012 Help - National Instruments
http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/data_types_custom_creat...

 

2) go to wherever you want to create the array of that custom type and select "Array of" >> "Type" >> "TheNameOfYourCustomDataType"

 

Best regards

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 2 of 5
(4,822 Views)

Thank you very much for your reply.

I want to call data from the .txt file and it should automatically create the containers using the element from the file.

 

for example here in attachment i have attached .txt file in which first column is represent the name of the container and then secon colum is name third column is age and so on.

and test.seq is able to create the container of array but some how it all in form of string array.

I would like to have not only string but number also.

 

I hope this would help to understand my problem

 

Regards,

Ankit.

Download All
0 Kudos
Message 3 of 5
(4,820 Views)
Solution
Accepted by topic author AnkitRamani

Hi Ankit,

 

I edited your test VI and successfully wrote the container array to a non exisiting variable "Locals.dummy99" (see screenshot).

 

Best regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
Download All
Message 4 of 5
(4,815 Views)
Solution
Accepted by topic author AnkitRamani

Thank you very much for your time and help.

I will have a look and let you know.

 

Regards, 
Ankit.

0 Kudos
Message 5 of 5
(4,811 Views)