LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open VI Server Refernce on Windows from cRIO fails to find VI path

Solved!
Go to solution

Hi,

in our project we use a NI-cRIO-9057 as our central state machine. As we use measurement hardware that is only supported to talk to windows we need to call subVIs on a remote PC to gather measurement data. I tried to implement a minimal example for calling a simple remote VI using VI Server by using the steps provided in https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000xCLsCAM&l=en-GB. The only difference is the local computer being  the cRIO and thus changing the path style to "C/Users/test/Documents/LabVIEW_Projects/testbench/remote loop.vi" (the error is independent of this change). I attached the VI. The Open Application Reference executes without an error and fails when intentionally entering a wrong IP or service name. However, the Open VI Reference fails. The error explanation prints:

Error 7 occurred at Open VI Reference in start remote loop.vi

Possible reason(s):

LabVIEW: (Hex 0x7) File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.
=========================
Nonexistent GPIB interface.

VI Path: home:\lvuser\natinst\bin\C\Users\test\Documents\LabVIEW_Projects\testbench\remote loop.vi

 

The problem seems to be, that the cRIO searches for the VI locally and interprets the path as relative.

How can this problem be solved?

Thanks in advance!

Jorge

0 Kudos
Message 1 of 4
(423 Views)
Solution
Accepted by topic author jorgeBS

An absolute path on Unix always starts with the root indicator /

 

So make your path "/C/Users/test/Documents/LabVIEW_Projects/testbench/remote loop.vi", then it will correctly create an absolute LabVIEW path that gets interpreted on Windows accordingly.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 2 of 4
(383 Views)

@rolfk wrote:

An absolute path on Unix always starts with the root indicator /

 

So make your path "/C/Users/test/Documents/LabVIEW_Projects/testbench/remote loop.vi", then it will correctly create an absolute LabVIEW path that gets interpreted on Windows accordingly.


How do I do the opposite? On Windows what path do I enter to open a VI at an absolute path on the Linux host?

0 Kudos
Message 3 of 4
(342 Views)

@avogadro5 wrote:


How do I do the opposite? On Windows what path do I enter to open a VI at an absolute path on the Linux host?


Well, for one you shouldn't use strings! No really!! The LabVIEW path is for a reason a special datatype.

 

Second: Absolute paths on Windows start always with either:

 

\\share\volumename\<actual path>

<volume>:\<actual path>

 

So your /usr/local/lib path under Unix will look like usr:\local\lib on Windows. Intuitive? Not exactly but that's how LabVIEW does it and I can't really think of a more intuitive way either.

 

Another way to construct such paths a bit more intuitively would be to use the String Array to Path function and specify at the according boolean input to treat the path as absolute. This is incidentially also how LabVIEW stores paths internally, as an array of string elements, with a header that defines the type of path (absolute, invalid, relative, UNC).

2026-03-11 09_50_30-Windows 10 x64 (LabVIEW 2018) - VMware Workstation.png

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 4 of 4
(314 Views)