From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to read VISA addresses from an INI file?

Solved!
Go to solution

@billko wrote:


Let me guess.  You don't like MAX aliases.  I'd rather install a new instrument and assign the alias than release new software because of an ini file change.  It's much cheaper and takes a lot less time than it takes to release said software.  Our instruments get sent out for calibration all the time and need to be swapped out regularly.

 

So while it won't help with COM port changes from plugging in a USB adapter in a different place (OS at fault here), and MAX will assign a new alias to your new hardware, it makes administering the software much easier.  That is, assuming that your software is CM controlled.  (In my world, a change in an ini file will result in non-conforming software and invalidate all tests run with that software on that machine.  Hence the new software release.)  And of course, as I mentioned earlier, while new iterations of test stations usually have the same instruments, legacy ones are usually GPIB, new ones are networked.  One software release will run on both stations without any changes.


No, not at all. I've just never used them before and am wondering if I'm missing something. I'm more in crossrulz' situation where setups change very frequently, so being able to click "Setup" within my program to change an address (which my users can do manually) is much easier than trying to manage MAX on all of the systems as well (which would require some new training). I'm just trying to learn about as many new features as possible. Apologies if I came across as challenging- I'm genuinely curious to learn new methods that I haven't used before.

0 Kudos
Message 11 of 18
(477 Views)

@BertMcMahan wrote:

@billko wrote:


Let me guess.  You don't like MAX aliases.  I'd rather install a new instrument and assign the alias than release new software because of an ini file change.  It's much cheaper and takes a lot less time than it takes to release said software.  Our instruments get sent out for calibration all the time and need to be swapped out regularly.

 

So while it won't help with COM port changes from plugging in a USB adapter in a different place (OS at fault here), and MAX will assign a new alias to your new hardware, it makes administering the software much easier.  That is, assuming that your software is CM controlled.  (In my world, a change in an ini file will result in non-conforming software and invalidate all tests run with that software on that machine.  Hence the new software release.)  And of course, as I mentioned earlier, while new iterations of test stations usually have the same instruments, legacy ones are usually GPIB, new ones are networked.  One software release will run on both stations without any changes.


No, not at all. I've just never used them before and am wondering if I'm missing something. I'm more in crossrulz' situation where setups change very frequently, so being able to click "Setup" within my program to change an address (which my users can do manually) is much easier than trying to manage MAX on all of the systems as well (which would require some new training). I'm just trying to learn about as many new features as possible. Apologies if I came across as challenging- I'm genuinely curious to learn new methods that I haven't used before.


LOL, it's just that most poeple don't like using MAX (including me, at times).  It's all good.  Sorry that I came across as more defensive than I should have.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 12 of 18
(473 Views)

Off topic...

 


@billko wrote:
...In my world, a change in an ini file will result in non-conforming software and invalidate all tests run with that software on that machine

Interesting policy.  Changing the system config via MAX is fine, changing it via ini file is verboten.   I'm guessing the powers that be might not be fully aware of the MAX "back door" that still lets you change the test environment...?  😎

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 13 of 18
(467 Views)

@Kevin_Price wrote:

Off topic...

 


@billko wrote:
...In my world, a change in an ini file will result in non-conforming software and invalidate all tests run with that software on that machine

Interesting policy.  Changing the system config via MAX is fine, changing it via ini file is verboten.   I'm guessing the powers that be might not be fully aware of the MAX "back door" that still lets you change the test environment...?  😎

 

 

-Kevin P


You know how the people making these decisions aren't necessarily the ones with the information to make them...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 14 of 18
(462 Views)

@Kevin_Price wrote:

Off topic...

 


@billko wrote:
...In my world, a change in an ini file will result in non-conforming software and invalidate all tests run with that software on that machine

Interesting policy.  Changing the system config via MAX is fine, changing it via ini file is verboten.   I'm guessing the powers that be might not be fully aware of the MAX "back door" that still lets you change the test environment...?


My solution for the configuration file was to have the software perform a checksum/hash (MD5 at the time) on every file in the project (TestStand sequence files, VIs, configurations) and that was verified by the software before it would run anything.  Far from perfect, but it made quality and the customer (NASA) happy.


GCentral
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
0 Kudos
Message 15 of 18
(455 Views)

I store all my instrument VISA information in an XML file.

 

This is what in looks like in XML Notepad

visa1Capture.PNG

 

Raw XML file

visa2Capture.PNG

 

I parse the XML and type cast it to a VISA Resource type because I have an aversion to coercion dots 😛

 

visa3Capture.PNG

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 16 of 18
(452 Views)

@RTSLVU wrote:

I store all my instrument VISA information in an XML file.

 

This is what in looks like in XML Notepad


Yep, I did something similar.  XML Notepad is a great tool if you are doing XML.  But, as I said earlier, I had a lot of trouble debugging the parsing code (kept getting confused about what layer I was in and the reference doesn't give the information I needed).  I switched to JSON and the JSON Text library because the library allowed me to see the actual strings being parsed and therefore debug.  I also don't need a special tool to do JSON effectively.


GCentral
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
0 Kudos
Message 17 of 18
(427 Views)

@crossrulz wrote:

@RTSLVU wrote:

I store all my instrument VISA information in an XML file.

 

This is what in looks like in XML Notepad


Yep, I did something similar.  XML Notepad is a great tool if you are doing XML.  But, as I said earlier, I had a lot of trouble debugging the parsing code (kept getting confused about what layer I was in and the reference doesn't give the information I needed).  I switched to JSON and the JSON Text library because the library allowed me to see the actual strings being parsed and therefore debug.  I also don't need a special tool to do JSON effectively.


You are right XML parsing can be confusing and I pretty much have to relearn how to do it every time. But as long as I stick to the same basic XML file format I can use the parser I made long ago. So I end up making the XML fit the parser instead of the other way around.

 

I have never used JSON, but might have to look into it for future programs

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 18 of 18
(420 Views)