06-23-2014 04:08 AM
Hello,
I have a labview application which reads data from two Keithley 2000 multimeter via GPIB in every 1 second.
I use the official llb driver package from here:
At random, I get VISA timeout errors, and my application stops working (sometimes after 1 hour running, or after several days...). If I restart my application it starts to work again properly. Additional info, I have an old CEC GPIB card (CEC) which is present in MAX.
The error code is linked (sorry it is just a quick phone photo), and also the subVI which I call in every 1 second (I properly initialize the two Keithleys at the beginning of the application).
https://dl.dropboxusercontent.com/u/8148153/read_K1_K2.vi
https://dl.dropboxusercontent.com/u/8148153/labview_error_mod.jpg
Any idea, whats going on?
thanks very much!
06-23-2014 07:48 AM
What is the GPIB timeout set to? You could try lengthening it a bit, or add an automatic retry such that of you get the timeout error, you retry the IO at least once before giving up and reporting the error.
Mike...
06-23-2014 08:11 AM - edited 06-23-2014 08:13 AM
Nevermind, I need a cup of coffee.
06-23-2014 08:43 AM
It looks like the default timeout for wat for event (25000mSec) is being used. So its quite likley that a trigger condition is not being met. We would need to see the rest of the keithley configuration.
06-23-2014 08:58 AM - edited 06-23-2014 09:00 AM
please find the whole project zipped here:
https://dl.dropboxusercontent.com/u/8148153/IGC-A_LabView_application_2014.zip
regards and thanks for help!
06-23-2014 09:34 AM - edited 06-23-2014 09:36 AM
Try reversing these two vis. there is a slight possibility that you are discarding the event you wanted to wait for since the measurements are being taken all the time. Actually. you probably want to clear the status register, then flush the event buffer then enable the event.
06-23-2014 09:58 AM - edited 06-23-2014 09:59 AM
"Actually. you probably want to clear the status register, then flush the event buffer then enable the event."
--> could you give more details about this please?
Maybe the driver package for the Keithley 2000 should be fixed at the NI website? I mean, when I use an "official" llb from NI, I would expect that it works without such hidden traps...?
(Actually I have seen even worse things in "official" NI llb drivers: the Keithley 2400 sourcemeter's output was casted as single precision float instead of double, so the possible nominal resolution of the output current was not used... 🙂
06-23-2014 10:22 AM
Would be where to direct your feedback. in 99.995% of all use cases you set up the event then send the command to start the function that results in the event. This is that odd use case where the data is constantly being acquired asynchronously. Result: an occaisional race condition that is nearly impossible to reproduce and difficult to troubleshoot ( I hope you apprciate the skull sweat required to find a potential cause for what you observed):smileywink:
Now as to certified- it is certified tested (and the test report is surely filed somewhere) I doubt that this use case was tested since it rears up only on very rare occasions: Essentially the event must fire almost at the same time as the event is enabled. No way to force that! There is also a Submit feedback button on the driver download page. DO USE IT! NI will file that info away and may implement the change the next time they update the driver. They offer to support the code not that it is completely devoid of any pitfalls or bugs- but they need feedback from users to help them improve.
06-23-2014 10:22 AM
These "official" drivers most likely came from Keithly (some time ago), but something I learned very early on is never, Never, NEVER trust drivers written by instrument vendors. They almost universally stink.
Mike...
PS: Also never blindly assume that instrument commands really do what the manual says they will. In particular, commands can have undocumented "side-effects".
As President Regan once said: "...trust, but verify..."
06-23-2014 10:26 AM - edited 06-23-2014 10:28 AM
Maybe the driver package for the Keithley 2000 should be fixed at the NI website? I mean, when I use an "official" llb from NI, I would expect that it works without such hidden traps...?
Well... Yes and no.
I believe that "NI Certified" only means the driver package conforms to NI standards for creating an instrument driver. It does not mean the driver works in every possible instance or configuration.
You have to remember that most of the drivers available on the Instrument Driver Network were written by users or the instrument manufacturer.
I have seen some of the absolute worst examples of LV programming in instrument drivers supplied by the manufacturer of the instrument. Obviously some manufacturers either higher a contractor who does not fully understand the instrument or task one of their C programmers who does not understand proper LV programing techniques to just throw together an LV driver just so they can say they have LV support.