LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

There is another option for the COM port portion that has not been discussed here; however it depends on your instrumentation. You would do the following:

  1. Use VISA to get a list of possible serial ports - the list is returned as an array.
  2. Loop through all of the ports using an identity command, such as *IDN?, to identify your instruments. (This part depends on your instruments as they may not support the command)
  3. Assign ports based on the identity command.
  4. Now you can dynamically assign ports at startup, no ini file, no asking your user to configuration anything.

 

Cheers,

mcduff

0 Kudos
Message 11 of 14
(960 Views)

Thenk you very much for all the answers!

I have managed to write a .ini configuration file and save my SavingFile path in it. 

How can I now write a VISA refnum in the file config? If I write it as a string, is there a way to transform it in a refnum again in my MAIN VI?

 

0 Kudos
Message 12 of 14
(953 Views)

Just write the string back into the VISA reference, it will convert it for you.

Message 13 of 14
(947 Views)

Perfect! Thank you very much! 😄

0 Kudos
Message 14 of 14
(944 Views)