11-06-2006 03:54 AM
11-06-2006 04:51 AM - edited 11-06-2006 04:51 AM
Message Edited by daveTW on 11-06-2006 11:52 AM
11-06-2006 05:46 AM
08-07-2019 03:42 AM
Hi dave
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
Baig
08-07-2019 04:18 AM
08-07-2019 07:12 AM
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.
08-08-2019 01:46 AM
Hi GerdW
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
Baig
08-08-2019 02:47 AM
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
/Y
08-08-2019 04:44 AM
Can you explain with example please
Thanks and regards
Baig
08-08-2019 06:04 AM
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: