Discussion:
Need to copy sub vi from old vi and copy it into new vi
(too old to reply)
firedog777
2008-08-06 18:40:11 UTC
Permalink
I have recently been tasked with Lab View at work with no previous back ground. Work has graciously enrolled me in A 1yr seat liecinece with Ni but untill basic one and two are available (not full) Im on my own.
 
Now to the question: In A VI built with multible Layers sub vi  one of the sub VI tests the 1553 bus in the older version VI this test runs geat,well we changed a kernel file in our product which made us build a new GUI well the guy that built this new 1553 sub vi left with it in bad shape.
My question is there a way to copy the 1553 vi from the original test and past it in the newer ver test and getting away from fixing this mess since the original works fine. The changes we needed to make were in other vi (rs232, Ibit ect...) but the 1553 could have just stayed the way it was. So is this possible with out hrs of research.
 
Thanks
Firedog7
drewsky
2008-08-06 19:10:08 UTC
Permalink
Ok, the answer to your question is another question.  What version is the origional sub VI in?  What version are you using now?  Does it have the same inputs and outputs?  Does it perform the same function?  Here's what I like to do, I would select the main VI of your program go to file > save as > save VI heiarchy.  Open the new area and add the old vi to it, so you don't mess your code up.  Try it, and use the errors to guide you  to possible problems.Good Luck!
firedog777
2008-08-07 14:10:05 UTC
Permalink
Ok Lets give this another shot.
This VI was developed using 7.1 in a Graphical Enviroment. What looks like what happened when are ex Lab View guy needed to add tests (Case Structures) onto this VI he copied the working version but didnt do a save option and save the hierarcy so the  1553 bus test which shouldnt have changed looks totally different now and doesnt work , when opening the VI (top Level Test.Lib) I get a bunch of directory errors.
What I wanted to try and do is copy the case structure (1553 Labeled test 3) from our working VI and plase it in the non working VI.
 
we have alot of Lab view versions and I just placed a req today for 8.6 for the a project I need to dev an automated test for so Im trying to get up to speed on Lab View so any help is Truely appreciated .
 
Here are the errors at start up. The list was to long so I had to trim some off but there are basically the same

1553 control message.vi
Virtual Instrument
- The subVI expected to be at "C:\Documents and Settings\EAUaudio\Desktop\EAU Top Level Test.llb\Wait.vi" was loaded from "C:\Documents and Settings\eauaudio\Desktop\1\EAU Top Level Test.llb\Wait.vi".
1553 send and receive message.vi
Virtual Instrument
- The subVI expected to be at "C:\Documents and Settings\EAUaudio\Desktop\EAU Top Level Test.llb\Wait.vi" was loaded from "C:\Documents and Settings\eauaudio\Desktop\1\EAU Top Level Test.llb\Wait.vi".
BusTools_API_Close
Virtual Instrument
- The external library expected to be at "C:\Documents and Settings\eauaudio\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll" was loaded from "C:\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll".
BusTools_BC_Init
Virtual Instrument
- The external library expected to be at "C:\Documents and Settings\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll" was loaded from "C:\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll".
BusTools_BC_MessageAlloc
Virtual Instrument
- The external library expected to be at "C:\Documents and Settings\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll" was loaded from "C:\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll".
BusTools_BC_MessageWrite
Virtual Instrument
- The external library expected to be at "C:\Documents and Settings\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll" was loaded from "C:\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll".
BusTools_BC_ReadLastMessageBlock
Virtual Instrument
- The external library expected to be at "C:\Documents and Settings\eauaudio\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll" was loaded from "C:\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll".
BusTools_BC_StartStop
Virtual Instrument
- The external library expected to be at "C:\Documents and Settings\eauaudio\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll" was loaded from "C:\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll".
BusTools_BM_Init
Virtual Instrument
- The subVI expected to be at "C:\Documents and Settings\EAUaudio\Desktop\EAU Top Level Test.llb\BusTools_ErrorHandler" was loaded from "C:\Documents and Settings\eauaudio\Desktop\1\EAU Top Level Test.llb\BusTools_ErrorHandler".
- The external library expected to be at "busapi32.dll" was loaded from "C:\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll".
BusTools_BM_MessageAlloc
Virtual Instrument
- The subVI expected to be at "C:\Documents and Settings\EAUaudio\Desktop\EAU Top Level Test.llb\BusTools_ErrorHandler" was loaded from "C:\Documents and Settings\eauaudio\Desktop\1\EAU Top Level Test.llb\BusTools_ErrorHandler".
- The external library expected to be at "busapi32.dll" was loaded from "C:\Program Files\Condor Engineering\LV-1553\LabView-RT\busapi32.dll".
BusTools_RT_AbufWrite
Virtual Instrument
- The
smercurio_fc
2008-08-07 14:40:05 UTC
Permalink
Those are not errors. When a VI is saved the subVI information, including the path to the subVI is saved also. Well, when you loaded up the VI LabVIEW found a VI with the same name in a different place based on either (a) the subVI was already in memory; (b) the search path was set up to look in that directory first. The version of LabVIEW would have no impact on this situation.
firedog777
2008-08-07 15:10:07 UTC
Permalink
Hmmm well its pulling the path from the working VI thats left in mem from the previuos start up but still the 1553 case structures are very different and since its ok for me to use the original 1553 Case structure is there a way with 7.1 to remove just that test (Case Structure) and copy it to the new VI
smercurio_fc
2008-08-07 15:40:06 UTC
Permalink
Youre statement " its pulling the path from the working VI thats left in mem from the previuos start up" doesn't make any sense since LabVIEW simply doesn't work that way. There is no "memory" from a previous LabVIEW startup. You can add/delete cases at will and replace code anywhere you want. The version of LabVIEW doesn't matter. The important part is to get the right hierarchy, and that seems to be your fundamental problem.You may want to spend some time with the tutorials and perhaps going through some of the online courses so you have a better undestanding of how LabVIEW works. You can go through the tutorial(s) and look over the material in the NI Developer Zone's <a href="http://zone.ni.com/devzone/cda/tut/p/id/5054" target="_blank">Learning Center</a> which provides links to other materials and other tutorials. You can also take the <a href="http://www.ni.com/academic/lv_training/how_learn_lv.htm" target="_blank">online courses</a> for free.
firedog777
2008-08-07 16:40:05 UTC
Permalink
As of mon I purchased a 1yr training seat certificate that allows me to take any courses&nbsp;of choice Im just waiting for basics 1 and 2 to become available but tell then Ive been doing there tutorials on there site.
&nbsp;
Not to beat&nbsp;a dead horse to death but I was able to save the whole VI and hierarchy and I do see how to duplicate and delet a Case Structure but not how to Save one case structure with all sub VIs and hierarchy and then take it and place it in a revised VI.
I know how it is trying to explain something to some one who has no knowledge on the subject I usaully get a little annoyed and ask them to brush up on the basics and get back to me I guess this time Im that guy.lol
&nbsp;
Thanks again I think its time for me to go get my hands dirty with this VI.
&nbsp;
Have a good one.
smercurio_fc
2008-08-07 16:40:06 UTC
Permalink
You can create subVI out of existing code. Select the code, and then select Edit-&gt;Create subVI. This will allow you to create a subVI that you can save into its own hierarchy. You can then use this VI wherever you want.
firedog777
2008-08-07 17:10:05 UTC
Permalink
Im&nbsp;going through it know&nbsp;. Thanks for&nbsp; your help.

Continue reading on narkive:
Loading...