NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Load array variable from external xls file

I want to initialize an array variable using an external xls file.
I am trying with property loader step but I have to insert manuallly all the elements of the array.
Is there any other way to do this?
 
Thanks
 
Valter
0 Kudos
Message 1 of 7
(4,142 Views)
Hi Valter,
 
If property loader is not working (i have not used this feature at all) you can use the code modules instead.
Important is that you give your module the SequenceContext "ThisContext". Now you have access to all Teststand variables
Which Progamming language do you use ? If it is c# i have a small sample.
 
Greetings
 
juergen 
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 7
(4,138 Views)
Hi Juergen,
 
I'm working with TestStand since few weeks.
Is code module an insertable step in which I can write code like c, c++ or c#?
I try to insert an Action step associated with C/C++ DLL but I can't find how set the SequenceContext.
Your example may be very usefull for me.
 
Thanks.
 
Valter
 
0 Kudos
Message 3 of 7
(4,109 Views)

Hi Valter,

I wrote a very simple example in TestStand 4.0, I hope this is the version you are using.
Anyway I'm adding also 2 images, One is for the property Import/export tool while the second one is for the property loader step.

Remember to have the step working as expected you should use tag like Start_<sequence> and End_<Sequence>.
Remember also to make sure that in the step you call them as string value type. Namely "Start_<sequence>" and "End_<Sequence> "

Best regards

 

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
0 Kudos
Message 4 of 7
(4,093 Views)
Hi FiloP
 
When i open and close your example in my Teststand (Engine and Editor 4.0.0.326) Teststand asked me to save
some NI-Tpyes.ini !!!
That means my TS NI Types from release date: 2007-April-05 differes from yours.
 
There could be to two reasons: your files are conterminated or NI have relased a new update with newer step-types.
 
So until this not clear everbody should be carefully. Never acept savings to NI-Types when closing.
 
To get more information about this please visit this thread:
 
 
greetings from the lake of Constance, Germany
and get never affected by a type virus
 
juergen
 
HI Valter1,
tomorrow evening i will post a C# example.
greetings
juergen
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 5 of 7
(4,079 Views)

Hi J_dodek,

Thanks for this information! My TS engine and Editor should be the same as yours ( 4.0.0.326 ).
I'm not sure why NI_types appears to be changed, actually it should not, and so double thanks for pointing that out.

I'll check my TS station.

Cheers

 

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
0 Kudos
Message 6 of 7
(4,070 Views)

Hi Valter,

Here is a example in C#
Note: This requires .NET 2.0  TS40 and Excel 2003 on your Maschine

Greetings

juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 7 of 7
(4,050 Views)