Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

always VI_ERROR_RSRC_BUSY on reads, can't recover

Okay,

a couple more oddities that I noticed while getting the pyusb / Tektronix TDS2014B stuff to behave on the "curve?\n" data requests...

Something isn't doing type conversions quite right. If I understand it right, somehow data that comes from the scope as unsigned 8-bit integers is getting converted first to a signed 8-bit integer, then up to a signed 16-bit integer. (That is, a read operation that should yield 129, 0x81, instead bubbles up as a 16-bit -127, 0xff81. I suspect the problem's in pyusb, but it could also be in libusb or lower. In any case, it's likely a platform-dependent error. (I'm running 32-bit SUSE 10.0 on top of a 64-bit Intel chip.)

The data sent back in response to my "curve?\n" is not zero-padded to a multiple of 4 bytes. The amount of data which comes through is what it's supposed to be, except for the lack of padding. I think this is technically a violation of USBTMC spec on the scope end.

The "curve?\n" request generates a sequence of three transfers when the maximum data (2500 bytes) is requested. Apparently the TDS2014B's internal buffer is only about a kB. The data can be gathered by looping on calls to bulkRead() until bmTransfer Attributes returns as 1 (instead of 0).
Sarah Messer
gamer, physicist, programmer
0 Kudos
Message 21 of 32
(4,567 Views)
It looks like you are doing good work, thanks for the updates. I've had to put my Tek investigation work on hold (forever?) and I've since replaced the Tek with our Agilent mixed signal scope which works beautifully and runs over ethernet. Getting these automated test stations is more important than working my way around a problematic scope.

I'm actually evaluating another scope today. It's a Taiwanese "Good Will" brand, 100MHz with 4 channels. It has GPIB, RS-232 and USB. The USB device in this scope appears as a serial port and just takes normal SCPI ASCII commands. It's also about AUD$1000 cheaper than the Tektronix. Sound like a good idea to me!

http://www.goodwill.com.tw/showproductdetal-e.asp?pd1_sn=484&p1sn=4&p2sn=4

I had a good long talk to Tektronix yesterday and there isn't much else they can do for me. Hopefully this new scope will meet our (simple) requirements and it will just work.

Thanks again!




0 Kudos
Message 22 of 32
(4,564 Views)
"I am (mostly) able to communicate with my Tektronix TDS2014B digital
oscilloscope via USB using the PyVISA software with Ubuntu Linux 2.6.15.

I have all the National Instruments software running and I figure that since I
can communicate with the scope at all shows that I must have most things setup
correctly. I only started doing all this within the last week, so I should have all the
latest NI software and drivers."


Hello,

I also would like to communicate with a tektronix scope, and I also use Ubuntu.

I've just installed Dapper Drake (2.6.15-26-386 kernel), with default parameters.
And I've also installed rpm, build-essential packages.

And when I run INSTALL file, I got this error :
************************************ ERROR *************************************
* Kernel source does not appear to be installed for the 2.6.15-26-386 kernel.
*    Installation of the kernel-source package for kernel 2.6.15-26-386 is
*                   required to continue this installation.
************************************ ERROR *************************************


So, I installed "linux-source" package, but the problem remained.

It seems that we almost have the same configuration, and you've succeded to install NI-Visa.


Did you get this error? How did you fix it?
What were the steps you went through, to install NI softwares?

Thanks
0 Kudos
Message 23 of 32
(4,530 Views)
you might try the "make cloneconfig" bit that's outlined in the README file, even though that's specific to SUSE.
Sarah Messer
gamer, physicist, programmer
0 Kudos
Message 24 of 32
(4,525 Views)

Thanks for the reply.

' you might try the "make cloneconfig" '


I've noticed this information in the readme file, and I already tried to execute it.
But I'm told that there is no rule for "cloneconfig" (it doesn't exist in the Makefile file).

Have you any other idea?
(Have you also installed visa under ubuntu?)
0 Kudos
Message 25 of 32
(4,522 Views)
I must have been lucky, my install went OK. I'll try and remember what I did:

* loopback mounted the ISO images for nikal, niusbgpib and nivisa.
* copied the files locally
* I remember that the install script was a real pain because of some rpm nonsense, so I just disabled it and forced the install. e.g.

sudo ./INSTALL --force --no-prompt --accept-license --no-rpm

That's the install.

As far as the kernel source problem is concerned, try pointing /usr/src/linux to your current running kernel. There's obviously some mismatch happening there. e.g., on my machine:
$ ll /usr/src/linux
lrwxrwxrwx 1 root users 24 2006-10-09 09:16 /usr/src/linux -> linux-headers-2.6.15-27/
$ uname -a
Linux user 2.6.15.7-ubuntu1 #2 SMP PREEMPT Mon Dec 18 10:25:36 EST 2006 i686 GNU/Linux

"Kernel source does not appear to be installed for the 2.6.15-26-386 kernel."

Are you really running on a 386? Smiley Tongue







0 Kudos
Message 26 of 32
(4,517 Views)
Thank you for your help.

I've tried so many things, that I think I should try again with a "clean" distro.
What version of Ubuntu did you install?

"Are you really running on a 386?"
There are 3 possibilities :
- powerpc
- amd64
- i386
And I'm not running on the 2 first 🙂


I'll try to install
Dapper Drake, and its updates (I'll get a 2.6.15-27 linux kernel)
And launch the VISA installation, as you showed.


0 Kudos
Message 27 of 32
(4,504 Views)
i386 is used to describe the current base inctruction set used by many processors including pentium, pentium2, pentium3 and so on.

a 386 is actually a specific chip (from around 1990 I think) which is basically the origin of this feature set.  It is the oldest in the family to have the full set of instructions which are known as i386.  These instructions are otfen chosen as standard to aid compatibility.  After this came the 486, Pentium, Pentium pro, Pentium 2, Pentium 3, Pentium 4 and so on.

You will actually note that there are a lot of Linux distributions available for "i586" meaning that they use a compiler taking advantage of the added instruction sets up to Pentium level.

Now I've written a lot.  Some of it must be wrong, but my fuzzy memory is all I got to go by....

Long story short: This is why someone asked if you were REALLY running a "386" (not i386).

Shane.

PS I know, I know, I'm already getting a coffee.

PPS Some of what I said was close to the truth.  See here for more details on something which has gone totally past the original topic.  Sorry.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 28 of 32
(4,498 Views)
Just a follow up ...

The GW scope was inexpensive and very basic. It did have a nice USB text only interface, but it didn't provide much more than the basic remote functionality. For example, you can't remotely retrieve the MATH waveform. e.g. I couldn't retrieve an FFT of a waveform(!)

I think there were certain incompatibility problems with the USB controllers on my main PC's motherboard - not unusual. I run Linux as my host system and Windows XP in a VMware session. I've been able to get all other USB devices working with both systems, and the Tektronix  scope was the only exception. I think this shows that it has some firmware problems in that area.

I've since reconnected the Tektronix scope to a different computer and I am having better success with it. But there is a twist!

The first time I installed the National Instruments software, I was able to run the scope and I could not reproduce the original visa.read timeout errors that started this thread. When I came in to work the next day, I could not communicate with the scope any more and I started to get the original errors again! No amount of rebooting, powering cycling or replugging made a difference.

The solution? I removed all the NI VISA drivers and installed the "Agilent IO Libraries Suite" drivers instead. I now have no problems at all and I'm using the PyVISA software to control my scope.


0 Kudos
Message 29 of 32
(4,446 Views)

Hi,

I am also trying to interface with TDS2000B USB from Linux.

I googled and found this thread.

I read thru all of these and they are very helpful.

Did you eventually get it work stably?

Regards,
Sheng

0 Kudos
Message 30 of 32
(3,800 Views)