Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Where can I find ugpib.h?

Hi Everyone,

                 I have installed NI-488.2 and NI-VISA packages for an NI-GPIB-HS controller on CentOS 5.8. I've successfully attempted to communicate with the attached device using the instructions from this link:

 

http://www.ni.com/support/gpib/max/ibic.htm

 

I am currently attempting to program my device using C, and I am following the instructions from the following link which specifies that I need the "ugpib.h" header file:

 

http://digital.ni.com/public.nsf/allkb/F92BC1B164AEC1BD86256923006B7802

 

 However, I am not able to find this file on the system.  Where can I obtain this header?

 

Cheers!

Syd

0 Kudos
Message 1 of 6
(4,142 Views)

Syd007,

 

On a Windows machine with 488.2 installed, this file is located in C:\Program Files\National Instruments\CVI2010\Include

 

It may be in an equivalent location on a Linux OS?

 

I'll continue to do some searching for a specific location on Linux, but that may be a good place to start.

 

Regards,

National Instruments
0 Kudos
Message 2 of 6
(4,126 Views)

It looks like you found a very old example! That header file was used in some very early beta drivers for Linux. In our current product, you should include ni488.h, which should be installed in your system's /include folder.

 

-Jason Smith

0 Kudos
Message 3 of 6
(4,122 Views)

Hi Chris,

            I did a bit of poking around and below is what worked for me. Please let me know if any of this is incorrect:

 

1. ni4882.h (or ni488.h) has replaced ugpib.h

2. ni4882.h (and also ni488.h) is located in /usr/local/include

 

 

To compile your C program, do the following:

 

1. Copy ni4882.h to /usr/include (you may need root permission)

cp /usr/local/include/ni4882.h /usr/include

2. Insert the following line at the beginninng of your C program:

#include <ni4882.h>

3. Compile your program as follows (assuming your C file is called test.c):

gcc test.c -o test -lni4882

 

REF. I am running CentOS 5.8 and installed the NI-4882 and NI-VISA packages to install an NI-GPIB-HS-USB controller (to control an agilent 6063B device).

 

Cheers!

Syd

Message 4 of 6
(4,120 Views)

Syd,

 

That looks good to me, have you ran into any further problems?

 

Regards,

National Instruments
0 Kudos
Message 5 of 6
(4,103 Views)

Nope... Everything works perfectly! 🙂

 

-Syd

Message 6 of 6
(4,100 Views)