LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with references on cRIO as startupApp

Solved!
Go to solution

I'm having some trouble with my programs running as start up applications on different cRIO's.

The problem is that it takes too long to load the references correctly (or load at all).

 

In the attached screen shot, there are two tabs that i set the enabled state on. Page 1 is to be set as "disabled and grayed" and page 2 to "Enabled".

The upper reads the pages reference directly and updates the tabs. This does not work, as the reference array is empty.

The lower one, waits for the reference array to become a non-zero array. After some time this occurs and the while loop stops.

 

The right part of the screenshot is from the web-server running the program. When i press Start on my computer (but still being run on the cRIO), this is not a problem.

 

For larger programs it is very difficult to detect if the references are updated or not. Is there a method to wait until everything is ready before the code executes?

0 Kudos
Message 1 of 5
(2,872 Views)

Hi Theta,

 

which cRIO do you use?

Most of them don't support any kind of display and so they don't support certain FP elements/functions. Using property nodes on FP elements is mostly a no-go on cRIO RT systems!

 

Hint: all example projects coming with LabVIEW RT do separate the UI (on your Windows PC host) from the RT control loop (running on the cRIO). Did you examine all the example projects/VIs coming with LabVIEW?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,861 Views)

I've tried on cRIO-9030 and 9064. I kind of agree that FP elements can cause trouble, but i still think the code should work. Adding a "wait" prior to the main code, also solves the problem.

I also save different settings, which is loaded into the system when the cRIO turns on. Both save and load settings uses references. Saving is never an issue as it executes many minutes after startup. Loading is executed right after startup, and I get trouble. I have to wait a minute or two to avoid the problem. I can also add logic to see if the reference gives any data, but i dont think either of those is a solution I want to go for...

 

 

LabVIEW should not execute code before it is "ready".

0 Kudos
Message 3 of 5
(2,852 Views)
Solution
Accepted by topic author ThetaMa

It doesn't. The problem you are seeing is because the remote front panel is 'connecting' to your already running VI. Connecting to the remote front panel does not 'start' the VI - it's a window into a VI that is already running. Because of this, any property nodes that were set before the client connects are not reflected (i.e. they are reset to default) in the remote panel viewer.

 

This is described here: Functionality not supported in viewing and controlling remote front panels


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 5
(2,837 Views)

Aha, that answers the question...

So in order to use references to controllers, the front panel must be loaded(?). I have changed my array of references to bundle local variables, as a workaround when saving and loading the setup (it works).

 

Thanks

0 Kudos
Message 5 of 5
(2,822 Views)