LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading entire Config file at once

Solved!
Go to solution

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.

 

0 Kudos
Message 1 of 6
(3,374 Views)
Solution
Accepted by topic author Ayesha.S

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.

0 Kudos
Message 2 of 6
(3,372 Views)

@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.

0 Kudos
Message 3 of 6
(3,350 Views)

When LabVIEW opens a config file, it loads the entire file into memory.  All further operations act on the copy in memory.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 6
(3,344 Views)

Hi Bob,

I am fairly new to Labveiw...copy file function worked!...

Thanks alot

Smiley Happy

 

 

 

0 Kudos
Message 5 of 6
(3,328 Views)

Thank you paul for your valuable advice and information.

0 Kudos
Message 6 of 6
(3,325 Views)