Programmers: How to program GPIB (IEEE 488) using Visual C++

LoverBoyJ

Senior member
Mar 22, 2001
992
0
0
I need some reference programs in using MS Visual C++ to control, commnd, and setup an instrument that is connected to a PC using GPIB (IEEE 488).

Any help or sample programs appreciated.

Instrument used:
HP81130A Pulse Generator (400-600Mhz)
 

thornc

Golden Member
Nov 29, 2000
1,011
0
0
Try getting the "HP I/O Library" from HP... I think this is your best bet!
I used it a few years ago with a digital multimeter with VB, but I recall that it support VC++... I presume that you already have the GPIB card, I think that the libraries will work with any configured card, but I can be wrong. Back then I only used the serial port!!
 

LoverBoyJ

Senior member
Mar 22, 2001
992
0
0
We already installed the National Instruments GPIB board to the PC. The only problem that I have is I don't haven't had any experience doing GPIB programming to command and get measurements from an attached instruments. I already checked out the HP-IB (HP's equivalent to GPIB) command and it only gives me the command lines. I need some reference programming, even a basic structure will do.

Thanks :)
 

thornc

Golden Member
Nov 29, 2000
1,011
0
0
In order to command the instrument you'll need to actually learn the language the instruments talks in...
I don't recall the exact name now, but I can tell you tommorow from the lab(over here is now 1am)... anyway you use the HP I/O libs to send/receive the commands/replyes from the instrument... in my case it work flawlessly, setting the reading parameters and getting the measured data!!!

I'll post more later on...
 

thornc

Golden Member
Nov 29, 2000
1,011
0
0
Hi...

The language is SCPI, you should have the reference for it on your instruments documentation...

I don't recall any details about it, but you can look it up in google.... worse case I can try to find the old programs...
I did a quick google search and came up with this!

Have fun!
 

Spamela

Diamond Member
Oct 30, 2000
3,859
0
76
it's easy & i've done with many times.

you need to get the file containing the C++ header, .obj, and .dll's.
try here (you have to register with NI & the file is about 45 MBytes)

i just did an advanced search here for: NI-488.2 for Windows download

maybe the examples available here would help.

i.e., this and this.