Message Edited by daveTW on 11-06-2006 11:52 AM
I am trying something similar I guess you could help
I want to change or control VISA Config controls (visa resource name, parity, stop bit, etc) through .ini file when I create a Executable.
I tried deploying VISA resource settings from the properties of the Build->executable and it does create .ini file with the .exe application but not taking or reading the changes I do in config.ini file(which is created while building .exe )
I needed this because when I connect different usb cable or in different usb socket COM value changes . I need to check the COM value from Device Manager and I want to simply edit this .ini file part where COM value is stored to the one I am using.
Hope you get the point I am trying to make.
Thanks and Regards
you need to read those INI keys on your own and set the parameters for VISAOpen with them.
As has been asked in your other threads too: Attach your VI so we can give recommendations on how to improve it!
The ini file generated by Application Builder is normally created brand new every time, however you can define your own file in the Advanced tab of the Application properties (see the Use custom configuration file option). The custom ini file must be added to the project before.
Another possibility is to use an alternative ini file. Personally I prefer not to mix my settings with LabVIEW settings. I always define an application folder (e.g. C:\MyApp or similar to be located in the Windows user folder), where all settings and data will be stored/retrieved. My ini file would be typically located in the MyApp\Config folder.
I am attaching the VI that has a glimpse of how I am using VISA communication for RS232 protocol. Since my main application have many subvi's and .cntls and would be like troubling you guys more for no reason.
In the second tab of tab control there are bunch of VISA config controls. I want these controls to be changed from .INI file so that i can completely remove them from FP.
In my application com port, baud rate and stop bit are the things I might need to Change for every run.
Thanks and Regards
I think the recommendation from MS is to not write/use the Program Files-folder for dynamic data. Instead, use the File variable block (i don't remember the name) to point to 'Public program data' (which gives the %programdata% folder) and create a structure from there, such as %programdata%\[company name]\[program name]\setup.ini
Yamaeda simply reminds you that Microsoft's recommendation is not to write application data into the %ProgramFiles% subfolders, use %ProgramData% instead.
Here is is an example following his suggestion: