08-02-2017 03:19 AM
I'm using an INI file to write/Read config data on a cRio. If I run my Vi on my development laptop, everything works fine once I specify the path. The issue I am having once I try to use the Vi on the cRio is that the file isn't deployed.
How do I get my INI file on to the cRio and set the path address up correctly?
Solved! Go to Solution.
08-02-2017 03:27 AM - edited 08-02-2017 03:32 AM
Hi LBee,
you need to include this file as "additional data" in your AppBuilder spec for the RTEXE. It will be stored in a "data" subfolder of the RTEXE filepath…
That's what I call in my cRIO main VI first to get the "data" folder path:
(The subVI just strips any filenames from "current VI path" and outputs a verified folder path.)
08-02-2017 04:39 AM
I just use Application Folder and it gives the path to the folder containing the executable (or project file). Makes that subVI obsolete.
As far as the in file, you can also use WebDAV or FTP to copy the file to the cRIO.
08-02-2017 05:45 AM
I used the following in the end to achieve the result I needed, obviously the string is supposed to be wired!!
08-02-2017 05:59 AM
Hi LBee,
your file path handling really looks "strange"…
Why not use StripPath/BuildPath? (It would be much more safe because of differences in filepaths between Windows and Linux/whatever might be used on your cRIO!)
And as crossrulz said: use the AppDir constant!
08-02-2017 06:12 AM
Plus that code will not work in a built executable.
Here is the VI I keep in my library for such an occasion. It creates a path relative to the folder containing the executable. If in the development environment, the folder of the project file is used.
08-02-2017 06:36 AM
I've changed the path wiring to this:
This gives me the same result as before. If I try your setup, for some reason my Vi does not see it as a valid path when running on a cRio
03-11-2018 10:32 AM
У меня такая же проблема, как вы ее решили?
03-11-2018 01:08 PM
Hi Andry,
you should write English in this LabVIEW board.
I have the same problem as you solved it?
Could you attach your current VI you have problems with?
Did you store the ini file in the cRIO?
Did you check the file to be in correct folder?
03-12-2018 01:26 AM
Или вам нужно полностью?
С уважением)