02-08-2016 03:07 PM
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
Solved! Go to Solution.
02-09-2016 09:16 PM
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
02-10-2016 08:09 AM
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.
"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
02-10-2016 10:23 AM
@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.
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.
02-16-2016 07:34 AM
Sorry for my delayed response. My work computer broke down
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!
12-28-2017 12:00 AM
I just came across your discussion topic and I'm trying to do the same thing. Do you have some code you could share?
12-28-2017 06:28 AM
Please look at my post above. The link inside spoiler section pretty much has all the code you need.