Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get MAX to scan for instruments on bootup?

I would like to setup MAX (or whatever SW component) to scan for GPIB instruments each time the computer is booted up. I've had one strange case where MAX somehow "lost" it's GPIB instrument configuration and the only way to recover was to manually start MAX and do a scan for instruments. I already do this for the VXI resource manager.

PS - I see the VISA configuration file, visaconfig.ini, has an "AlwaysRefresh" option line. Is there anyway to set this short of a direct edit?


Thanks,
Ed Perkins
0 Kudos
Message 1 of 4
(3,340 Views)
Hello Ed,

There is no way to force MAX to do a "scan for instruments" on your GPIB bus at boot, but this shouldn't be a problem. Whether or not the instrument appears in MAX, you still should be able to talk to it using VISA, 488.2, or IVI.

If you could provide more details about the failure, I'll try to help you further. Perhaps there is something else going on.

Scott B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,340 Views)
Scott - If I understand you correctly I should be able to do the following:
1. Disconnect the IEEE-488 cable from my computer.
2. Manually start MAX and tell it to scan instruments (which it will find none).
3. Plug the IEEE cable back in and re-run my application (it uses VISA to control both IEEE-488 and VXI instruments) successfully.

Correct?

What prompted this thread was one strange event. After successfully running our app the previous night (and leaving everything powered up) the app failed all IEEE calls the next morning. When we went into MAX it mysteriously showed no IEEE instruments. Nothing solved the problem (computer reboots, etc.) until we forced MAX to do an instrument refresh. Perhaps something else did go on, but I thought
running MAX and forcing an instrument refresh on each boot-up (much like running the VXI Resource Manager) would be a prudent prevention approach, especially since the station operators don't even know about MAX.

Thanks,
Ed Perkins
0 Kudos
Message 3 of 4
(3,340 Views)
Ed,

Yes, that's correct. Before answering your question, just to make sure, I conducted the following test:

1. Power down my instrument
2. Open VISA Interactive Control
3. Open a VISA Session to GPIB0::6::INSTR
4. Power up my instrument
5. Visa write/Visa read from instrument.

With 488.2 v2.1 and VISA 3.1, this works perfectly. Incidentally, you can always open a VISA session to a nonexistent GPIB resource, but the read/write will fail with a "No Listeners" error if the instrument is not on the bus. If you do get the GPIB calls to fail again, get the error number to see if this is the error you are seeing or if something else is going on.

Hope this helps.

Scott B.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,340 Views)