Hello!
I'm having somewhat annoying problem with GPIB communications. I've already read the following threads...
http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Random-GPIB-timeout-error-in-NET-application/m-p/1833893/highlight/true#M51164
http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/ReadString-get-time-limit-exceed-to-complete-operation-error/m-p/3034667/highlight/true#M66183
... and I've tried the suggested solutions with no luck.
The setting:
- Windows 7
- Visual Studio 2008
- Latest GPIB-drivers (15.0)
- USB-GPIB-HS
We're running a test software in our production system that has been programmed by using VB.net and C# (Visual Studio 2008).
When I try writing (_device.write("Q0;HV;RES?")) and reading (.device.readString()) as fast as possible on my work desk (laptop + USB-GPIB-HS + Finero Quanti safety tester) everything works just fine even without any delays in the code. I get approximately 17 replies in a second. I tried this 100 times in a row (for-loop). No problems, exceptions or anything.
The second I march out the door to the factory floor and try the same code in one of the testers I get "Time limit exceeded to complete operation." -error. And it's totally random and at the same time not so random. There are ~4-6 testers using the same code right now (with the exception of 50 ms delay between every write and read) and the next tester fails the first .readString()-command 90% of the time. All the testers are identical. The tester finished safety testing -sequence only ONCE out of six.
The only difference is that I'm using laptop and the test-PC's in the testers are new Advantech industrial PC's (also running Windows 7).
First I tried 50 ms delay between the write and read command. Then 250 ms. A second. Two seconds. NOT WORKING. Frustrating. I've been working on these new Quanti codes for a month now and I can't release them into the production if it's not 100% reliable.
Should I tweak GPIB settings? Delay is too short/long? EABO (6) means "I/O operation aborted." (what do you mean "aborted"? Why? It doesn't even try to read.)
Any ideas?
Ps. At some point I got the same error on my laptop but only once. The problem vanished on its own without no apparent reason.
Janne Yli-Arvo, Testing Engineer
Tel +358(0)40 8371 973
Vacon Plc, Runsorintie 7, 65380 Vaasa, Finland
Driven by Drives, www.vacon.com