04-18-2012 12:56 PM
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
04-19-2012 10:45 AM
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,
04-19-2012 11:15 AM
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
04-19-2012 11:18 AM
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
04-20-2012 11:03 AM
Syd,
That looks good to me, have you ran into any further problems?
Regards,
04-20-2012 11:07 AM
Nope... Everything works perfectly! 🙂
-Syd