1,848
edits
m (Remove redundant Category:Packages.) |
|||
(13 intermediate revisions by 7 users not shown) | |||
Line 20: | Line 20: | ||
! TCP | ! TCP | ||
| bgcolor="green" | v0.2.0 || bgcolor="green" | v0.2.0 || bgcolor="green" | v0.2.0 || bgcolor="skyblue" | stalled || bgcolor="green" | v0.2.2 | | bgcolor="green" | v0.2.0 || bgcolor="green" | v0.2.0 || bgcolor="green" | v0.2.0 || bgcolor="skyblue" | stalled || bgcolor="green" | v0.2.2 | ||
|- | |||
! UDP | |||
| bgcolor="green" | v0.3.0 || bgcolor="green" | v0.3.0 || bgcolor="green" | v0.3.0 || - || bgcolor="green" | v0.3.0 | |||
|- | |- | ||
! USBTMC | ! USBTMC | ||
Line 25: | Line 28: | ||
|- | |- | ||
! GPIB | ! GPIB | ||
| bgcolor="green" | v0.2.0 [[#Linux|(*)]] || | | bgcolor="green" | v0.2.0 [[#Linux|(*)]] || bgcolor="green" | v0.2.0 [[#Windows_.28cygwin.29|(*)]] || - ||- || - | ||
|- | |- | ||
! VXI11 | ! VXI11 | ||
Line 57: | Line 60: | ||
For VXI11 support, please install 'rpcgen', 'libtirpc-devel', and 'libtirpc1' before installing instrument-control. | For VXI11 support, please install 'rpcgen', 'libtirpc-devel', and 'libtirpc1' before installing instrument-control. | ||
To be able to use GPIB on windows, the linux-gpib library needs to be 'faked'. This can be done by copying the following script and run it in a bash-terminal. | |||
<source lang="bash"> | |||
#!/bin/bash | |||
# fake_linux_gpib.sh, Kire Pûdsje, Dec 2017 | |||
# This file generates a fake linux-gpib library on Windows, based on the | |||
# installed NI libraries. | |||
# Prerequisits are that during install of the NI drivers, the C/C++ support | |||
# and the NI Measurement & Automation explorer has been enabled. | |||
# set the base for includes and libraries on your system | |||
# it is usually /usr, but on newer windows installs of octave, it will be | |||
# /mingw64 | |||
INSTALL_BASE=/usr | |||
# this define should find the NI header file, if properly installled | |||
# otherwise just point it to the proper header file. | |||
NI_H_FILE="${NIEXTCCOMPILERSUPP}/include/ni4882.h" | |||
NI_DLL_FILE=ni4882.dll | |||
NI_DEF_FILE=/tmp/${0##*/}-$$.def | |||
# symlink NI header file | |||
mkdir -p ${INSTALL_BASE}/include/gpib/ | |||
ln -sf "${NI_H_FILE}" ${INSTALL_BASE}/include/gpib/ib.h | |||
# generate .def for all functions in the NI header file with a NI488CC prefix | |||
echo LIBRARY ${NI_DLL_FILE} > ${NI_DEF_FILE} | |||
echo EXPORTS >> ${NI_DEF_FILE} | |||
grep "NI488CC *[A-Za-z]" ${INSTALL_BASE}/include/gpib/ib.h \ | |||
| sed "s/^.*NI488CC *//" \ | |||
| sed "s/(.*$//" >> ${NI_DEF_FILE} | |||
# generate the wrapper library simulating gpib-linux | |||
dlltool -d ${NI_DEF_FILE} -l ${INSTALL_BASE}/lib/libgpib.a | |||
#cleanup | |||
rm -f ${NI_DEF_FILE} | |||
</source> | |||
== MacOS == | == MacOS == | ||
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: | |||
<syntaxhighlight lang="text" style="font-size:13px"> | |||
pkg: error running `make' for the instrument-control package. | |||
error: called from | |||
configure_make at line 99 column 9 | |||
install at line 184 column 7 | |||
pkg at line 437 column 9 | |||
</syntaxhighlight> | |||
If the '''VXI-11 interface''' is not required, a workarround is proposed in [https://stackoverflow.com/questions/46720092/make-error-when-installing-instrument-control-package-for-octave/52860282#52860282] after the bug reported on [https://savannah.gnu.org/bugs/?54842]. | |||
= Examples = | = Examples = | ||
Line 95: | Line 149: | ||
}} | }} | ||
Changing some configurations is simply done by calling helper functions | |||
{{Code|Serial port example: helper functions|<syntaxhighlight lang="octave" style="font-size:13px"> | {{Code|Serial port example: helper functions|<syntaxhighlight lang="octave" style="font-size:13px"> | ||
set(s1, "baudrate", 9600) # Change baudrate | set(s1, "baudrate", 9600) # Change baudrate | ||
Line 401: | Line 455: | ||
* Every read or write command opens and closes a new gpib session, since the linux-gpib session pointer is only valid for single command. | * Every read or write command opens and closes a new gpib session, since the linux-gpib session pointer is only valid for single command. | ||
[[Category:Octave | [[Category:Octave Forge]] |