LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Teststand UI Controls to load a sequence file in Labview

Solved!
Go to solution

Hello Community,

 

32-bit Teststand 2014

32-bit Labview 2015

 

I am trying to make edits to the provided Teststand Simple Interface in Labview called Top-Level VI.vi.

I don't want to browse for a sequence file using the open sequence file button.

I want to be able to load a sequence file that the user selects as a string or path.

Then if the string value changes, I want a handle event to update the sequence file to be used.

 

An example of how I want my project to work...

User runs VI program.

User selects which sequence file to load and is outputed as a string.

Once selected, the string value was changed causing a handle event to occur.

The handle event inserts the new string sequence file as the new opened sequence file.

 

I came across a few examples, but none were exactly what I am looking for.

They either preloaded the sequence file upon running the program or used a native button to call the open sequence file button, which brings up the file browser.

 

Any help or examples on how to go about doing this or leading me in the right direction would be greatly appreciated please.

 

Thank you

0 Kudos
Message 1 of 7
(4,605 Views)

Hey MechUnit,

 

Just to clarify exactly what you would like do you want several buttons each referring to a particular sequence file so that the user can just select which sequence they want and then LabVIEW will programmatically query for the file path of that sequnce based on which button is pushed? Also could you post the examples that you found but are not quite what you are looking for? Those could potentially be a good starting point. 

 

Best,

hfar2

Message 2 of 7
(4,557 Views)

It should be as simple as you determining how you want to handle your sequence string list, then creating a new event in the "Handle Events" case on Value Change of your string. The NewVal will be passed into a "OpenSequenceFile" method of the Application Manager.

Certified-LabVIEW-Architect_rgb.jpgCertified_TestStand_Architect_rgb.jpg


"I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them." John Bernard Books

Message 3 of 7
(4,537 Views)
Solution
Accepted by topic author MechUnit

@bsvare wrote:

It should be as simple as you determining how you want to handle your sequence string list, then creating a new event in the "Handle Events" case on Value Change of your string. The NewVal will be passed into a "OpenSequenceFile" method of the Application Manager.


 

As suggested, use http://zone.ni.com/reference/en-XX/help/370052J-01/tsuiref/reftopics/applicationmgr_opensequencefile... method with filepath as parameter. 

 

Spoiler

Don't forget to close already open files (assuming you don't want multiple files open at the same time) to avoid reference leaks, use http://zone.ni.com/reference/en-XX/help/370052J-01/tsuiref/reftopics/applicationmgr_closesequencefil... method to do so.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 4 of 7
(4,523 Views)

Sorry for my delayed response. My work computer broke down Smiley Indifferent

 

I ended up adding a refnum string to the TestStand UI Data.ctl

In the Top-Level VI, in the Initialize section, I added my string to the bundle.

In the section Handle Events, I added an event to update my SequenceFile and gave it my string as the path.

In the Shutdown section, I made sure to handle and close the sequence files.

 

All of your posts were helpful in the right direction.

 

Thank you!

 

0 Kudos
Message 5 of 7
(4,460 Views)

I just came across your discussion topic and I'm trying to do the same thing.  Do you have some code you could share?

0 Kudos
Message 6 of 7
(3,610 Views)

Please look at my post above. The link inside spoiler section pretty much has all the code you need.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 7 of 7
(3,605 Views)