PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't open a file on bootup

Hi-
 
I have a PXI-8145 running RT and Labview 8.0.  I am having some problems with the attached VI running as a remote panel (it is a small part of a much larger app).  It is supposed to read a value from a file and populate a numeric field.  The "config_file" sits on the root director on the PXI controller. 
 
Here are the lines of the config_file:
[Initial values]
threshold=1.530000
 
If I deploy the attached VI to the PXI through labview, it works fine.  My application needs to run hostless so that it starts collecting data when the PXI starts up (or any time it my get power cycled).  I don't own app builder so I am doing a source build and FTPing it the box.  Then editing the ni.ini to set the startup vi as my test.vi.  Note - this process works just fine for the rest of my application.  Now when I power cycle the PXI, it runs the vi, but it doesn't always populate the numeric field with the number in the file.  Most times it will just use the default value for the "open config data" (as if the config_file doesn't exist).  However, sometimes it works.  Very frustrating.  It seems like there is some issue with the file system not being initialized when the vi first runs.  Any suggestions on a better way to do this?
 
 
Thanks for you help,
 
Zach
 
0 Kudos
Message 1 of 4
(3,267 Views)
Hello Zach,
 
You willl probably notice that if you wire an indicator directly to the VI that gets the value from the configuration file, it will display the correct value.  Local variables will update the values of the controls they are attached to, but they will not change the value displayed by the control for viewing purposes in a remote front panel.  Instead of using a local variable to update the control, you should try a property node.  It will slow down performance if in a loop, but it will work.
 
Local variables do not update the value displayed by the control because there are technically no front panels when a VI running embedded on a target.  Only the block diagram is running on the controller.
 
I hope this helps.
 
Steven T.
0 Kudos
Message 2 of 4
(3,256 Views)
Hi Steven,

Thanks for the suggestion.  I changed the local variable to a value property node.  When deploying it from the host it works just fine (as before).  However, when I ftp it to the PXI box, reboot and load it up in my web browser, all I get is a "0" in the box.  It's not displaying the default or the value from the file.  Weird....?!?

Zach

0 Kudos
Message 3 of 4
(3,251 Views)

Zach,

What happens when you also put an indicator on the wire?  Does the indicator display the correct value?  After wiring in an indicator it will probably display the correct data on that indicator.  If it does not, double check this by creating a debuggable executable.  Go into the build specifications of your RT Application and select Enable Debugging in the Advanced Category.  You can then select Operate>>Debug Application.  You can then connect to the remote panel using the ip address of the FieldPoint.  You can then put probes on the remote executable while it is running and you can see the values in the wires.  If even the values in the wires are wrong, I would verify that no errors have occured (you would get an error in a file open if the file is not there).  This operation will let you know if there is a problem with the local variables/property nodes or if it is another problem.

I hope this helps.

Steven T.

0 Kudos
Message 4 of 4
(3,234 Views)