LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RT Target Disconnects when code is deployed (cRIO 9068)

Solved!
Go to solution

Thanks in advance for all your help,

 

I've got 2 cRIO 9068s. Both have an FPGA code deployed to them, as well as an RT Target vi with supporting sub vi's. Both cRIOs communicate with each other over TCP/IP as well as the Host Main running on a host computer. I'll call them Simple cRIO, Complex cRIO and, Host.

 

When I deployed code to the Simple cRIO, I had no issues, I can run and debug normally. I now have a working executable for that cRIO as well as the Host. When running the code for the Complex cRIO in the development environment, it works fine with the other executables. When I try to make an executable for the Complex cRIO, I lose connection to it in NI MAX and the other executables can't talk to it. 

 

I can't provide vi's because I am developing on a remote machine.

 

I've tried reformatting the cRIO, deploying with and without the debugger, rebuilding the code, "recompile all" on the code, re-deploying the FPGA code, and rebooting the cRIO. I'm able to connect to the cRIO if I put it in safe mode or if I disable the RT Startup App.

 

Thanks again for all the help.

0 Kudos
Message 1 of 2
(369 Views)
Solution
Accepted by topic author NI_Hobbit

The issue I was up against looked like a cRIO refusing to connect to NI MAX or any machine it was supposed to connect to. I suspected it could be a CPU usage issue, where COM loops didn’t have the resources to execute. This article shows a way to record what is happening even though there is no debugger available. 

 

This logger can be placed all over the project and it will record the time of execution as well as some data. You can modify the logging function to capture the specific data you need. I added a function to record CPU usage and errors/warnings from the error IO for my problem. Put it in a timed loop or you will fill your hard drive quickly.

 

The issue turned out to be a weird LabVIEWism. Halfway down this article, you’ll find the following; “Remove all property nodes that reference front panel objects or properties from the VI. In most cases, property nodes that reference front panel objects and properties (such as window position), if used, will prevent a real-time application from executing because a VI's front panel is removed when a real-time executable is compiled.”

 

So… don’t go down the same rabbit hole I did. Enjoy that article.

Message 2 of 2
(291 Views)