LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call VI on PC from VI running on cRIO

Hello,

I'm wondering if there is a way to call a subVI on my PC (i.e. under the My Computer directory in a project) from a VI that is running on a cRIO, and have it use the PC's file structure in that subVI.

Thanks for your help,

Elizabeth

0 Kudos
Message 1 of 5
(3,236 Views)

Hello,

I've attached an image of the project explorer to clarify. I want to run 'FileExport.vi' on 'My Computer' as a subVI of 'Full DAQ System.vi' on 'RT CompactRIO Target.' 

When I run FileExport from the project explorer, it works fine, but if I execute it as a subVI, it runs on the cRIO instead of on My Computer, which messes up the file structure.

 

Thanks,

Elizabeth

 

0 Kudos
Message 2 of 5
(3,227 Views)

It is possible to do this using VI Server. You'll need to have LabVIEW running and configured to accept VI Server calls over TCP, or you can build that VI into an application and leave it running instead. See the help for VI Server. The key functions to get started are Open Application Reference, Open VI Reference, and Call by Reference Node, all of which are under the Application Control palette.

Message 3 of 5
(3,219 Views)

Hi Nathand,

Thanks for your advice. I have been trying to call the function through the VI server, but I can't seem to get the cRIO to communicate with my PC.

I have the VI server settings on my computer and on LabView set to allow TCP/IP at port 5010, and have the 'Open Application Reference' vi calling to port 5010 at my computer's IP address, but after a minute or so, it comes back with a timeout error.

I had a similar problem before with the FTP VIs, where my computer can talk to the cRIO, but the cRIO can't access the PC.

Any suggestions?
Thanks,

Elizabeth

0 Kudos
Message 4 of 5
(3,200 Views)

Sounds like a firewall problem - is there any sort of firewall installed and enabled on the network connection between the cRIO and the computer? If so, make sure it allows connections to port 5010. It may be easier to disable it entirely for testing, then reenable and configure once you're sure that's the problem.

 

Is LabVIEW running on your desktop computer when you try this? Did you enable VI Server in the project (right-click My Computer->Properties) or under Tools->Options? (This isn't the problem since in either case it should at least allow a connection, but it would be useful to know.)

 

What is the specific error message you're seeing? Can you post your code?

 

The problem with FTP is most likely that your computer isn't running an FTP server, unless you installed one. The cRIO includes a built-in FTP server, but desktop operating systems do not (or if they do, they're not enabled by default for security reasons).

0 Kudos
Message 5 of 5
(3,196 Views)