VI static references in an application using

Hello to you all, useful forum fans!

I use 4 different static references of VI hung directly to "Run a VI" invoke nodes, with the waiting "until" and settings "Auto have Ref" both false, run the four screws dynamically, which each does nothing except call my serial port returning from input/output VI with a different index of COM port number.  Overall it works pretty well.  However, I have a few questions concerning the improvement of my installation.

(1) is it possible to somehow set an input parameter to the serial port environment VI and thus be able to invoke it directly four times in a loop for, each with a different input value?  I don't know how I would do that, except that I heard that you can set the value of a control on a VI by using a reference to it.  I also fear that the use of the same reference VI static to invoke the VI 4 times somehow re - start the same instance of dynamic VI 4 times, instead of spawning 4 copies of it.  However, this solution would allow me to remove the 4 screws that do nothing except call the reentrant VI, and my code would be simpler and more extensible (e.g. making it easy to interact with 8 ports in the future series just by increasing the number of for the iterations of the loop).

(2) it seems to be necessary for me to add the 4 screws that I dynamically invoke in my lvproj file and add to the section "Still included" my generation of application properties in so that they can be included in the executable file of my application.  It was what I had to do in previous versions of my code when I've referenced via a path on the screw name, but now I've changed using static references of VI, I thought they would be included automatically.  LabVIEW already knows to automatically load them into memory (for example, when I do a search it finds them even when they are not open), and they are included in the list of dependencies in the LabVIEW project, so why they would be built to my executable?  I would prefer not to have to add explicitly, as it is one thing to forget if I change it in the future.  Is there a setting or something somewhere that I can change so that they will be included in the executable file automatically?

I thank very you much for your time and your help as always!

-Joe

Hey Joe,

Answer to Q1: Yes.  Wire one '8' (type of data I32) entry 'options' function 'open VI Reference.  This indicates 'Reference open VI' that the VI is re-entrant.  It will look like this:

Use the resulting table of references to follow your screws laid throughout the rest of your application.  Don't forget to close them when you are finished with them.

For the 2nd quarter... I certainly built executables by using code similar to what I show above and did not have to explicitly include the screw called statically in the build.  You're right, they should be automatically included in the compilation - mine were always, including modules that reside in a different lvproject (called by a main control VI).  Sometimes I felt it necessary to develop modules in a lvproject and then call them from different main screws that reside in other projects.  If I used a static reference, they are always included.  What LV version do you use?

Tags: NI Software

Similar Questions

  • How to use a static reference to maintain a VI in memory, but then call it in parallel?

    Hi all

    I have a MainVI and I want to call him a Subvi in parallel so that I can have both windows open and sensitive at the same time.  The Subvi can be closed and then reopened any number of times, but only one in existence at the same time.  I know how to do it using the reference VI opened, offering a path relative to my Subvi, check to see if its already running and if so bring window to front (using front panel: open with entries True/Standard method) and if not run it using the Invoke method: Run (and eventually open its façade by program).  This method worked very well.

    Now, I've added functional global variables in my Subvi, and I want to keep in memory inbetween opening Subvi window.  I can do this by placing a copy of the functional overall in my MainVI, even if I do not here for nothing.  It works very well.

    By chance, I came across a reference to a static reference of VI, which resembled a great improvement in my method, for the following reasons:

    1) Subvi keeps in memory all the time, eliminating the need to put the functional overall in MainVI when it is not used it.

    (2) tells the LabVIEW to include the Subvi when I build my executable, rather than me having to specifically mark as always include in the build specification.

    (3) eliminates the need to continue the path and the name of Subvi updated in a constant string in my code, in order to use the open VI reference.

    However, in trying to implement this solution, I ran into the problem that once you put a reference of VI in strictly typed static (strict typing is necessary to keep in memory) on the block diagram, that VI is reserved for execution.  This means that I can't run it using the Invoke method: Run.  I did not just put it on the diagram directly as a Subvi because I need it to run in parallel to the MainVI.  I searched through these forums extensively, and although there are several references to a static reference of VI, none of them say explicitly how to actually run this 'thing'!  : PEI

    I greatly appreciate any insight into my problem.  If I have to go back to the old way it works perfectly, but I really like the apparent elegance of this solution.  I hope that it will be technically possible, and I'm not bad understand something.

    Thank you for your help,

    -Joe


  • static reference with the global variable

    Hi, I used a static reference to a Subvi where I change a global variable before (3-4 years ago) and do not remember how I did it.

    It was something like these attachments, but now I'm using LabView 2013 instead of LV 8.6.

    The change in the overall operating system sees only not in the main vi (looks like the invoke node run vi does not work with globals).

    In addition the vi close with the invoke node close vi but not if I put the custom in the Subvi properties to automatically close.

    dkfire wrote:

    Why not call the sub vi as usual, just with the setting to display the front panel, when it is called?

    Use the connector pane to transfer the value of the sub vi Ok button when done.

    That's what I recommend.  If this is not possible for some reason, then you will need to use a flat Structure of the sequence to force the reading of the global variable after the Subvi is complete.

  • Static reference of VI VI reentrant

    Is it possible to use a static reference of VI to dynamically launch a VI on the way home?

    I found this old post, http://forums.ni.com/ni/board/message?board.id=170&message.id=120367, the user can find a work around, but it of ugly, isn't it

    The last snapshot in your link shows the best way to invoke an instance of a reentrant VI dynamically. The only thing I would change from that is to use the Name of VI property instead of the Path of VI property to wire open VI return. You can simply use the name of VI if the VI is in memory, which is more effective. Since you have a static reference of VI, the VI will certainly be in memory.

    I agree that it's a bit ugly. Personally, I created a Subvi to hide the ugliness and make him feel more simple!

  • How to upgrade your java application using Blackberry desktop Manager?

    Hi all

    How can I update an application using Blackberry Desktop Manager. ?

    because I'm not able to do this by using "Application loader" > editing Application in the Desktop Manager.

    If please suggest me some reference or guide in this regard.

    Thanks & best regards,

    Narendra.

    Did you change the version number? DM will not recognize the program as an update version number increments unless.

  • How to install or update the store applications using the dongle

    I don't have a wifi connection. I want to download or update applications on the store of windows in my pc. How can I do because he just waits for Wi-Fi every time I try to install or update an application.

    Hi Abhishek,

    Thanks for posting your question on the Microsoft community.

    Thank you for details on the issue.

    I also like the fact you want to update or install applications using the USB.

    I suggest you to connect your computer to the Internet using the USB dongle.

    You can refer to this article:
    http://Windows.Microsoft.com/en-us/Windows/Connect-Internet#1TC=Windows-8

    Without the Internet, apps will not install or update.

    You can also light updates automatic app.
    Reference:
    http://Windows.Microsoft.com/en-in/Windows-8/automatic-app-updates-help

    See also:
    https://support.Microsoft.com/en-us/KB/2800086

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • Need help, cannot set references to Photoshop.Application in VBA

    Hello

    I've used CS5 in the past and have had a VBA program works well (running in Access 2010) which went very well, open Photoshop 32-bit and controlled photoshop CS5 normally, allowing me to manipulate photos, read metadata, etc.  (It was my understanding that at least for CS5, programs including VBA script necessary to run the 32-bit version of Photoshop, not the 64-bit version).

    About 6 months ago, I installed CS6 and VBA program continued to work perfectly, as it always opens the 32-bit version. (I had to be sure that I was not running 64-bit Photoshop when I started the VBA program).  CS5 was still installed but not used.

    I just uninstall CS5, leaving CS6 installed.  For some reason, he left the program VBA disturbed in that the references (that you set in the window of the VBA code with tools > References) no longer seem to be valid.  I can't set a new reference to Photoshop.Application, and the program became unusable.  In other words, the "references" list is more typotheque Adobe Photoshop CS6 or Adobe Photoshop CS6 Object Library.  I've traveled to the C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit) \TypeLibrary.tlb file to add this reference manually.  The programs does not yet compile (for example, appRef As New Photoshop.Application Dim causes an error "User Defined Type not defined").  I get the same failure to compile if I search for and install a reference to the 32-bit version, C:\Program Files (x 86) \Adobe\Adobe Photoshop CS6\TypeLibrary.tlb.  In the past, I also had a reference to the 'Adobe Photoshop CS6 Object Library".  I tried manually to C:\Program Files (x 86) \Adobe\Adobe Photoshop CS6\Photoshop.exe or the 64-bit version of Photoshop.exe, but these files are not accepted and I do not otherwise know the location of the file from the object library.

    I so need help from someone who knows how to solve this problem in the transition of CS5 at CS6 to use VBA.

    Thank you

    EGibbon

    There are global keys which crushed with every version of Photoshop. Photoshop.Application gets for example set for each installation of Photoshop. When you have uninstalled CS5 these keys got deleted.

    You can install CS6 again? You don't need to uninstall. Just install again if it will let you.

    I have a script that wil set them, but I don't really like to use it on other machines of people as it messes with the registry and I don't want to make it worse for you.

  • storage of static content on the application server or Web server

    Hello
    Is it worth to separate the static content such as images, css on separate web server and application server.

    We use version10.0 of Oracle weblogic server.

    Please, share your experience.

    Thank you
    / Ashwani

    Decision to store static content on the Application Server or Server Web is dependent mainly on below facts.

    (1) total size of static content
    (2) frequency of use of static content
    (3) Machine accommodated for application server performance
    (4) the network speed between the Web and application servers
    (5) level of security of the information processing application and pages
    (6) is static content created on demand?
    (7) review delays in deployment and added additional efforts.

    Let me know, if you can understand this impact on decisions facts? another I'll spend the time to write more.

    Thank you
    Mahi

  • a static reference to a URL object

    I want to create a final static reference to an instance of URL:
    public class SomeClass {
      static final URL rooturl = new URL(stringA); // fail. an exception is thrown but not caught.
      ...
    }
    If I do not end rooturl, then it works:
    public class SomeClass {
      static URL rooturl;
      static {
        try {
          rooturl = new URL(stringA);
        } catch(Exception e) {...}
      }
      ....
    }
    I'm ok with the help of the solution of the static initializer block.
    But I would like to know how to create a final static reference to an instance of a class whose every constructor throws an Exception.

    I won't read all of this code, because it is irrelevant to the question I think you, and stuff on the newspapers and magazines is also irrelevant.

    Your first post properly reflected your problem, I think.

    public class Foo {
      private static final URL url = new URL("a://b.c"); // Your question is: What do I do if new URL() can throw a checked exception?
    }
    

    Here's the thing. When you say static private final URL url, you tell the compiler that the url variable must be assigned a value when your class loading. Now, as you saw, you can throw a checked exception to a static initializer, but that's OK, you can just wrap in the Unchecked exception, ExceptionInInitializerError, like I showed you. That's what this course is aimed at the:

    public class Foo {
      try {
        private static final URl url = new URL("a://b.c");
      }
      catch (MalformedUrlExeption e) {
        throw new ExceptionInInitializerError("Could not create URL", e);
      }
    }
    

    It is a correct approach. You have already decided that this value must be initialized at class load - your class requires time in order to do its job, or if you have asserted. So if the URL cannot be created, this class can't do his job, then he expected to fail to load.

    If you makes it not final, then your catch block can log the error, instead of throwing. Do you understand why? This is because the final member variables must be initialized before that code can go further. Throw the uncontrolled exception means that code is not go any further, it's legal. And for a variable not final, it is not necessary to have a value, then you can simply log in and continue.

    HOWEVER, suppose make you no final, record a message and continue. Now what?

    Your code continues as if everything is fine, when in fact, he's not fine. Catch the exception did not have the problem go away, and to raise once again does not, your code has no idea that something was wrong. So when you get to the point where you try to use the URL, you will get a NullPointerException. Then what? You catch that, record and continue as if everything goes well?

    Some point to actually deal with the fact that an error has occurred. Does not simply continue on as if all goes well. If you have one) offer some State assistance or operation that takes the place of the problematic code (almost never a good approach), b) again, or c) propagate the error to the caller and let him face (usually approach correct).

  • I have a new PC with Windows 10 Pro and I leave iTunes every time I gt the flollowing message. "One or more applications use scriping of iTunes interface. Are you sure you want to exit? "All help to stop this would be appreciated.

    I have a new PC running Windows Pro 10 and everytime I close iTunes I get the following message.

    "One or more applications use iTunes script interface. Are you sure you to quit smoking? -If you have nothing will close the application using the script interface and a 20 20 second timer starts. "

    I was wondering if someone can help me with a solution to this?

    What third-party software is running on your computer? Last.FM is one that comes to mind.

    TT2

  • Applications using the "MAILTO".

    My application is supposed to generate an e-mail message and put it in the Outbox.
    Version 12 Firefox stops with a Google search page with the MAILTO info in the search field.
    FF and TB are default

    This application has since worked on version 3 ff.

    No other changes have been made to my PC, two except version 12 of loading. Go back to version 11 and I have no problem.

    Perform a Google search, I see that applications using the option "MAILTO" is a big problem with Firefox version 12. See http://boardreader.com/thread/Firefox_and_Email_problem_9rc6X2c9zx.html as well as others.

    I reload the version 11 and I have no problem.

    I use Avast AIS (including malware/firewall software) on a PC & MSN MSE on another (windows 7 64) (both have the same problem)

    My MAILTO problem was finally fixed on June 29, 2012 Firefox version 14 beta 10 release.

  • What are the applications used in the IPAD pro video experience

    What are the applications used in the video to experience pro IPAD?

    Do not know exactly what video you want to say, but this site Web lists all the applications one by one.

    http://www.Apple.com/iPad-Pro/experience/

  • How can I develop an application using Bluetooth SD Card 2?

    Is it possible to develop an application using any kind of Bluetooth SDK available for WinCE?
    I need some information on developing applications on the PDA Bluetooth.
    Thank you.

    Hi Apollo

    I put t know what information you need exactly, but you'll be very happy if someone on this forum can help you. For most of the topics are discussions on laptops to upgrade and all the issues of the day, but application development...

  • Photo search does not work in the Finder, but done in Spotlight.  In addition, can not see the Photos in other applications using the media browser

    Below is a screenshot of Photos with photo with the name IMG_1758.JPG.  On top of the image is my Finder window you are looking for this image under "This Mac" with no results.  Below the resulting from the spotlight that does not show the result.  I have only one library of photos under that user.  Also, if I am in another application such as Notes, Pages, Numbers, etc., I can't search and find images in the Photos.

    The Finder doesn't show images in boxes including the photo library.

    To access images sin Photos from another application using the media browser, this article was written for iphoto but it pretty much the same for Photos. The first option is to look for.

    https://discussions.Apple.com/docs/doc-4491

  • When you subscribe to an application using a different email for your apple ID

    When you subscribe to an application using a different email from your apple-ID

    Will be the details of this figure yet the subscription to (and editable) under your apple ID?

    Im having trouble cancel the payment for the registration of an application (I think that's why) I used a name user ad nother email what is my apple ID.

    Can someone help me?

    Greetings Ninabnina,

    Thank you for using communities Support from Apple!

    From your question, it sounds like you subscribed to a service of an application using an in-app purchase. If this is correct, this in-app purchase or subscription would be bound to this specific Apple ID.

    Do an in-app purchase

    You can make in-app purchases in applications that offer.

    You must enter your password Apple ID to make in-app purchases. You have two options to password to choose from with in-app purchases:

    • Always demand: when you make a purchase, you will be always asked to enter your password, even if you are signed in with your Apple ID.
    • Ask after 15 Minutes: when you make a purchase, you will be asked to enter your password only once every 15 minutes.

    You can also configure Touch ID to make in-app purchases. Learn how manage your password preferences.

    If you have problems by performing an in-app purchase, make sure that your payment information is up-to-date.

    On in-app purchases - Apple Support

    If you think you can make the purchase with another Apple ID, you can connect to this ID and view your purchase history to confirm.

    See your purchase history in iTunes on Mac or PC - Apple Support store

    If you just need help the cancellation of the subscription, the following article will explain this process.

    View, change or cancel your subscription - Apple Support

    If you do not know what Apple ID the purchase or subscription was made on, you can try to have reported the problem directly to our support of iTunes Store by using the following link.

    Report a problem with an item purchased from the iTunes Store, App Store, Mac App Store, and iBooks Store - Apple Support

    If you still hit roadblocks, you can contact the iTunes Store support directly and they should be able to help understand this situation and get these cancelled subscriptions.

    Apple - Support - selection

    Have a great day!

Maybe you are looking for

  • Where is the button "Pocket for Firefox?

    I use Firefox 39.0 beta, but the Pocket button is not visible under Menu > customize. Subject: config, browser.pocket.enabled = true

  • Cannot open new tabs

    Or the shortcut I have always used (command-tab) or even by clicking on '+' on the title bar worked, for the past few weeks. The only way I can get a new tab to open is by clicking on the links. I checked and updated, I know how to create new keyboar

  • Re: Satellite M50: what is the difference between PA3451U-1BAS or PA3451U-1BRS battery?

    I have a Satellite M50 and I'm trying to find a replacement battery. The drum part # PA3451U-1BAS is original, but I can't seem to find that. I can find the same number with a suffix of BRS. The volts / amps etc. appear identical. The pictures make i

  • How can I find my hp/compaq laptop stolen that I just bought and received?

    To the right. I own a laptop brand new I've had with my aunt to help me Fund... I still against hepatitis a the reception, but I don't know what to do?  Should I call the police? Can I give the companies the serial number then can do with droids... c

  • Windows update unknown error 0X800B0100

    Original title: update windows Windows update unknown error 0X800B0100 I used the tool (KB947821) system update but it does not help and also I uninstall update no. (KB3004394) and it does not help Help me please >