Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I query using NiVisa in C++?

Hi, 

 

I am currently trying to get a GPIB usb interface to work properly with a GPIB device.
I can query the  device in NiVisa interactive control, as shown here: http://quick.holdthatpic.com/images/290289.jpg

That buffer that it is returning is exactly the data  that I need to record. "HP=0.0000T=00.78S=00000\r\n"

 

This is my first time using GPIB or any NI software, so I'm having a lot of difficulty.

What I want to do is take in that data into an array of characters in C++, so that I can then parse the data and record it at varying intervals from my device.  

I've been trying a couple different things in C++, but nothing is really working so far.  

Does anyone have any advice?

 

Thank you. 

0 Kudos
Message 1 of 2
(3,439 Views)

Hey JdBan,

Thanks again for your patience. I have some questions for you so that I can better understand your application and so that we can get you moving in the right direction.

1. Are you using the dotNET Framework or the VISA dll to communicate within your C++ program?

2. You say you are using NI software, can you elaborate on this, or did you mean simply Measurement & Automation Explorer(MAX) along with the drivers?

 

 

Please take a look at the following web page which has great resources for VISA Support

Thanks again and have a great day!

Regards,

 

Nicholas K

National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(3,408 Views)