09-03-2016 04:53 AM
Hi everybody!
I have already developed a LabView Project in which six VISA serial port are read and data are elaborated and saved in a text file. Now I would like to create an application/installer in order to run the main VI on another computer where LabView is not installed.
If I create an application I am not able to set the seial ports numbers and the file name before starting the VI. How could I do it?
Thank you very much in advance!
Lorenzo
09-03-2016 05:35 AM
You need configure port's names (like in MAX), or configure your application?
If second, you can use config-file (ini or XML format, see file palette)
09-03-2016 06:15 AM
I need to select the correct VISA Refnum In (COM 5, COM 6... ) and the file name Path (on the front panel) before starting the main while loop of my VI.
If I create a stand-alone application I have no chance to select them...
09-03-2016 06:35 AM
you can use config-file (ini or XML format, see file palette).
After installation new user should correct data in file.
After starting app read this file and use correct data instead control's values.
Second case: your app must wait "start" command from user. User type correct file's name and ports and press "start" button.
09-03-2016 06:41 AM
In order to wait my start command, do I have to include all my main VI (acquisition loop and saving loop) in a Event Structure?
09-03-2016 02:19 PM
I'm sorry, I really do not know how to use config-file.
09-03-2016 02:24 PM
Take a look at state machine architecture. It builds in a state where you wait for things to happen
09-03-2016 02:38 PM
09-03-2016 03:38 PM
@lorenzo26 wrote:
My VI is a producer-consumer architecture where I acquire data in the top loop and save it in a file in the bottom loop. I just would like to create an application (installer) but I need to set VISA ports and file name before entering in the loops.
So you should add new state for start working after user command.
About ini file read here
and see File I/O -> configuration file VIs palette
09-03-2016 05:38 PM
As has already been stated, using a configuration file is the simplest way to do this. It is also less annoying to your users since they just have to set up a text file instead of configuring that dialog/controls every time they run it.