LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial port number savings in .ini file (executable with application builder)

lol You have a valid point there. 😉

0 Kudos
Message 31 of 37
(1,257 Views)

Hey guys Thanks for all the help. sorry for late reply, got stuck in work badly. 

although I have got what I was looking for thanks to all of your knowledge sharing with me. 

I simply used application directory and current VI Path.vi  to just find my .ini file where ever it may installed. 

Thanks and Regards

Baig

0 Kudos
Message 32 of 37
(1,227 Views)

Hi,

I have software in which only serial port printer works. After searching in installation directory I found .ini file in which settings are saved and printer is configured on com5 port. I want to add usb virtual port in that file instead of com5 port so software print documents on printer that is installed on usb virtual port. Can anybody tell me its command?

0 Kudos
Message 33 of 37
(1,178 Views)

Hi Balochpk,

 

use a text editor to change the ini file.

Don't forget to create a backup of the ini file before you start editing!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 34 of 37
(1,166 Views)

Gerdw thank for reply

I need command that i write in that .ini file so i use usb printer instead of serial com port printer. Current command in .ini file is as follow.

 

THERMAL_PRINTER_COM=5

I need command to change this com port to usb virtual port.

0 Kudos
Message 35 of 37
(1,147 Views)

Hi Balockpk,

 


@Balochpk wrote:

I need command that i write in that .ini file so i use usb printer instead of serial com port printer. Current command in .ini file is as follow.

 

THERMAL_PRINTER_COM=5

I need command to change this com port to usb virtual port.


Just change the number in this line.

That "USB virtual port" should also provide a (virtual) COM port, which gets a number assigned by Windows.

(Otherwise your software does not know how to handle the serial port…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 36 of 37
(1,140 Views)

@Balochpk wrote:

.... I need command that i write in that .ini file ...


Hello, I understand your question that you programmatically want to write the port- number to the INI- File. This is done with the Configuration- File VIs from your VI palette. They are located in the palette Programming -> File I/O -> Configuration File VIs. Or just press Ctrl+Space, then type "read key"

 

If you are not familiar with these VIs, open the "Find Examples" dialog from the LabVIEW- Help-Menu and search for "configuration file", this will guide you.

Greets, Dave
0 Kudos
Message 37 of 37
(1,117 Views)