LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change file name and VISA serial port in LabView installer/application

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

0 Kudos
Message 1 of 14
(5,076 Views)

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)

0 Kudos
Message 2 of 14
(5,060 Views)

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

0 Kudos
Message 3 of 14
(5,054 Views)

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.

Message 4 of 14
(5,052 Views)

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?

0 Kudos
Message 5 of 14
(5,049 Views)

I'm sorry, I really do not know how to use config-file.

0 Kudos
Message 6 of 14
(5,021 Views)

Take a look at state machine architecture.  It builds in a state where you wait for things to happen

0 Kudos
Message 7 of 14
(5,018 Views)
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.
0 Kudos
Message 8 of 14
(5,016 Views)

@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

Message 9 of 14
(5,010 Views)

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.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 10 of 14
(4,997 Views)