NI myRIO App Development

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted

problems building the .vip

    I don't have a lot of experience prior to this with the VI Package Manager, so I've got a lot to learn.  Thanks for all the documentation.  I've found my way through much of it, but there are a number of issues that are still holding me up.

    The most minor issue was that I first found the example .xml file in the tutorial pdf that Patrick pointed us towards.  When I copy-pasted that text into a text editor, it garbled a good bit of it.  Very odd.  But I was able to straighten it out.  I think.  I also found a copy with the Cool app, so I used that to verify my copy.  Looks good.

    A second, very minor point is that, since my app will be free, I was going to use the NI EULA that Patrick pointed us to.  That link goes to a pdf.  But the VIPM can only display text.  It would be convenient if there were a text version posted.  I wouldn't be surprised if the VIPM allows rtf formatting.  I didn't bother doing any of that, only scraped plain text out of the NI EULA.  But if someone were to go to the trouble of cleaning that EULA up as a text document, many of us could benefit.

    A third issue, not quite as minor.  One requirement is that the package uninstall cleanly.  However, the VIPM doesn't see my .alias file, so it doesn't install it.  Then, once the project is opened in LV, it immediately recreates the missing .alias file.  But then when you go to uninstall, it leaves the .alias file (because it didn't install it) which also means it leaves the whole directory structure.  I can't find a way to convince VIPM to see the .alias file, so I can't find a way around this.  One possibility is that my installation isn't debugged yet, and is installing to the wrong place, so maybe this will disappear when I get the rest of this working.

   The biggest issue is that I'm just not doing something right.  I've reviewed the tutorial doc and reviewed my directory structure and the .xml file, but things just aren't working.  VIPM does install my project, but it goes into vi.lib, not Project Templates.  Even though I made sure to select Project Templates in the VIP Builder Destinations.  Also, when I run the .vip and install my project, it opens a blank VI in LV (maybe that's normal), then it pops up a dialog box that says "VIs and Libraries that are already open will not be loaded in the application instance of the project you are creating.  To edit already opened items in the new project's application instance, you must add them to the project and reopen them from the project tree."  This is despite the fact that LabVIEW has nothing open.  (I even closed LV completely before the install to clear the clipboard, etc.)  Then it opens a blank project.  My project is nowhere to be seen.

   I suspect that I have some minor issues with the VIPM Builder script and/or the .xml file.  Shall I zip the whole thing up and submit it, or are there some simple suggestions on how to resolve this?

Thanks,

    DaveT

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 1 of 14
(6,732 Views)
13 REPLIES 13

Re: problems building the .vip

The empty VI that gets opened is normal during install of a VIPM. I believe it is there to avoid certain problems with the Getting Started Window when doing some behind the scene operations during installation of a package in some LabVIEW versions.

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
Message 2 of 14
(2,818 Views)

Re: problems building the .vip

Agreed with rolfk regarding the empty VI, there is even a dialog that can be dismissed to not open everytime that informs the user that this VI should not be closed during the process of building the package. So, just in case you are doing that, don't close that empty VI.

Regarding the error of VIs being open. Are you adding a prefix to your VIs? I recommend that you do select the add prefix option in the "Source File Settings" lower right, select "Enable Renaming". Having a prefix helps with distinguishing between the package source code and the code installed via the package.

Hope this helps.

Regards,

Fab

Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor
0 Kudos
Message 3 of 14
(2,818 Views)

Re: problems building the .vip

To add on to Fabiola's comment: In Source File Settings, if you select "VI Package Source" from the file list, is Project Templates selected as the Destination (on the right)? This is different than selecting Project Templates in the Destinations section. Destinations is only used to set up the file paths for specific destinations. That should resolve your vi.lib / ProjectTemplates installation issue.

I am encountering a different issue, where everything builds and installs correctly, but when I choose the project from the Create Project Wizard and click Finish, it says that the source files cannot be found and does not build the project. I have verified that all paths in the XML metadata file are correct, and the Create Project dialog successfully locates the description, image, and documentation. Does anyone have any thoughts on what I can do to resolve this?

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com
0 Kudos
Message 4 of 14
(2,818 Views)

Re: problems building the .vip

Hey Dave,

A couple quick thoughts on some unaddressed points of yours, in case anyone has the same questions:

- If you copy/pasted from the online copy of the XML text, it might've been garbled with HTML tags from the Jive SBS hosting platform.  It can do some odd things.  The XML file can be downloaded and edited directly from the sample files doc.

-  You're right about the EULA, it needs to be in .txt form for VIPM to use it.  There's a .txt copy installed with the source files of the Cool myRIO App to C:\Program Files (x86)\National Instruments\LabVIEW 2013\ProjectTemplates\Source\myRIO\Cool myRIO App\myRIO v1.1\documentation if anyone wishes to use that.  I believe I just copy and pasted from the PDF when I created that.

-  The .alias file is not necessary to be included in your build.  This file is generated automatically when a new project is created, and doesn't need to be included in your package or checked into source control.  This is why VIPM ignores it.  See here for details: http://zone.ni.com/reference/en-XX/help/371361G-01/lvhowto/lv_file_extensions/

Have you had any luck or made progress getting your package to build and install properly?

-Patrick

Patrick
CLA
0 Kudos
Message 5 of 14
(2,818 Views)

Re: problems building the .vip

In response to Will's question about paths, we determined that the path LabVIEW was checking and his actual path did differ.  The difference was as follows, relative to LabVIEW directory and using Cool myRIO app nomenclature:

Path Provided by Will's XML:

ProjectTemplates\Source\myRIO\Cool myRIO App\myRIO v1.0\Cool myRIO App.lvproj

Path LabVIEW was checking:

ProjectTemplates\Source\myRIO\Cool myRIO App\myRIO v1.1\Cool myRIO App.lvproj

Hence the error that source files could not be found.  We are unsure why LabVIEW expected a v1.1 instead of a v1.0, but if anyone is having a similar issue, perhaps using the myRIO v1.1 folder name in your hierarchy will help.

Patrick
CLA
0 Kudos
Message 6 of 14
(2,818 Views)

Re: problems building the .vip

The ideas and tips from everyone are much appreciated.  I won't have time to try much of this until this weekend.  (Talk about cutting it close, eh?)  I'll let you know how it goes.

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 7 of 14
(2,818 Views)

Re: problems building the .vip

   Thanks again for all the suggestions.  I've worked through a number of issues and bugs, but am still falling short of a vipm that installs correctly.

   I sorted out the destination issue.  Everything appears to get installed in the correct location.  And when I call up the sample projects window, my icon shows up.  I can start to launch it, but it doesn't work.  See below.  I have three or four remaining problems.

- When I install, I still get the error dialog about the VI's already being open, even if LV was closed before the install began.  (I tried Fabiola's suggestion about prefixes, but that seemed to cause other problems.  E.g. the project was looking for items without the prefix.  I imagine that could be resolved by editing the xml file.  Is that the normal procedure?  E.g. is everyone using prefixes, or are some folks able to build these without prefixes?)

- The project that opens up during installation is empty.  (Could well be related to the above issue.)

- So then I close that project and the empty VI, and open the sample project window.  Start my project from under the myRIO options.  Several things happen.  It doesn't recognize my bit file.  (I am using a custom bitfile for the FPGA.) It ends up trying to load the default FGPA VI, and complains because some sub-vis are no longer present. When I ignore those, it comes up with a File not Found error.  Close that.  Everything goes back to the LabVIEW splash screen.

- If I open up the project from the ProjectTemplates directory, things are mostly there.  But the RT program says that the FGPA program isn't compiled.  E.g. apparently the change of paths has invalidated my bitfile.  I imagine there are special steps I need to take to include a custom bitfile???

Thanks in advance,

    DaveT

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 8 of 14
(2,818 Views)

Re: problems building the .vip

Dave_Thomson wrote:

- When I install, I still get the error dialog about the VI's already being open, even if LV was closed before the install began.  (I tried Fabiola's suggestion about prefixes, but that seemed to cause other problems.  E.g. the project was looking for items without the prefix.  I imagine that could be resolved by editing the xml file.  Is that the normal procedure?  E.g. is everyone using prefixes, or are some folks able to build these without prefixes?)

The prefixes are needed for APIs, for VIs that get installed in vi.lib and are going to be showing up in your palettes. If the VIs are only part of the project template, then there is no need for prefixes.

I was getting the VI's already open during package build, it turned out that the computer we were using did not have the latest version of VIPM. VIPM 2014 fixes issues with bit files. (see this other thread: https://decibel.ni.com/content/thread/22829?tstart=0)

Dave_Thomson wrote:

- So then I close that project and the empty VI, and open the sample project window.  Start my project from under the myRIO options.  Several things happen.  It doesn't recognize my bit file.  (I am using a custom bitfile for the FPGA.) It ends up trying to load the default FGPA VI, and complains because some sub-vis are no longer present. When I ignore those, it comes up with a File not Found error.  Close that.  Everything goes back to the LabVIEW splash screen.

Make sure your bitfile is included in your original project. Then the installed project should have the bitfile in the project.

Also, check the xml file, there were some inconsistencies in how the labels were spelled (Metadata vs MetaData) and what is recommended here:

http://www.ni.com/white-paper/14045/en/

I use XML Notepad, it makes it easier to edit/visualize xml files.

Good luck,

Fab

Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor
0 Kudos
Message 9 of 14
(2,818 Views)

Re: problems building the .vip

FabiolaDelaCueva wrote:

Make sure your bitfile is included in your original project. Then the installed project should have the bitfile in the project.

Even if the bitfile is included in the project, the project scripter called after selecting the sample project will change the expected bitfile name based on the project name the user choses.

I don't know how to fix this.

The problem with the destination not sticking is as follows, and probably a bug in VIPM (see also).

EDIT: further investigating this: The setting does not stick if I select it from the "destinations" listbox. It works correctly if I instead select the right path from the "Base Path" ring to the right of it.

Basically, if you select the destination from the listbox, the VI does not get marked as dirty, even though all other fields (e.g. Base Path) do get updated. If you select a destination from the "Base path", the specification immediately gets marked as dirty and the new setting sticks when you save.


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 10 of 14
(2,818 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.