NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing arrays/containers from TestStand to custom C# application

Hello,

I have custom application in C#, which is running TestStand sequence. I am able to pass standard numeric/boolean/string variables from TestStand to C# using UI messages. Like:

double digitalInput = e.uiMsg.Thread.GetSequenceContext(callStack, out frameId).Locals.GetValNumber("digitalInput", 0);

 

How can I pass more complex data types (containers, arrays,..) from TestStand to C#? - Is it any similar easy way as with standard data types?

 

Thanks,

Petr

0 Kudos
Message 1 of 3
(2,898 Views)

There are several ways to accomplish this.  The simplest bet is to pass the sequence context as part of your UI Message and then use the TS API to get the data that you want.

 

Another option is to flatten the data to a string and pass it as a string then unflatten it in C#.

 

Here is a discussion forum about it a few years back:

https://forums.ni.com/t5/NI-TestStand/Pass-Cluster-Type-Value-from-TestStand-to-UI-Using-TestStand-A...

 

There are other methods if you google: container UI Message TestStand.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(2,864 Views)

Thanks Jigg,

I used the TS API applied on sequence context to get what I want.

0 Kudos
Message 3 of 3
(2,847 Views)