LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to compile new vi's into UI project?

Solved!
Go to solution

First off, the essentials

Windows 7 Enterprise

Labview 2010, Teststand 4.2

pre-existing code someone else wrote.

** Yes, I know, ancient history, which is what I inherited with little time to upgrade to most recent stuff. **  You know, the usual...

 

I have a series of related test stands with a large number of complex vi's all grouped together in the same folder, and shared between the test stands.  The vi's are run from equally complex Teststand sequences, which are in turn run inside of the UI projects.  These tests were clearly written by "black belt" LV and TS coders.

 

I have found several projects in the code folders, one appears to be a UI project with several build specifications, each matching the test stand the final result which goes to a specific test system.

 

I had to make changes, after I'd read a bunch of NI tutorials and took a class on the "core" Labview things.  So, I know enough to be dangerous, but not enough to be competent, IMO.

 

My question(s):

How do I get a new popup vi I wrote to be included in to a specific UI Build Specification?

I am not even sure how to frame my next couple of questions, I do not yet speak the lingo well enough here.  (I am a procedural coder who decided to take up the challenge.)

The following graphic shows the Operator Interface project.

DLMC_0-1692149036102.png

How do I add the new popup vi to one of the build specifications, and build that UI?  From the looks of the various test systems, every vi for every test is included in what was deployed on each station, so the builds don't appear to be picky about what goes in there.

I have cloned the folder with all of the vi's on my Win7 development station and all of the vi's are, of course, saved in Subversion.

So, I am not afraid of mashing buttons to see what comes out.

 

Then, how do I package the results and deploy?

I have read some NI tutorials, but they don't seem to apply to my circumstance, and I've read several posts on how to compile and avoid cross-linking vi's.  But there seem to be differing opinions on how to do this and whether they even work.

 

I realize that this is a crazy complex question and I hope I put enough info here to work with - I can't provide "source" as much of it is proprietary, and logistically speaking, it is HUGE, several GB with hundreds of vi's, sequences and support files.  Any help, from pointers of NI support that I may have missed to anecdotes about what works best, or if you feel so inclined, a list of steps and pitfalls from the black belts I have read here.

 

Many thanks,

DLC

0 Kudos
Message 1 of 9
(919 Views)

This is where it is very helpful to have a LabVIEW Guru "take a quick look" at your code sitting in your computer.

 

Caveat -- I've never used Test Stand, but have written a bunch of executables, sometimes a Project with (as you have) several different Builds.  For example, my Acquisition/Analysis routines typically have an Acquisition routine, an Analysis routine, and sometimes a bunch of stand-alone Tests or Simulations, all in the same Project (but sometimes in different Project Folders, such as Acquisition and Analysis).

 

always give my Build a unique Target name (even on Real-Time targets).  Most of the time, the Source Files entry has the Top Level VI the only thing in Startup VIs, and usually nothing in "Always Included" (though if I'm carrying Configuration info in a Config folder in the Project, I'll add the Config folder to "Always Included", and will also add it to "Destinations" on the next tab). 

 

95% of the time, that's all I do.

 

I'm guessing that your Test X build specs are much more complicated.   Although I hate looking at "pictures" rather than "code", an Image or two from one of your Build Specs might yield some other suggestions ...

 

Bob Schor

0 Kudos
Message 2 of 9
(848 Views)

The gurus have left the building...

 

You are correct, these builds are huge.  You have tweaked a thought and I am examining the build spec properties to see if there is a button to push that pulls popups into the UI main window.

 

I can build the exe files fine, and they run.  BUT, my popup windows are not being contained in the UI, so there is a step that I am missing. 

What is confusing me is that it looks like Labview project vi's are run in Teststand sequences whose main sequence is called from the UI project, which is again Labview vi's.  So, I am left to assume that I need to figure out how the popups that are nested in the UI main window are told to go there when the Teststand sequence is called from the Labview UI project.

 

So, since it looks like I can compile and run an exe that correctly calls the Teststand main sequence, and that correctly calls the vi's from my Labview project. 

The missing piece for me now, is how those popup vi's are contained within the Labview UI main window.  Based upon the NI UI info that I have found, it looks like that may be a separate Labview project.  I'm not sure.

 

Have I made this more complicated than it really is?

 

be well,

DLC

0 Kudos
Message 3 of 9
(843 Views)

I am no closer to solving my problem, but I have read more.

These application exe files were creating by building the applications in the OperatorInterface.lvproj.  The old ones worked, they don't with the new code that I've modified or created.  That could be because this is the development machine and something different is done at the test stand to enable what I want, which is to have my modal front panels appear within the panel in the main vi.

Opening that Simple (!?) Operator Interface main.vi, I see this comment:

"Open the TestStand Engine then Set the TestStand main application window to be this VI."

OK, this is exactly what I need to do.  But.

How does one open the TestStand Engine and set the main application window? 

 

I found an API call that sets this value, but I assume that is called from something further down.  The Sequence editor does not have the ability to set the main application window, so far as I can tell.  Is the TestStand Engine something that only exists on the target test stand?

 

be well,

DLC

0 Kudos
Message 4 of 9
(811 Views)

Okay, it makes more sense now. So, there is a Operator Interface developed in LabVIEW with some customization. This is not your regular LabVIEW code, as it involves a lot of ActiveX callback registration. To understand the whole architecture, you need to be familiar with TestStand architecture and modules.

 

santo_13_0-1692221123159.png

 

open up the example code at C:\Program Files\National Instruments\TestStand 2021\UserInterfaces\Simple\LabVIEW

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 5 of 9
(804 Views)

Thanks for the tip.  So, mine looks a LOT different from yours, but the relevant vi's are there:

DLMC_0-1692223357726.png

Like with your example, the VI refnum input uses the default, which the vi says that if the VI Refnum is unconnected then the default uses the caller's Refnum, which is OI - Top-Level VI.vi.  The OI - Top-Level VI.vi. here is clearly not working.

What I have read is that the front panels being displayed need to be modal for this to work.  So that is the next thing to check.

We may be getting closer.

 

[edit]  That modal setting had no effect.  I see the front panels in the OI panel and floating outside of the OI panel.  Both.  The ones in the OI panel do not respond, only the front panels that are floating are active.  The "old" tests on their workstations do not do this, so something is "broken" on my development workstation.  At least that is what it looks like.

 

be well,

DLC

0 Kudos
Message 6 of 9
(793 Views)
Solution
Accepted by topic author DLMC

Looks like you need a LV+TS consultant to work with you to understand your architecture and guide you through the process.

 

or share your source here. Without actual code, it is hard to guide you on your journey.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 7 of 9
(770 Views)

It does look like that. 

There are hundreds of vi's, dozens of sequence files, customized OI's and build sequences, several projects; as well as Oracle and mySQL database connections.  I'll need someone on-site to look as these monsters.

I thought that I would be done by learning how to do Labview vi's and TestStand sequences.  Those were only the first steps.

 

Thanks anyway,

DLC

0 Kudos
Message 8 of 9
(763 Views)

I discovered one very important wrinkle to this problem.

The front panels will not embed into the OI panel when in using the labview developer engine.  You have to use the run-time engine to see your work.

I still haven't gotten my edited and new vi's to go into the OI, but the rest of what I have been seeing is now understood.

 

be well,

DLC

0 Kudos
Message 9 of 9
(742 Views)