LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

file incrementation help

hi, i have a slight problem with vi below. basically it file increments and logs them to a log file, the problem is when u make the vi an .exe. When u open the vi as an .exe, on another pc it asks where to log the increment log file, so u give it a place to log to and after that it increments, the problem comes when u close the .exe and run it again it forgets that have already got a log file. the other thing its fine on your own pc as it remembers but othere pcs are a problem. Any ideas, other ideas of getting around this problem greatly appreciated.

thanks stuart
0 Kudos
Message 1 of 5
(2,803 Views)
If you want the code to remember the existing log file you will have to include some sort of logic to store the last known path to the logfile in some known and unchanging location. I have always felt that the *.ini file is a good place for this sort of stuff.

To write to an ini file use the configuration VIs that ship with LV. If they aren't in your function menu, try looking in:

//LabVIEW/vi.lib/utilities/config.llb

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(2,803 Views)
If you're checking for the existance of a log file based on a relative path to a VI, you're probably having the common problem of not taking into account that a VI's path is different in an executable than it is in the development mode. For example, in development, your path might be c:\folder\example.vi but in an executable it would be c:\folder\eample.exe\example.vi. You would need to add a test to determine the application kind and if runtime, do an extra strip path.
0 Kudos
Message 3 of 5
(2,803 Views)
Hi, thanks for that. Found out where the the log file is being retrieved from, the problem seems to be the log file, as it can not identify the file and when i identify it it says its not compatable with front panel of the vi. so next i put where the file is retrieved on the network for a common place. Works fine on my pc finds identifys it ok, but using it on another pc its a no go.Any help greatly appreciated.

Thanks Stuart
0 Kudos
Message 4 of 5
(2,803 Views)
Sounds like there is an inconsistency with the definition of the front panels. What have you changed lately on the front panel of the VI you're logging? The change apparently is on your personal machine but hasn't gotten propagated to the other one.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 5
(2,803 Views)