Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble communicating with HP8560E spectrum analyzer using C++ code excuting from DOS window.

I am often unable to control the 8560E using GPIB and C++ code from a DOS window. The executable runs from a DOS window (in Windows 98). I have used this setup with other instruments and it works fine. With the 8560E, it will not work unless I use the following procedure:
1) start my program (in a DOS window) and leave it idling
2) start NI-488.2 Communicator for my PCI-GPIB card and leaving it running.
3) run tests using my program
Is there some sort of initialization that takes place when I start NI-488.2 Communicator? If so, how can I get this "initialization" into my C++ code so that it will work without starting Communicator?
Is there some sort of special reset comma
nd that I need to use with the 8560E? Are there other special requirements or tricks for communicating with this analyzer?
0 Kudos
Message 1 of 3
(3,200 Views)
Hey Jab,

You might want to open up IBIC or some of our C examples to see if they have the same problem. You might be skipping a small step. In addition, IBIC will allow you to reproduce the Communicator in a step by step fashion.

I hope this helps out.

JoshuaP
National Instruments
0 Kudos
Message 2 of 3
(3,200 Views)
After browsing the manuals some more, I decided to try the EnableRemote function in my code. This seems to have solved the problem. Apparently this instrument is different from others I have programmed in that it needs this function call so that it will pay attention to GPIB commands.
Jeff
0 Kudos
Message 3 of 3
(3,200 Views)