Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB-USB-B Visual C++

Hi All,
I'm trying to develop an application in VC++ which has to communicate with an Agilent 33220A. I have two questions.
1. Why would I need to use board-level commands?
2. I'm only able to send queries and get back answers (for example, *IDN?, SYSTem:VERSion? ). I'm only using Ibdev, ibwrt adn ibrd in my application. But if I try to send commands (eg.APPLy:RAMP) the program gives me an error...
What could be the problem?

Should I use a different set of API functions for queries and commands?

Regards,
-Ted
0 Kudos
Message 1 of 2
(3,602 Views)
Hello Ted,

Thank you for contacting National Instruments. What kind of error are you receiving when you send the commands? Are you performing an ibrd after you send those commands? You might be getting a timeout error if you are trying to read when your instrument is not writing any data.
To simplify your application, you might want to consider using one of the instrument drivers on National Instrument's website. A VC++ driver is available at http://search.ni.com/query.html?lk=1&col=alldocs&nh=500&rf=3&ql=&pw=595&qp=%2BContentType%3AInstrumentDriver+%2BIDNetManufacturer%3A%22Agilent+Technologies%22&qt=33220a&layout=IDNet .
Pay close attention to the "Required Software" and the "Instructions for Microsoft Visual Basic 6.0, Visual Basic .NET, and Visual C# .
NET Users." There is also documentation included with the driver that is important for VC++ Users.

Let me know if you have further questions.

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,602 Views)