02-16-2008 02:28 PM
That sounds like it could be due to the input connection. Have you tried changing the terminalConfig to VAL_DIFF (from VAL_RSE) and then connecting your battery to terminals 2 and 3 (instead of 1 and 2)?
@jcz wrote:
I've just tested your library. It took me a while to understand how to do it, as I never used SWIG before.
Anyway this is what I did:
0. setup a NI USB-6008 with some AA battery connected to AI0 (see attached photo)
1. installed Cygwin (I work on Win2000)
2. setup .paths in the "vimrc" file.
3. run "make -f Makefile.swig "
4. run "ruby test.rb"
It worked, but didn't show correct values. I changed settings inside the file, but still wrong numbers.
I then tried to run other examples and I couldn't run them (I guess the fault is on my side in ruby).
However I managed to run acquireNscans.rb , and it worked perfect.
It took me quite long time today to do. I tried to compile it without installing cygwin, then I compiled it in cygwin, but SWIG seems to be out-of-date, etc.etc. but at the end of the day I've got some results.
$ ruby acquireNscans.rb
[1.38554652487558, 1.37531881852636, 1.37531881852636, ...
@jcz wrote:
Is there any forum/topic where others discuss issues or work on the code similar to yours ?
What I am interested in is a library that would allow me to use Ruby or Php to communicate with devices through GPIB, Ethernet , serial port, etc.