Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Programmatically Changing the "Show All Resources Accessible to VISA" Setting in MAX

Primary Software: Utility Software>>Measurement & Automation Explorer
Primary Software Version: 3.1
Primary Software Fixed Version: N/A
Secondary Software: LabWindows/CVI Development Systems>>Full Development System

Problem:
I am trying to display a list of all the VISA devices in my system, but my code only works when the "Show all resources accessible to VISA" setting is enabled in MAX. Can I programmatically change this setting?

Solution:
This setting is contained in an .ini file located at C:\VXIPNP\WinNT\NIvisa\visaconf.ini and the section that contains this setting is

[VISA-CONFIG]
ShowRegisteredDevOnly = 0

There are actually some .ini-specific functions built into CVI that make it very easy to read and modify tags. However, these functions need to be added to your Library. To do this, follow the steps below:
  1. Right-Click on the project in the workspace window that is going to use the library and select Add File.
  2. Make sure the Files of Type is set to Instrument (*.fp)
  3. Browse to <CVI>toolslib\toolbox\
  4. Select inifile.fp, press Add, and press OK to close the Add File dialog box
There should now be a new Instrument loaded called Reading/Writing .ini-Style Files. The functions underneath Getting Values from Tags and Putting Tag/Value Pairs can be used to get and perform the setting change.

For more help on using the files from this library see the section titled "Reading/Writing .ini-Style Files" located underneath the Tools Library section in the LabWindows/CVI help. For help on how to use ini files within LabVIEW see the section titled "Using Configuration File VIs" located under Fundamentals>>File I/O>>How-To>>Using Configuration File VIs.

Related Links:

Attachments:





Report Date: 12/18/2006
Last Updated: 01/12/2007
Document ID: 44HF1NDF

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit