Jump to content

Recommended Posts

Hi everyone!

I'd really appreciate your help with this. I'm trying to write a program that will find all the VIs that are open in the LabVIEW development environment (even if they are different application instances) and analyze their front panels and generate a report about them. I wrote a quick VI just to get started which will tell you the number of controls on the front panels of all open VIs. The problem is that it doesn't work when I build it into an executable. When I run the executable, instead of finding all the VIs open in the development environment, it only finds itself. I attached the code I wrote so far. Could anyone tell me what I how I could make this work from an executable? Thanks!

--Hope

VI Logger.zip

Share this post


Link to post
Share on other sites

You need to provide the Application Open function with an address and port number to connect to, otherwise it will simply connect to its own instance, which is why you only see the VIs in your executable.

Share this post


Link to post
Share on other sites

How can I know the address and port number to connect to? Is there a standard one for the development environment or is does it have to be configured specifically? Because ideally, I'd like to be able to just run this on any computer and have it work without going in and configuring something on each computer.

Share this post


Link to post
Share on other sites

The address is whatever IP address the computer has on which the IDE runs, or localhost if it is on the same computer. The port number is configurable in the LabVIEW Options, and you need to enable the TCP/IP interface to VI Server in there too, in order for it to work (but if you ever have used VIPM to install some software package into LabVIEW, that is probably already enabled).

Share this post


Link to post
Share on other sites

Thanks, it worked when I did that (and also changed out the "All VIs In Memory" property node for the "Exported VIs In Memory" one because I guess the former isn't supported for remote). I guess that does mean I'll have to make sure all the computers I run it on have the same port configured in their LabVIEW Options, but I guess that's not too bad. Thanks for your help!

Share this post


Link to post
Share on other sites

Or you make your tool configurable with an address and port number for each one. Also notice that if you ever should have more than one version of LabVIEW on a computer you better give them each their own port in the configuration.

Share this post


Link to post
Share on other sites
1 hour ago, prettypwnie said:

Thanks, it worked when I did that (and also changed out the "All VIs In Memory" property node for the "Exported VIs In Memory" one because I guess the former isn't supported for remote). I guess that does mean I'll have to make sure all the computers I run it on have the same port configured in their LabVIEW Options, but I guess that's not too bad. Thanks for your help!

you can also use a service name with a port of 0. That way the actual port won't have to be fixed just the name.

http://zone.ni.com/reference/en-XX/help/371361M-01/glang/open_application_reference/
("port  number or service name" section)

http://zone.ni.com/reference/en-XX/help/371361M-01/lvdialog/vi_server_config_options/
("port", "service name" sections)

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.