01-03-2014 12:18 AM - edited 01-03-2014 12:19 AM
Hello forum members,
I have wrote a program in LV2010 and is working fine except for one final issue.
The program runs very slow and sometimes show timeout error. In the program I send a voltage to Keithley 2400 and simultaneously measure current from Keithley 2400 and 2000. I sweep the voltage using a while loop. I have not used buffer.
Your kind help would be highly appreciated.
Thanks.
Pradeep
Solved! Go to Solution.
01-03-2014 12:22 AM
What is "very slow"? What speed you need? What determines the loop rate?
Your description is insufficient to troubleshoot. Can you attach your VI?
Which function gives the timeout error?
01-03-2014 12:32 AM
Oops! sorry. I forgot to mention the problem.
After scanning the measurements from 2400 and 2000, I plot it in a XYY graph. On excecuting, the graph plots the data very slowly. Sometimes it appears to struck at say 6 V, and waits for around 10 seconds. On repeatdly running the program, a timeout error is displayed.
There is no wait command for the loop and I want the loop to be re-executed immediately.
01-03-2014 12:49 AM
How many data points do you typically acquire. If the number is large, you might run into memory problems by constantly growning the arrays in the shift register.
Since you know the number of iterations from the start, you should use a FOR loop instead of a while loop (you can show the conditional terminal the stop prematurely with the button). Also, since you know the final size of the arrays, you should reallocate them (containing NaN, so they don't show in the graph), then use replace array subset to fill with real data. You can replace the bundle and array operaration with a "build cluster array". Fewer steps. (Personally, I would use complex arrays for the xy graph). What determines your loop rate?
01-03-2014 01:14 AM
Try this quick draft with a few suggestions for code improvement. (LabVIEW 2010)
01-03-2014 04:45 AM
I may at large need 20-40 (typically 10-20) data points. An timeout error is generated at KE2400 Read. Is it something connected with the size allocation of the memory? Can it be expanded, if so how?
Your suggestions were very useful in making the program look a little simple. Thank you.
01-03-2014 06:04 AM
I also noticed that the KE 2400 instrument show error code -410 (Query interupted), -420 (Query Unterminated) and -113 (Undefined header) during the measurements.
01-03-2014 01:08 PM
I am not familiar with these instruments. What are your timeout settings? What is your loop rate? You might need a small delay in the loop (as in my example). Maybe the instrument is not ready to receive another query right after sending data. Maybe you are simply hammering the instrument faster that it can handle it.
Also look at hardware issues, communication cables, etc.
01-03-2014 01:30 PM
For the 2400, you are not using the certified driver from NI and then you are mixing in a low level GPIB function instead of VISA. Where did you get the 2400 driver? I would suggest that you use a better driver and get rid of the silly GPIB function. It is also silly to use a string for the VISA Resource Name. After this, you need to look at the read functions for both instruments and review what they are doing and look up the functions in the manuals. It does not appear to be any problem with LabVIEW but with how they are configured.
01-03-2014 01:41 PM
A few things I noticed: