Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB problem in linux (possibly timing problem)I

I'm encountering problems with GPIB under linux (using the PCI-GPIB card with driver 0.6). One of the devices attached to the bus stops operation frequently (sometimes at the first ibwrt or ibrd command, sometimes only after several minutes). Data transfer stops right in the middle, usually after the first byte during writes, but after an arbitrary number of bytes during reads. While command messages still work (ibloc, ibclr, ibrsp etc.), only a hard reset of the device will allow to resume operation. While the latter is certainly a problem with the specific device (an nmr teslameter by Bruker), I wonder whether the problem might be due to timing problems, since everything used to work fine on an old 486DX
machine with an ancient 8bit GPIB card by HP, using (buggy) the LLP drivers. More specifically, is it possible to increase the T1 time beyond the 2 microsecond limit allowed by the driver?
0 Kudos
Message 1 of 3
(3,055 Views)
When you say a hard reset, I'm assuming that means powering down everything. Have you tried the ibonl command to reset the bus before trying to resynchronize with the device?

Also, it sounds like your new computer is a bit too fast for your current device, especially if the errors' timing is sporatic. Try placing ibtmo commands inside your program to slow the program down. Also, I'm not sure if NI-SPY comes with our linux driver, but if it does, have that running in the background. It will slow the transfer down slightly, and more importantly will give you details to exactly where and why the errors are taking place!
0 Kudos
Message 2 of 3
(3,055 Views)
With "hard reset" I refer to pressing the big red "Reset" button on the device front panel. The manual says that it reinitializes the device AND the built-in GPIB interface.
I wonder about your suggestion that the new computer might be too fast, although it looks as if. But shouldn't the GPIB handshake protocol assure correct message transmission irrespective of device speeds? The problem occurs even for very long timeouts, and I have additonal delay statements in the code after each call into the gpib library, but still lockups occur during execution of ibwrt and ibrd calls.
NI-SPY isn't available for linux, but I've tried to manually resurrect the device after a hangup with the ibic tool - doesn't work.
I will try your suggestion with an additional ibonl comm
and. Should that go to the device ud or to the board ud?
Thanks for your help anyway!
0 Kudos
Message 3 of 3
(3,055 Views)