Editing Instrument control package
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 78: | Line 78: | ||
# Prerequisits are that during install of the NI drivers, the C/C++ support | # Prerequisits are that during install of the NI drivers, the C/C++ support | ||
# and the NI Measurement & Automation explorer has been enabled. | # and the NI Measurement & Automation explorer has been enabled. | ||
# this define should find the NI header file, if properly installled | # this define should find the NI header file, if properly installled | ||
Line 91: | Line 86: | ||
# symlink NI header file | # symlink NI header file | ||
mkdir -p | mkdir -p /usr/include/gpib/ | ||
ln -sf "${NI_H_FILE}" | ln -sf "${NI_H_FILE}" /usr/include/gpib/ib.h | ||
# generate .def for all functions in the NI header file with a NI488CC prefix | # generate .def for all functions in the NI header file with a NI488CC prefix | ||
echo LIBRARY ${NI_DLL_FILE} > ${NI_DEF_FILE} | echo LIBRARY ${NI_DLL_FILE} > ${NI_DEF_FILE} | ||
echo EXPORTS >> ${NI_DEF_FILE} | echo EXPORTS >> ${NI_DEF_FILE} | ||
grep "NI488CC *[A-Za-z]" | grep "NI488CC *[A-Za-z]" /usr/include/gpib/ib.h \ | ||
| sed "s/^.*NI488CC *//" \ | | sed "s/^.*NI488CC *//" \ | ||
| sed "s/(.*$//" >> ${NI_DEF_FILE} | | sed "s/(.*$//" >> ${NI_DEF_FILE} | ||
# generate the wrapper library simulating gpib-linux | # generate the wrapper library simulating gpib-linux | ||
dlltool -d ${NI_DEF_FILE} -l | dlltool -d ${NI_DEF_FILE} -l /usr/lib/libgpib.a | ||
#cleanup | #cleanup | ||
Line 112: | Line 107: | ||
You need to build '''rpcgen''' from source [http://mirror.ancl.hawaii.edu/pub/FreeBSD/FreeBSD-current/src/usr.bin/rpcgen]. | You need to build '''rpcgen''' from source [http://mirror.ancl.hawaii.edu/pub/FreeBSD/FreeBSD-current/src/usr.bin/rpcgen]. | ||
If rpcgen cannot be build from source, the following error might be obtained: | If the rpcgen cannot be build from source, the following error might be obtained: | ||
<syntaxhighlight | <syntaxhighlight style="font-size:13px"> | ||
pkg: error running `make' for the instrument-control package. | pkg: error running `make' for the instrument-control package. | ||
error: called from | error: called from | ||
Line 367: | Line 362: | ||
== i2c == | == i2c == | ||
i2c | |||
== TCP == | == TCP == |