NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

passing a string from c# to RunState.Root.Locals.UUT.SerialNumber at NI

HI all,

How can I pass a variable content as a string in c# to the sequence variable named as RunState.Root.Locals.UUT.SerialNumber.

The main gold is to pass the string value from textbox in c# GUI to the sequence parameters.

Tnx

0 Kudos
Message 1 of 11
(6,310 Views)

Please check this example :

TestStand 2012\Examples\AccessingPropertiesUsingAPI\UsingDotNet\AccessingPropertiesDotNet

 

It shows how to set a TestStand Variables from a C# enviornment.

 

Hope this helps.

0 Kudos
Message 2 of 11
(6,293 Views)

Hi all,

 

I'm using C:\Users\Public\Documents\National Instruments\TestStand 2013\UserInterfaces\Full-Featured

 

and I'm trying to get the sequenceContex object :    SequenceContext s= axExecutionViewMgr.SequenceContext;

I always get exception "You must pause the execution."

 

How should I do that??

 

The main gold is to set RunState.Root.Locals.UUT.SerialNumber at run-time by using c# application(full-featured example).

 

0 Kudos
Message 3 of 11
(6,288 Views)

Use an User Interface Message (short UIMsg) to query the DUT serial number in the Pre-UUT callback.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 11
(6,284 Views)

Hi Norbert,

 

I don't need to query the serialNumber ,I need to set the serialNumber at runTime.

On Full featured GUI project I don't know how to access to serialNumber runstate variable.

 

I'll appriciate your time.

0 Kudos
Message 5 of 11
(6,259 Views)

Hi,

at which time/state in the process do like to set the the number?

 

Regards

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 6 of 11
(6,247 Views)

Hi Juergen,

 

When I start the execution of the sequence I would like to send the serialNumber string from my application(In this case Full Featured GUI example c#) to the RunState.Root.Locals.UUT.SerialNumber variable on NI.

 

 

Tnx

0 Kudos
Message 7 of 11
(6,244 Views)

Hi

 

there a serveral ways to do this task. But you should do it in that way Norbert_B has descriped by using UserInterface Messages.
In general, TestStand is not only one process. Your UI is another process. You have to share information over processes.

The recommed way for doing this here is fireing UI messages. From TestStand execution you send a message to your UI. Once you have received this message in your UI, you can get a handle to the current sequnceContext were you are able to set your UUT number.

I am pretty sure that Norbert can explain this more in detail. 🙂 because i am out of time now.

 

Regards

Juergen

 

 

 

 

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 8 of 11
(6,241 Views)

Hi All,
Can someone show me an example that send UI message on C# side

and how to catch the UI message on NI side     ???

Tnx

0 Kudos
Message 9 of 11
(6,239 Views)

Hi

 

Just visit this threads:

For C#:

http://forums.ni.com/t5/NI-TestStand/Modify-local-variables-with-C-dll/m-p/875754/highlight/true#M23...

For Fireing UI-messages:

http://forums.ni.com/t5/NI-TestStand/display-loop-count/m-p/653128/highlight/true#M18182

 

Regards

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 10 of 11
(6,235 Views)