Jump to content

How does VIPM set the VI Server >> TCP/IP checkbox?


Recommended Posts

Hi LabVIEW experts,

I have noticed that VIPM appears to automatically set this checkbox if it's the first time you've tried to connect to LabVIEW:

tcpip-checkbox.png.d413e9e3584cd6f691c4bd2f1738071e.png

This is good because without it, VIPM can't connect to LabVIEW and new users would be confused because nothing would work. (Although I'm not sure why this is allowed to do from a security standpoint - but it is convenient)

I would like to do the same thing in the MGI Solution Explorer, since we have the same problem. New users who are using it for the first time (and haven't yet used VIPM either) will get an error because it can't connect and will be confused.

Does anyone have any secret inside knowledge about how VIPM does this? Does it just set a flag in the LabVIEW .ini file - or is there more secret sauce to it? Also, how does VIPM decide when to do it - it appears to happen only on a fresh (ish?) installation. If I switch the checkbox back myself and then startup VIPM it doesn't change anything. So how does it know whether it's a "fresh" install?

Link to comment

I've tested it just now, using latest VIPM 2020. After VIPM is installed, TCP/IP checkbox is not set for LabVIEW. And, when trying to install some toolkit the following error is shown:

1167383059_VIMPError.png.608c5530af80131958071f8cff3084b0.png

But, when I've opened Settings -> LabVIEW tab -> pressedVerify (connection) button, then VIPM restarted LabVIEW, set TCP/IP checkbox, and was able to successfully connect to LabVIEW.

6 hours ago, prettypwnie said:

So how does it know whether it's a "fresh" install?

Such trick could be done by Post-Install Action (for example, if it is VIPM package). LabVIEW installers also support option "run executable at end of installation", so I guess other kinds of installers could support similar post-install actions.

Link to comment
10 hours ago, prettypwnie said:

Hi LabVIEW experts,

I have noticed that VIPM appears to automatically set this checkbox if it's the first time you've tried to connect to LabVIEW:

tcpip-checkbox.png.d413e9e3584cd6f691c4bd2f1738071e.png

This is good because without it, VIPM can't connect to LabVIEW and new users would be confused because nothing would work. (Although I'm not sure why this is allowed to do from a security standpoint - but it is convenient)

I would like to do the same thing in the MGI Solution Explorer, since we have the same problem. New users who are using it for the first time (and haven't yet used VIPM either) will get an error because it can't connect and will be confused.

Does anyone have any secret inside knowledge about how VIPM does this? Does it just set a flag in the LabVIEW .ini file - or is there more secret sauce to it? Also, how does VIPM decide when to do it - it appears to happen only on a fresh (ish?) installation. If I switch the checkbox back myself and then startup VIPM it doesn't change anything. So how does it know whether it's a "fresh" install?

I don't know how VI manager does it but here are the things I do know.

A fresh install has no tcp settings in the LabVIEW.ini. If you change the VI Server settings then the following settings are added to the LabVIEW ini depending on what you change from the defaults - the prominent ones are:

  • server.tcp.enabled=
  • server.tcp.port=
  • server.tcp.access=

There are also property nodes that relate to those settings.

image.png.972c91347c4d65955409c5feb7f44693.png

Access via these nodes (externally) requires that the VI server is available (i.e enabled). You can turn it off, but not on.

In 2020? a new variable was added to the ini which is

  • server.tcp.acl=

I don't know much about that one but it will probably bite me in the backside at some point since I know what an ACL is :D

Edited by ShaunR
Link to comment

The fact that VIPM does require a restart of LabVIEW is probably a good indication as to what it does.

1) enumerate all installed LabVIEW versions

2) read the labview.ini in that location and extract the VI server settings

3) if user changes the settings for a LabVIEW version, update the LabVIEW.ini file and require a restart

 

On restart LabVIEW reads the LabVIEW.ini file and all is according to what VIPM wanted it. Simple and no hidden vodoo magic at all.

Edited by Rolf Kalbermatter
Link to comment

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.