FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

RT location, calling format for keyed configuration files

I have been running an embedded .vi on my 2020 cFP controller without problems.   I recently added a keyed configuration file viconfig.txt to populate / save panel inputs by users.  In the application build, I added viconfig.txt as a support file. It is neatly transferred to IP\ni-rt\STARTUP\Data directory by the build process (confirmed by FTP lookup).   In my application however, I can't seem to access the config file - after entering both the bare file name viconfig.txt OR the full file path spec \\IP\ni-rt\STARTUP\Data\viconfig.txt in the filespec string constant to the keyed config filename entry..  I would be very grateful for some advice.   Thank you! 
0 Kudos
Message 1 of 5
(4,153 Views)

Whoops -- I  forgot..   I am running LV 7.1 on Win XP, embedding on a cFP 2020 RT controller.    Thanks!

S. Wright

0 Kudos
Message 2 of 5
(4,150 Views)
This might help somebody else..  I solved the problem - here's how...  Since the embedded VI application is running internally on RT platform (in my case, the cFP2020), one can simply address file path locations in the embedded VI locally to the RT machine - i.e. c:\ni-rt\startup\data\viconfig.txt.   No need, at that point, for IP addresses, etc.  Works perfectly.
 
0 Kudos
Message 3 of 5
(4,127 Views)

Hi SWright,

This is correct. Here is a KB that explains that:
FAQs on File I/O with the FP-20xx Controllers

You can also use the "Current path" VI to determine the current path of the running VI or executable, and save to a file, which uses a relative path as opposed to an absolute path.

Hope that helps!

Kalin T.
0 Kudos
Message 4 of 5
(4,073 Views)

Thanks Kalin !!

All is well now.   Keyed configuration files (five keys, 86 values) reading/writing perfectly.    Client really likes the keyed text-based config files for clarity/documentation and easy setup editing.  

Regards,

Steve Wright

0 Kudos
Message 5 of 5
(4,064 Views)