NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass variables defined in LabVIEW to teststand sequence via teststand operator interface?

Solved!
Go to solution

Hello all,

 

I am working on a project & I am very new to LabVIEW & Teststand both. This project consists of a main GUI, a teststand operator interface & a test sequence.

 

How the project works?

Part 1 - Main GUI (Refer screenshot 115 & 116)

  • This is the 1st GUI window the operator will see. It loads 8 string input parameters from respective locations. then read the string data inside it. Once this 8 inputs are loaded. Operator will click on "Run Build Transparency sequence" button.

Part 2 - Upgraded Teststand operator interface (Refer screenshot - 117 & 118)

  • Once the "Run Build Transparency Sequence" button is pressed. The operator should be able to see 'Teststand operator Interface' window. Where, One sequence is by default loaded. Now, the 8 inputs loaded in Part - 1 should be passed to the default sequence and sequence should start running & operator should be able to see the test report.

Part 3 - Sub VI inside 'Teststand operator Interface' (Screenshots 95 & 97)

  • I have manually added this vi in teststand operator interface block diagram, so that I can send the 8 string inputs in main GUI to teststand sequence.
  • I have tried developing 2 different sub VI's. one using Application manager control & other using sequence context control. These both Vi's throw different errors and I couldn't run the test sequence.
  • For the sub VI which used sequence context as control, I called this vi in a step of teststand sequence. but it still didn't work.

Project status - 

  • Part-1 works well. 8 Inputs get loaded successfully. Then Teststand operator interface window also opens successfully. 
  • Error occurs when LabVIEW tries to run sub VI I designed.

My queries -

  1. Can you please tell which method in sub VI (Application manager or sequence context control) is a correct approach to run my project successfully? or else, if both these are incorrect then which method should I follow?
  2. Let me know, if you need me to explain my questions more clearly. I have attached all the necessary screenshots. please check them & help me with your suggestions so that I can make this project running.

VI's and its names in my project

  1. Main GUI - (VI name: Main_GUI_TeststandOI_GlobalVariable.vi)
  2. My upgraded Teststand Operator Interface - (VI name: Teststand operator Interface - newsubPropertyv2.vi)
  3. Sub VI inside Teststand operator Interface - (VI name: Sequence Context - newsubPropertyv2.vi)

 

Thanks & Regards,

Surabhi

0 Kudos
Message 1 of 6
(284 Views)
Solution
Accepted by topic author SiSp

You need to use UI Messages to pass information to and from your sequence file to the UI:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x3tWCAQ&l=en-US

 

If you need to get it from the UI to the sequence file you post a UI message from the sequence file with the sequence context.  Then you can set variables from there back to the sequence file.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 6
(250 Views)

Also,  I will be presenting at the GLA Summit on building User Interfaces in LabVIEW for TestStand.  I will demonstrate UI Messages.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 3 of 6
(248 Views)
Solution
Accepted by topic author SiSp

It is also possible to use synchronization objects. See this

If we want to have LabVIEW-based synchronization then we could use TCP (AMC?) or in some cases simple LabVIEW queues.

But as it was mentioned, NI recommends UI Messages in this case.

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
Message 4 of 6
(207 Views)

Hey jiggawax,

 

The concept of Using UI messages in my case solved my problem. Thanks for the solution.

 

But right now I am facing a new problem. The problem is that the Global variables works fine in the Labview  development environment & my Teststand sequence was able to read those Global Variables as File Globals, but  this does not work when I run the compiled executable in the runtime. My Teststand sequence is not at all picking the Global variables value.

 

Do you have any solution to resolve this?

0 Kudos
Message 5 of 6
(149 Views)

@SiSp wrote:

Hey jiggawax,

 

The concept of Using UI messages in my case solved my problem. Thanks for the solution.

 

But right now I am facing a new problem. The problem is that the Global variables works fine in the Labview  development environment & my Teststand sequence was able to read those Global Variables as File Globals, but  this does not work when I run the compiled executable in the runtime. My Teststand sequence is not at all picking the Global variables value.

 

Do you have any solution to resolve this?


FileGlobals do not change based on if they are in the runtime and/or the development environment.  So I'm surprised you are seeing this behavior.  Do you mean that the UI is compiled to a an executable?  And then you changed the adapter?  the adapter for LabVIEW has absolutely nothing to do with the UI so that seems odd to me.

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