Open VI Reference to a LabVIEW executable.

Hello,
I haven't done this for a while and it's not working like expected.  I'm trying to "Open VI Reference" from executable A.exe to B.exe.  I'm trying to get a control value from B.exe in A.exe.  Can someone send me an example?
Right now I'm at this stage: I have A.exe running as a LabVIEW executable.  I'm trying to "Open VI Reference" to A.exe from LabVIEW development without success.  Not sure what I'm doing wrong.
Don't hesitate to ask more info if you need some.
LabVIEW 2012, Windows 8.1.
Thanks,
Michel
Solved!
Go to Solution.

Bob_Schor wrote:
Once you have an Executable, does it matter that the underlying Development system is LabVIEW, rather than (say) Visual Studio, or Matlab?  I suppose you could write an application that "knows" to, for example, listen to a TCP/IP port and interpret/execute commands, but that doesn't sound like the question being asked.
BS
LabVIEW-built executables still run as VI's in the RTE, though.  Their identities have not been abstracted away into one single object or anything, and they still have name-based VI server access.
You can configure a build specification to include almost nothing, and require the VI files to be present in expected locations (i.e build specification's data or support directories).  By default, all items in an executable application build specification are set to be put in the same location as their caller, which results in most things going into the .exe file, internally referenced in a directory-esque form like crossrulz mentioned, "MyExecutable.exe\MySubVI.vi".

Similar Messages

  • Open VI Reference Function won't execute in multi process application

    I have a sub vi with Reentrant execution, and it has
    recursive call on some cases.
    It is very similar to OpenG VI “Read Key
    (Variant)__ogtk.vi”, my sub vi works without any problem unit LabVIEW’s Two
    Button Dialog is opened in other process loop.
    I have attached a Test VI, and would like to understand why
    would Loop 1’s Dialog box have any execution impact on Loop 2’s process?
    Why Open VI Reference Function won’t execute when Two Button
    Dialog is opened in other process?
    LabVIEW version 8.6
    Thanks,
    Attachments:
    Test Vi.zip ‏17 KB

    Broken Arrow wrote:
    LabVIEW's native dialog box is Modal. It will not let anything else run which requires (or MAY require) user input. In the case of your code, LabVIEW can't open a VI with a modal process going.
    Broken Arrow thanks for your reply, but not sure if I understand Modal dialog box would cause the problem.
      I already had a work around by using Three Button Dialog VI, and it is s Modal VI.
      I would still like to understand, why would DataFlow halt at Open VI Reference Function in Loop 2 when I use when Two Button Dialog?
    Attachments:
    Test Vi 2.zip ‏20 KB

  • Open VI Reference Error in the executable version only

    Hello folks! I am having a strange issue since I updated to Labview 2014: I have a vi that uses "Open VI Reference" in order to programmatically open the desired vi. It worked flawless also in the compiled version (.exe) of the program until yesterday, when i compiled it again for the first time since my update to Labview 2014. It compiles with no problem, but when i start the exe and load the first vi it already gives me an error "Built Application or Shared Library (DLL): Missing".
    The point is that all the VIs that i want to open are inside an LLB that is supposed to be compiled inside the .exe: infact the path that i use to open is:
    D:\LabVIEW Data\builds\Sequenzer\Sequenzer2.0.exe\com_lv_sequenzer\trunk\Sequenzer_Functions.llb\Seq_Connect_to_Database.vi
    And i get error number 7:
    Open VI Reference in Seq_Function_Interface.vi->Sequenzer_Main_2.0.vi<APPEND>
    VI Path: <b>D:\LabVIEW Data\builds\Sequenzer\Sequenzer2.0.exe\com_lv_sequenzer\trunk\Sequenzer_Functions.llb\Seq_Connect_to_Database.vi</b>
    Built Application or Shared Library (DLL): Make sure all dynamically loaded VIs were properly included in the build specification for the application or shared library.
    LabVIEW Real-Time: VIs built into executables cannot be accessed through VI Server calls. Use Source Distributions to dynamically call VIs on Real-Time targets.
    The vi Seq_Connect_to_Database.vi is included in my built (as you can see in the attached screenshot and as it has always been).
    Do you have an idea of why it is not working anymore?
    Thanks a lot in advance!
    Dario Cassaniti
    Solved!
    Go to Solution.
    Attachments:
    sequenzer.png ‏86 KB

    OK, here is where I am confused. You talk about including the llb in the build, but in the screen shot you show a bunch of individual VIs being included. Next, in source file settings where are you telling the app builder to store all those individual VIs? Because they are VIs LabVIEW will, by default, want to put them in the executable somewhere.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Open vi reference conversion from Labview 6 to Labview 2014

    Is there a way that someone can help me convert this VI written in Labview 6.1  so that I can work en EXE in Labview 2014.
    I succed to open this vi from 6.1 to 2014 but it does not run. The open vi reference those not work in exe program. Someone know how I can  replace that function...
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    to convert 2104.zip ‏17 KB

    Error 7 is File Not Found.  So your dynamically called VI is not in your executable.
    In the build spec for the executable in your project, there is a section for "Source Files".  On of the options for the VIs is "Always Include".
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Open vi reference by string in executable

    Hi all,
    Scenario: A top-most vi (main.vi) calls two subvis (subvi1.vi and subvi2.vi) separately such that they run in parallel. subvi1.vi has a front panel that appears when called, subvi2.vi does not.
    subvi2.vi uses Open vi Reference to get a reference to subvi1.vi. It then uses this reference in a loop and continually polls the property FrontPanel.IsFrontmost to determine if the front panel of subvi1.vi is frontmost. When it is frontmost, it performs certain actions. When it isn't frontmost - it doesn't.
    This all works great in the development environment, but as soon as I build this 'scenario' into an application I get the following error:
    subvi2.vi is generating the reference to subvi1.vi using the string "subvi1.vi" as an input to the path terminal of the Open vi Reference function. Why does this cause problems in a built executable?
    P.S. Clearly this scenario is actually a part of my much bigger project, hence I don't have any simple vi's to attach 
    Message Edited by Thoric on 04-27-2009 01:06 PM
    Thoric (CLA, CLED, CTD and LabVIEW Champion)
    Solved!
    Go to Solution.
    Attachments:
    crash.jpg ‏28 KB

    Thoric wrote:
    Norbert B wrote:
    Thoric,
    it's disturbing that LV is crashing on your system due to this error.  What version of LV do you use?
    LV 8.6.1 at least (i don't know which version was the first one) creates the following error:
    LabVIEW:  Open VI Reference no longer matches VIs in memory by filename. A filename is no longer sufficient because the full name of a VI now includes any owning libraries.
    This error occurs even in the developement system.
    I asume that the crash itself is created by handling of invalid references.
    hope this helps,
    Norbert 
    Norbert,
    I am using LV 8.6 (not 8.6.1). I am using strings to identify vis, not paths. I believe the error you are encountering only relates to using paths for referencing vis.
    If your assumption is correct and my crash is due the handling of invalid references, then I need to generate a path to the vi, rather then using it's name. But generating a full (non-relative) path might be tricky? If within subvi2.vi I use the 'current vi's path' function and strip it to determine the executable path, then add subvi1.vi, should that get me the path to subvi1?
    THis really depends on how you did your build. If VI1 ends up as dynamic file vs part of the app, the paths will be different. Easy enough to check. Look at where your exe is and figure out if VI1 is there in the support/dynamics. If not it is probably inside the exe to the path would then be "My.exe.VI1.vi".
    But I am speculating thats the issue so try to get more info.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Open VI Reference Function in an Executable

    Hi All,
    Is it possible to call a sub-VI (which within itself calls other sub-VIs not included in the executable source files) from an executable (LabVIEW 2011).
    I have no problems calling the sub-VI via "Open VI reference" when runing the main vi as is. As soon as i build the execuable, search for the intended subVI the exe"looks for a few items" then stalls.
    The subVI controls a few comports, and prompts the user to take some actions. The SubVI requires an input from the Main VI and when completed outputs a cluster of for the Main VI to continue.
    Solved!
    Go to Solution.
    Attachments:
    vi ref.png ‏3 KB

    Hi All,
    Firstly the main error was "1031 ~ VI Reference type does not match VI connector pane."
    Secondly, the subVI had a dependency on "Space Constant.vi" which is stored in the vi.lib, The Main executable did not have "Space Constant" in its vi.lib.
    SOULTION
    1. Added a "space constanst" to the executable project.
    2. Ensured that the Refnum type was not "strict" (also ensure refnum matches VI pane)
    becuase I am using a cluster, if the main cluster changes for any reason, you must update the inputs and outputs of your subVIs. This was achieved may making the cluster a control type def. However, because some subVIs are independent from the main, I have to ensure I use the lastest controls when building independent subVIs.
    This allowed me to run the subVI.
    Thanks.

  • Open vi reference problems in labview 7 after building an application

    I have a vi with an Open VI Reference vi in it.
    This works fine. But when I build an application of it and run the vi it gives problems.
    I get an Open VI Reference error. Why?

    If you have strict typedefs for the dynamic loaded VIs you need to include the line "BldApp.RemovePolyVIsandTypedefs=False" into your LV ini file. See this discussion.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Does "Open Vi Reference" work differently in 8.5 if a string input is wired to vi path?

    SO I was reading the upgrade notes to labview 8.5 and I noticed a change in the "Open VI Reference" function.  In 8.2 you can simply wire a string of the vi name to the vi path input of the function, and labview will open a reference to the vi already in memory.  But in 8.5 the relative paths have to be the same. 
    So say I have a vi in memory called window.vi.  Its real path is C:\test\window.vi.  And let's say its already in memory and its reentrant so I can call it by vi server.  I used to be able to just pass a sting containing "window.vi" to the vi path input of "Open VI Reference."  I like to do that because I already know the vi is in memory, and it is a big pain to get all the relative paths right between developement and deployed executable.  This way I don't have to worry about getting dozens of relative paths right for a bunch of support vi's when I build an installer.  Does this mean if I upgrade to labview 8.5 I'll have to change this every single place I did it and then rebuild every installer to include support vi's with relative paths to the exe that are the same as their relative paths to the main vi in the development environment?
    -Devin
    I got 99 problems but 8.6 ain't one.

    Well thank god for that.  It is too bad the upgrade notes give no mention of how this impacts the executable environment, since it certainly seems like the executable the biggest and most likely part of the impact.  I bet you'll still have a ton of people with relative paths that are wrong in the installed executable but right in development environment.  Previously they would have worked even though the relative paths were wrong, but now you'll see errors.  By the way, what will happen if they have a relative path in the development environment but in the installed executable they compiled all their vi's into a single exe.  Will it error?  Do they have to rebuild with those vi's included as support files?
    tst,
    Check out the notes.  I don't know if there is enough there to understand or misunderstand, but I get nervous when they say stuff like this.
    Open VI Reference Function
    In LabVIEW 8.0.x and 8.2.x, if the name of the VI from the vi path input
    matches the name of a VI in memory on that target, LabVIEW returns a
    reference to the VI in memory and LabVIEW does not load the VI specified
    in the vi path input. In LabVIEW 8.5, if the name of the VI from the vi path
    input matches the name of a VI in memory on that target but the paths
    differ, the Open VI Reference function returns an error.
    Message Edited by billings11 on 09-05-2007 01:01 PM
    -Devin
    I got 99 problems but 8.6 ain't one.

  • Open VI Reference

    I have built an application with LabVIEW 7.1 and I randomly get Open VI Reference errors whey I dynamically load VIs. The application I created loops on a series of VIs, dynamically loaded them as they are called. The problem is that I randomly get the Open VI Reference errors even after executing a series of evens for 85 times. That means the dynamically load vi worked 85 times prior to getting an error.
    Attachments:
    Error 1124.jpg ‏202 KB

    I think it will be impossible to help you without seeing your code, but I would start with some code that will document what happens when this error occurs (what path you're using to call the VI and so on). That will make it much easier for you to troubleshoot.
    Additionally, you can try searching this site for the error. If you go to the top of the page and put 1124 in the search box, you will get several results (like this, for example).
    Try to take over the world!

  • Open vi reference in executables

    My application requires to run two sub vis in parallel , Even though the VI is running the executable is showing reference.
    I am using open VI reference to open the sub vi from the main vi
    please reply..urgent

    I guess your problem is related to the vi path. You should create some indicators for debugging. One indicator for the path, and some indicators on the error output. Then you can build your aplication for testing.  
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Dynamically called VI becomes broken inside an executable. Error 1003 from "Open VI Reference".

    Here's the problem. Dynamically called VI becomes broken inside an executable in debug executable mode Error 1003 is occuring from "Open VI Reference" Block. The computer has all of the necessary drivers, NI-VISA and NI-DAQmx. This executable is a new release of software that currently works on the PC in question. I can using NI-VISA Remote Server control the instruments from my PC using the executable. But when I put the executable on the PC I am getting this error. The only way I have been able to get this to work properly is to build the executable from the console I believe the project was created in, note that the project file has been moved to a network drive and it still works. All of the stations I have opened the project in show the VI that is being called is runnable. I've tried building the executable from the console I am deploying to and the same thing happens.
    I am honestly at a loss for ideas why this is occuring. Is this something about the way LabView works internally that may be causing this problem?
    I have trolled this forum for idea's and none have made sense to me.
    Any input would be greatly appreciated.
    -Nate

    Two ideas:
    Mass compile the project to ensure all linkages are ironed out
    Include the dynamically launched VI's into the "Always Included" section of the build spec
    Report back on if either of these actions solves your problem.
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

  • LabVIEW 8.6.1 Project causes slow Open VI Reference

    I have an odd problem with "Open VI Reference.vi".
    Case 1.
    Open  LabVIEW project containing "Main.vi"
    Open "Main.vi"
    Run "Main.vi"
    Execution of "Open VI Reference.vi" take about 2,000ms
    Case 2.
    Open "Main.vi" - No LabVIEW project open
    Run "Main.vi"
    Execution of "Open VI Reference.vi" take about 100ms
    I converted the project to 8.5 and the problem goes away. I don't have any machines with 8.6.0 to test if this is an issue with 8.6.1 only.
    Has anybody else seen something like this?
    Solved!
    Go to Solution.

    Good catch on the type def. It turns out that this is also key to the problem.  I cleaned up my example VIs, removed the Type Defs and OpenG VIs. When I ran the cleaned up VIs the problem went away. So, I added a simple type def back to my called VI and the problem was back.
    You misunderstand the reason for including gmath into the project. This has nothing to do with the time to load the project from disk. The problem is slow execution of "Open VI Reference.vi" when opening VIs that contain TypeDefs that are in large projects. By including gmath I was able to create a large project without attaching extra VIs.
    Open Reference Test - No Project: 11 ms
    Open Reference Test - small Project: 105 ms
    Open Reference Test - large Project: 753 ms
    Code in Zip file is LV2009
    Message Edited by Gleichman on 08-21-2009 06:36 PM
    Attachments:
    Open Ref Test - II.zip ‏62 KB

  • Labview executable does not open excel...

    i just compiled labview code into an executable and when i run the executable, it does not open an excel document like it is supposed to.  it opens the excel program, but not the specific file stipulated in the code. the problem only exists on one of my computers.  the "problem computer" is being set up for the first time to run labview executables.
    thanks in advance for the help.
    Erik

    That is probably the reason.  Microsoft is notorious for the way they change their activeX components between office versions.
    At the minimum, you need to install the LabVIEW runtime engine on the other PC.  It needs to be the same version as the version of LabVIEW you developed in.  You can either search the NI website and download and install the run-time engine, or you can create an installer for your application from the development PC that will include the run-time engine.
    You may need some other run-time engines such as VISA or DAQmx if your application is using any of those functions.

  • Error 7 occurred at open vi reference in New Report.VI

    Hello!
    I use the report generation toolkit on LabView 7.0 to create a report in Excel. The program works fine until I make an executable version. I the get the error:
    Error 7 occurred at open vi reference in New Report.VI
    I use the New Report.VI, Bring Excel to front.VI and Save Report To File.vi
    Can you pleace help me!!!

    Most likely, you did not include the required libraries in your build script. When building an executable in which you use the Report Generation Toolkit, you must include the _Word Dynamic VIs.vi from _wordsub.llb and _Excel Dynamic VIs.vi from _exclsub.llb as dynamic VIs on the Source Files tab.
    Check this article for more info.
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/86256a47004e16d186256a84004cb883?OpenDocument
    Daniel L. Press
    PrimeTest Corp.
    www.primetest.com

  • Open VI Reference for a Project Library VI

    Hi,
    my code calls some subVIs by reference by using "Open VI Reference" and "Call by Reference" VIs. Now, "Open VI Reference" expects a path to the VI:
    When the SubVIs sit in the same folder as the calling VI, it is easy to simply supply the name of the SubVI. However, I would like to call a SubVI that is part of a project library sitting somewhere else on the disk. I could give the relative path, but this make the code pretty inflexible and if the relative path changes all the paths would need to be ammended. Ideally, I want to utilize the fact that I am using a project library. The help for Open VI Reference states that
    vi path accepts a string containing the name of the VI that you want to reference or a path to the VI that you want to reference. If you wire a name string, the string must match the full delimited name of a VI in memory on that target. If you wire a path, LabVIEW searches for a VI in memory that you previously loaded from that path on the same target.
     I thought that the underlined path was my ticket and tried something like this:
    but this did not work and I got
    "Error 1004 occurred at Open VI Reference in MainVI.vi:
    Possible reason(s):
    LabVIEW:  The VI is not in memory.
    To load a VI into memory with the Open VI Reference function, a path must be wired for the VI Path input."
    Wiring a path is not desirable as per reasoning above. Is there a way around the issue?
    Thanks in advance!
    Solved!
    Go to Solution.

    tst wrote:
    That should work, but you have to pay attention to something that's stated both in the help and in the error - if you use a string, the only way for LV to know what to access is if that something is already "in memory" (sometimes also referred to as "being loaded"). In the case of standard libraries, that means the VI itself or one of its callers has to be loaded. In the case of classes and XControls, loading the library (as in having it in an open project) should be enough to also load all of its members.
    Hm, thanks, I am not advanced enough to know about classes and XControls, but I will check it out. My VIs are part of a library but obviously don't get loaded because, as you said, all their calls are dynamic.
    tst wrote:
    What I usually do is use a static reference to a VI to get its name, because that ensures that it will be statically linked, included in executables, etc. That might not work for you if you want dynamic loading and then you will need to use some other means.
    Hm, this actually gives me an idea! I could add an enable input to all these dynamically called VIs so that the logic runs only when enable is ON; otherwise the VI is called but does nothing. Then I call the VI first statically with enable=OFF just to load it in memory and then proceed with my dynamic call. A little ad-hoc, but should work and serve my purposes, I think.
    Thanks!!

Maybe you are looking for

  • Import from internal table

    Dear Experts, I need a solution for importing from an internal table. Two variables I_EXP01 and I_EXP02 containing an xml stream have been exported to the database using the following syntax and depending on the size of I_EXP01 and I_EXP02 two or mor

  • Error 500 in Email body sent by BPM Task

    Hi All, We are sending an email notification with task payload whenever a task is created by configuring Notification properties associated with a task in BPM 11g. The emails are going fine for individual emails but when we are sending the email to a

  • Still pictures lose resolution when transition added?

    i'm making a slideshow in FCP using still pictures. when i add a disolve, or key frame a crossfade between two pictures the pictures lose their sharpness/resolution. the last frame before the dissolve ends the picture remains sharp, but as soon as th

  • Duplicates in the target table.

    Hi, I am working on ODI 10. In one of my interface when ever I executes there are some duplicates are coming to the target table. Say if the count of the rows around 5000 in the source table and in the target it would be around 120000. Even after usi

  • Sort array in respect to time

    Hello, i would like to know how to sort an 2-D Array or an Multicolumn Listbox. My first column is the the time column. The second column is the Event column and  the third column is the Switch column. I know how to sort a 2-d array or an Multicolumn