LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save VISA information into a configuration file

Solved!
Go to solution

Hi guys,

 

I've got a problem that i can't quite figure out and I'm sure someone else has done this but i have searched the forums and didn't find anything suitable myself.

 

I'm trying to save configuration files for my program and then reload them back in so that i can get the same state of the controls.  One of the controls I'd like to save into the configuration file is a VISA control.  has anyone figured out how to save this into configuration files?  I know that OpenG has a write variant to config but Id like to stay away from 3rd party stuff as much as possible.  Does anyone have any suggestions as to how to get around this?

 

Thanks

 

Brent 

0 Kudos
Message 1 of 5
(4,671 Views)
Solution
Accepted by topic author BrentSchenk

There's nothing to get around. Wire up the VISA Resource Name cotnrol to the Write Key input and that's it. Wire up the result from the Read Key to the VISA Resource input of any function and that's it. It will be saved as a string and strings are legitimate inputs for VISA functions.

 

p.s. Next time, you have a similar question, you might want to post to the Instrument Control or LabVIEW board.

Message 2 of 5
(4,661 Views)

The alternative to Write Keys, if you don't want a text file, is a BIN file. I do it this way when I don't want users poking around text file trying to change things, and/or for security. And it's fast.

 

The attached picture shows, in general, how to do it.

Richard






Message 3 of 5
(4,659 Views)

Dennis Knutson wrote:

There's nothing to get around. Wire up the VISA Resource Name cotnrol to the Write Key input and that's it. Wire up the result from the Read Key to the VISA Resource input of any function and that's it. It will be saved as a string and strings are legitimate inputs for VISA functions.

 

p.s. Next time, you have a similar question, you might want to post to the Instrument Control or LabVIEW board.


 

Sorry, did not mean that last comment for this post. My mind was somewhere else.
0 Kudos
Message 4 of 5
(4,649 Views)

thanks for the solution!  It never occurred to me to just select the string type for VISA.  I'm not sure i would have read that anywhere either.  Always a good thing to know.  Thanks Dennis!

 

Brent 

0 Kudos
Message 5 of 5
(4,632 Views)