LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO Coding Practices

Hi,

 

I'm having problems where the LabVIEW Front Panel interface (over the network) to the cRIO constantly hangs, crashes and is nearly unusable. I was wondering if there's perhaps best coding practices or techniques that I might be violating to cause this. My application currently takes up about 70% CPU and 95% RAM on the cRIO-9073 I'm using.

 

A few problem instances:

 

My top-level VI takes nearly 90 seconds to load into the cRIO, and it takes about another 60 seconds for the front panel to "catch up." What I mean by "catch up" is that the front panel is very slow and unresponsive for about 60 seconds, and then acts normally.

 

Should I  not be using front panel objects in the cRIO? I use these quite commonly to debug VIs but it was my hope that LabVIEW would not interface to them if they were hidden.

 

When I attempt to set a probe, the cRIO/LabVIEW hands and disconnects. I'm given the "Waiting for Real-Time.." dialog.

 

Regards,

Ken 

0 Kudos
Message 1 of 2
(2,175 Views)

Hi Ken,

 

I assume you simply start your RT VI out of the project.

This is causing LabVIEW to do Interactive Frontpanel communication. This means the code is running on the RT System and a Normal Priority Thread communicates with the Frontpanel which is running on your Windows Host.

So if any Thread with a higer priority, or a Timed Loop is running in your code, it will preempt the Communication to the User Interface, which could cause LabVIEW to throw the "Connection To Targe Lost" error.

 

I would recommend to create a own Host VI and to build a Communication between RT and Host either using Shared Variables or TCP/IP.

 

 

Christian

0 Kudos
Message 2 of 2
(2,145 Views)