FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

Change Default Value cFP

Hi, I have an application that works stand alone in cFP 2020. But I had enabled the webserver cause, sometimes, I need to change some setpoints than I access the variables this way. When I change the variables values, I save then to a .ini file. Everytime the cFP is rebooted, the VI gets the values from this file and I put these values to the controls.
 
Now, the problem: when I run the VI from the LabVIEW, it works very well, and the values of the controls are updated. But, when the VI runs standalone (startup), these values are not updated. I can read the file and notice that the file was updated, but, these values aren't passed to the controls.
 
 
Any suggestions?
0 Kudos
Message 1 of 10
(8,192 Views)
How are you writing the new values to the controls?  Are you using property nodes or local variables?  If you are running the VI as standalone, it won't load the front panel, so using the property nodes to set the value of the controls won't work.  I might be mistaken about this, but I think this is something I learned by reading other posts in the forum.
0 Kudos
Message 2 of 10
(8,190 Views)
I tried to use these two modes (property node and local variable) and didn't have success.
0 Kudos
Message 3 of 10
(8,182 Views)

Ravens Fan is correct, you never want to use front panel controls as a place to hold information on a cFP. 

Suggest that when you read values from .ini file that you write them to a Shared Network Variable.  Modify your code so that the code on the cFP is always reading from the Shared Variables and not the front panel controls.  Turn the front panel controls into indicators so you can monitor values during development.

0 Kudos
Message 4 of 10
(8,164 Views)
The problem is: after read these default values I'll need to provide a way to leave the user modify these values. So, I don't know how to do this if convert the controls into indicators.
0 Kudos
Message 5 of 10
(8,162 Views)

Here is a link that better explains why cFP behaves this way.  http://digital.ni.com/public.nsf/allkb/FC5024A5DD6344C886256C8C0054689B?OpenDocument

You could also create a simple host vi that uses Shared Network Variables to pass data to and from the cFP. 

0 Kudos
Message 6 of 10
(8,157 Views)

I'm able to create host VI's using shared network variables (with cFP and cRIO). But I don't want to install the executables on several computers that will access the cFP's VI, and just install the Run Time Engine in these computers.

0 Kudos
Message 7 of 10
(8,155 Views)
The document I linked to states that you have to update the front panel after the remote panel connection is opened.  Maybe you can add a button to the interface that forces the cFP application to update the front panel controls?
0 Kudos
Message 8 of 10
(8,152 Views)
I'll try do this.
0 Kudos
Message 9 of 10
(8,150 Views)
Hi centerbolt, it worked! Now, when some user is connected, the program detects it by invoke node, then, the front panel is updated.
 
Thanks a lot!!!
0 Kudos
Message 10 of 10
(8,146 Views)