VI to determine the name of the project

For a real-time application, I wanted to determine, at runtime, the name of the project in which the VI has been "content".  I wanted to get the name of the project (even) under four different conditions:

  • on the host, in development mode
  • on the host, in Run-Time mode (i.e. after being built as an executable)
  • on the goal of RT, development mode
  • on the aim of RT, in run mode.

It is not so easy.  I figured out how to make the first two (use the name property of the active project development and use the next last folder directory of the Application in Run-Time mode mode), but I'm having trouble to get this information to get the target RT code.  Has anyone tried this before?  Did you?  Advice (or even downright Solutions)?

Bob Schor

Well, I figured out, but it's not pretty.  In the previous post, I explained why I wanted to do - here I will explain how I did this.

There are three main modes, under which Applications can run: development mode (when you are programming in LabVIEW and press the button "Run"), Run Time System (an executable on a PC) and Embedded (code that runs on a target in real time, in the form of executable file or development).  Of these, only one mode of development gives you access live (via the Application, the active project property) in the name of the project file.  My goal is to have the user interface and the RT 'chunks' of the project in real time have access on behalf of the project, the system I'll create will use same code on two subsystems, meaning that it will run on the PC at least once in the mode of development .

The key step is to create a 'constant VI', I'll call CONST name of the project, which consists of a single indicator of string, name of the project, which "held" the name of the project.  I initially thought to use a Global Variable, but there is a technical problem with that I will mention later.  I didn't use CONST name of the project directly, but, instead, use a 'Get the project name' VI that has, for its single release, the name of the project.

This VI, when it runs, determines the type of request under which it is running.  If it is something other than the Mode of development, he calls CONST project name and returns its value.  If this is the Mode of development, it gets the name of the project, he returned, but just before leaving, he arranges to be updated programmatically CONST project name when it is called in the future, it will return the name of the project (update).  [Then why not simply initialize CONST project name?  I'm looking for a "generic" solution that will always return the correct value, even if I move to another project and don't remember about the change and change - all I have to do to make it work is to run once in the mode of development.  Who has ever developing code without testing before making the executable?].

I wrote a VI gave the name of project Save, which does the following: he calls set the timer on CONST project name to define the name of the new project (this works even if we put an indicator), calls to use current default to make the new value "stick" and called "Instrument to save" to save the changes.  The problem is that CONST project name cannot be "running" in the State to use current default work without raising an error.  If the name of the Save project is simply called as a Subvi to get a project name, it will be in the State of operation as it is used in the case of non-development mode to get a project name.  The solution to this witch hunt is to use the asynchronous call with-and-Forget 'spawn' name of the Save project.  Finally, we modify register project name so that it starts with a loop "wait", examinging the State of execution of CONST name project and waiting for it to exit the executing State, indicating that it is prudent to make the change.

Phew!  But it works!  Oddly enough, when I tried this using a Global Variable instead of my Constant VI, I kept getting errors during execution are currently lacking, but despite the mistakes, the code seemed to run correctly.  I found an article (written for LabVIEW 5!) explaining that it was expected as Globals behavior were always in the State of operation.  Actually, I just realized that I had not tried with the call-and-Forget asynchronous schema, then perhaps a decade later, LabVIEW will allow me to do this using a Global without raising an error...

BS

Tags: NI Software

Similar Questions

  • Bounce output file names do not correspond to the name of the project

    It must be a common scenario. I started a project called "forgotten Garden" and saved the project. Later, I decided that I wanted my song to be called "Voice of the forest" instead. So I renamed my project (File-> management-> rename). When I made a rebound, I expected the files .wav and .mp3 of exit named "Voice of the forest", but instead, they retain the old project name lost Garden.wav and Garden.mp3 lost. Is this a bug? I use Logic Pro X 10.2.4.

    Yes, I have seen this also.  File a bug report.

    http://www.Apple.com/feedback/Logic-Pro.html

  • Changing the file names of the photos used in the projects final cut express

    HI, I have a lot of pictures that I've used in some express HD projects final cuts.

    File names are not descriptive file name convention, but just standard camera. I want to add descriptive names, which will come out in the finder, but I don't want to damage the projects that I have created. I guess I could change one by one and tell the system where each file. But is there a better way? Thank you!!

    If you change the names in the Finder, all clips in your projects will lose the path of the file and you will have to redo the link.

    Changing names within the CTF will work OK but will not appear in the Finder, probably it will not work for you.

    I suggest you set the browser to display a miniature clip of the photo, that is maybe a solution to easily identify clips.

    Al

  • Update i-movie terrible!  Cannot remove rejected Clips.  Create and name the project issues.

    Someone has any idea how to remove rejected in the new update to i-movie clips?   Very difficult now to create new projects and name them.  Never wearing a name for the project.  Project tab does not.  Go to the projects through the tab of the window, and then go from there to the area of projects.   There is that an i-movie update just gets worse every time, and for the worse.   I don't think that people never updates actually use the product.

    See if that helps. (1) to remove the clip selection rejected rejected in the context menu above the media window. Right-click and choose Remove. (2) to create a new project click on project button on the top left of the window. In the projects list that appears click on create new and pick the movie. When the editing window opens it will say my default movie. Click the projects button again and you will be asked to name the film. You can also go ahead and edit your film add clips, etc. and if you share, you will also get an option to rename. At any time, you can go to the project and in this window button rename a project. I don't know what you mean by project tab does not. If you want to say, it does not appear or is not functional then launch iMovie, hold down the command and option and choose to delete the preferences. See if that fixes the project tab.

  • Is there a way to determine the equivalent ANSI C code of a Labview project?

    I'm a complete newbie to Labview.  I have this quite complex Labview project that was used to create a DLL that matlab may call to order my card PCI-6534 without having to know NIDAQmx calls.

    I am trying to find how to make these calls directly from Matlab NIDAQmx, but I do not get the same results when I call this DLL mentioned above, so I thought I would try to give a sense Labview projects live I begins to make sense of the general economy of the screw, but I would like to be able to run the project , step through it and perhaps see NIDAQmx orders (or something equivalent, so I can determine how to call NIDAQmx commands in Matlab).

    Is this possible to do?

    Thank you

    Jason

    Yes. The toolbar allows you to turn on highlighting so that you can run the VI and see the content of the son. You can put sensors on the wires. You can single-step through the code. This is explained in the help of LabVIEW under Fundamantals-> running and debugging screw-> Concepts-> Debugging Techniques.

    In what the question implied in the title of your message, don't you can directly convert LabVIEW C code in the development environment. Yes, there are tools to convert LabVIEW in C, but which is intended for microprocessors.

  • Determine the name of class LVOOP? d ' a class of child...

    Hello

    I have a number of modules (classes) that inherit from a base class called "Module".  I have all these in an array of type 'Module', I would like to save some information of each of these modules, but I need to make the distinction between each module.

    Is there a way to determine the class name of the data cable?

    Can I use the flattened string Variant, but I was wondering if it had built in property for this node/function?

    Thank you
    Jonathan

    Examples of joint:

    Malkieri,

    There is no generation in function that does exactly what you are looking for, but you can use the 'Get LV class Path' VI to return the *.lvclass of an object path given.  Using this way, you can either parse the name, or you can use Server VI to get the name of the class, as shown in the picture as an attachment.

    Chris M

  • In visual C++ 2010 Sudio type a name of boot file is error message like characters * / etc. can not be used when I don't use in the name of the project

    I create a new project in the projects and Solutions (C++) as Console Win32 Application. I enter a name for the file as proposed game and the project

    an error because there seems to be some included characters that are not allowed.  WHY there is not?

    I would say it is more lilkely a question for http://social.msdn.microsoft.com/Forums/en-us/vcgeneral/ programming forums

  • Why some items in 'Open an existing project' have just the name of the project and others have access to the entire file path?

    I have SP1 2012 LabVIEW and on the main screne of LabVIEW selecrt "show projects".

    Why some elements of 'Existing Open' (project) have just the name of the project and others have access to the entire file path?

    Examples of two lines in the list of projects.

    Ping.lvproj (with a path: C:\Users\mlevine\Documents\MPCE EQT\EQT Software\Ping.lvproj)

    C:\Users\mlevine\Documents\Common package Mission trainer (CMPT) \SUW Surface Warfare\Weapon permission Panel (WAP) \WAP LabVIEW Software\WAP fire authorization server 28 April 2015

    No chance, it's because I made a copy of this software and stored on a network drive power off and it went out of this network drive?

    So if LabVIEW sees two or more versions of the same software, he decides to use the name to differentiate between full path?

    I'd still rather it shows just the name of the project and if you hover over the name it shows the full path.

    Thank you

    Mark

    If you have opened a project of the same name from a different location, it is when it shows the full path both - in this case showing just the name of the project would not help because it would be the same thing!

  • Determine the file name lengths

    Is this possible in Windows 7 to determine the length of the file names in an old and its subfolders?

    I tried some freeware programs that are supposed to do, but with not much luck.

    Thank you

    Sounds like pretty simple job for someone who knows how to write scripts that run in Windows, in something like Visual Basic.  Until this person comes to help here, I will mention that a method I've found is to go to the desired folder, copy the filepaths of the elements there, paste into an Excel sheet and use formulas to deal with the results.

    More details: when opening the file (or do a search in this folder), click on organize, click Select all, press on and hold down the SHIFT key and right-click on any file name, click Copy as path, go to an Excel spreadsheet and paste it into cell A2 to display a column to fill with paths.  Because we want to count the characters in the names of files and no paths together, we have a few delicate manufacturing formula Excel.

    I did the labels column for cells A1 to E1: entirepath filename extension namelength pathlength.  B2 E2 to cells contain these formulas:

    B2

    = IF (ISERROR (FIND("\",A2)), A2, RIGHT (A2, LEN (A2) - FIND ("|", SUBSTITUTE (A2, "-","|", LEN (A2) - LEN (SUBSTITUTE(A2,"\",""))))))

    C2

    (= IF (ISERROR (FIND(".",B2)),"", RIGHT (B2, LEN (B2) - FIND ("|", SUBSTITUTE (B2, ".","|", LEN (B2) - LEN (SUBSTITUTE(B2,".",)))) "" ")))

    D2

    = LEN (A2)

    E2

    = LEN (B2)

    Note that the namelength will include characters from file extension, or at least it did for me: I always keep the setting to display the file extension in Windows.

    For all information from production lines according to the formulas, select cells B2 to E2, copy, select the cells on the lower lines of the C2 at the last line with a filepath showing and paste.

  • Change the name of the project that is used on the server of RoboHelp for reactive HTML5

    I use Adobe 2015 to publish Responsive HTML5 in RoboHelp Server 10.

    When I publish the project, it seems to name the file, the name of the project. So, if my project is named Cool_Blue, he the published under Cool_Blue. Is anyway to change this name? I know that WebHelp Pro you can set the name differently. I've looked everywhere and can't find how to do, so any help would be appreciated.

    Thank you

    Nita

    Nita, I think what you're trying to do is change the name of the project in a shorter file name while in general, you will have the shortest paths. If this is the case, you must simply renaming the project, then delete leftovers from the project a longer name on RoboHelp Server and you are home free.

    So, if you want to change the name of the project (rather than the name in the 'bar' of the browser, you must change the project name by going to > file > rename project)

    This alert appears:

    This s a warning reminder that to publish a project renamed on RoboHelp Server, you should remove the other oldest and republish the newly appointed project.

    So looking at your screenshot posted previously, the CIE would be to use sensitive available, but it could appear as

    Name: CIE Type: Responsive HTML5 Date of publication: etc. You should not "WebHelp" version if I understand what you're trying to do.

    Please ignore all the following stuff if the question is already answered

    I add the following text because there was some confusion because of new workflow in RoboHelp 2015 and the new RoboHelp Server 10.

    With regard to the "naming" confusion I'll try to decompress it. There has been some changes in the publication of things since the release of RoboHelp (2015) and, now, RoboHelp Server 10. For example:

    1. What we once called "Single Source Layouts' (SSL), we now call for 'outputs (SSL).
    2. It used to be that if you have been published on a Server of RoboHelp, it was mandatory to use an exit called WebHelp Pro.
    3. WebHelp Pro is still alive and well and can be used to publish in RoboHelp Server 10.
      EXCEPT when you want to publish sensitive HTML5 content to the new RoboHelp Server 10.
    4. In this case, if you post the more modern layout Responsive HTML5 option, it is appropriate to use a sensitive of HTML5 (SSL) output and select a HTML5 compatible screen available in the Pod to set up output.

    Here is an example of the Responsive HTML5 dialog box:

    Looking at file names more far, here are a few file names and how they are used:

    The. WP is the control file XML that contains specific information about the required information by the RoboHelp Server 10

    The xpj is the name of the project. It is what appears at the top of the editor of RoboHelp:

    Nita, let us know precisely what you are trying to accomplish and we will take another crack at it.

    Thank you

    John

    John Daigle

    Adobe Certified RoboHelp and Captivate instructor

    www.showmethedemo.com

  • How can I sort my media file name of the project "icon view"?

    Hi all. I am trying to sort my media in the 'Project' Panel while displayed his point of view 'icon' file name and it's not working (I am running first Pro CC on a Windows 7 machine).

    I can sort very well in the project "List View" of the Group (by clicking on one of the headers, which is on the file header), but once I have switch back to "Display the icon" they lose their sort order (they seem to come to some sort of 'disorder' of the thing...)

    I'm sure that my files are already sorted by file name when I click on the import button and access to view of Windows Explorer, but it does not help either.

    Any suggestions? Thanks to you all.

  • Determine the name of the model of service tag

    I just bought a used laptop in VAIO, but the model name label is worn to the point where some characters are unreadable. Is it possible to determine the name of the model ther service tag or serial number? Thank you.

    Hello.

    The Sony eSupport Section of the Support will help you find the model number of Sony VAIO laptop

    If my post answered your question, please click "accept as a Solution.

  • How to move the column label to the right of the column name in the project Panel

    How does a gesture the column label in the project panel to the left of the name to the right of the column name column... machines windows can do this while the macbook pro (3 of 3) this is impossible...

    I still want the opportunity to bring him here where he was.

  • Name of the project in touch for Android

    Maybe I'm missing something, but when you start a new project, saving a project or save a copy I don't seem to be able to name the project.

    How can I do this?

    In the interface of project selection, simply click on the name of the project. PS Touch should then invite you to rename.

  • How to determine the name of the Cluster?

    Version of the grid: 11.2.0.3 on Solaris 10

    When we start to install the grid Infrastructure, we specify a Cluster name.

    Question1.
    How can I determine the name of the cluster to a RAC 11.2 Cluster? We maintain an inventory of DB. For each cluster, we specify the name of the Cluster. This is why we are asking the name of the cluster.


    Question2.
    The name of the cluster is without functional importance. Right? I don't remember using the Cluster name in any order (srvctl, crsctl,...)

    To determine the name of the cluster,

    [oracle@iron1 ~]$ olsnodes -c
    ironcluster
    [oracle@iron1 ~]$
    

    I wouldn't say it's very technical significance, even if it is used as a default value in a few other names.
    --
    John Watson
    Oracle Certified Master s/n
    http://skillbuilders.com

Maybe you are looking for