12-22-2016 07:56 AM
HI all,
I have to read a config file from one PC on to another througha ehthernet port.
This connection is not continouos a bit doggy goes silent if the devices are not continuosly comunicating. so to avoid this,I want to read whole of the config file at once before begin the main vi. and save it as it is in another file. like load a copy of the original on the PC which runs the main vi.
I know we can read individual sections but how to read entire file and Create a identical copy of it.
Solved! Go to Solution.
12-22-2016 07:59 AM - edited 12-22-2016 08:00 AM
A Configuration File (or an INI file) is just a text file. You should be able to do it with a single Copy function (found on the File I/O Palette, Advanced File Functions sub-Palette).
Bob Schor
P.S. -- I just wrote some code to read/write INI files, and abandoned NI's Config File routines in favor of "doing it myself", much easier, faster, fewer bugs.
12-22-2016 08:06 AM
@Bob_Schor wrote:
P.S. -- I just wrote some code to read/write INI files, and abandoned NI's Config File routines in favor of "doing it myself", much easier, faster, fewer bugs.
I believe I read somewhere that the NI INI functions use a lot of the old recursion using dynamic references, and as a result is pretty slow. As a result the OpenG functions which call the NI functions is also quite slow. If you need speed on INI reading I recommend looking into the MGI Read/Write Anything.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
12-22-2016 08:17 AM
When LabVIEW opens a config file, it loads the entire file into memory. All further operations act on the copy in memory.
12-22-2016 08:45 AM
Hi Bob,
I am fairly new to Labveiw...copy file function worked!...
Thanks alot
12-22-2016 08:46 AM
Thank you paul for your valuable advice and information.