11-28-2016 01:36 AM
Hi dear Gurus,
I wonder if you could help me. I've been working on this programme for weeks now.
I need the instrument to do 2500 (maximum buffer of instruument) 4-point resistance measurements once every second and then give me the results in a file. Simple, right?
But I cannot get all the results out even though I do believe those 2500 measurements were performed. A :FETC? command gives the first 112 readings in full, and a truncated version of the 113th reading. I have played with and maximized the possible byte count for the VISA read command but cannot increase the number of readings further.
I suspect either that the VISA read command times out before the contents of the buffer can be read in full, or that the size of the buffer in LabView has limitations. I have tried using a separate programme to read the buffer after measurements are completed but also get a truncated result.
I hope someone could help or at least offer some suggestions as I am at my wits' end. Attached are the block diagram and the VI I have written. 150 measurements is enough to bring out the error. Thank you, everyone.
Solved! Go to Solution.
11-28-2016 02:48 AM
Hi
I think the problem is not in the VISA buffering but in the keithley.
Try to do more reads of less length, less then 112 readings, say 64 readings each time.
I don't have access to a keithley at the moment but this is easy to do.
Change the read into a for loop of reads and test it.
11-28-2016 04:05 AM
Hi there Albert,
Thank you so much for the suggestion!
i have tried it already, and in fact have done a "measure 75pts: read: measure 75pts: read". The second read command read the values from the start. I tried to clear the buffer before the second read command but that was not allowed. Do you know if there is some read offset command or function I can use..?
tgank you again and greetings from Singapore! 🙂
11-28-2016 06:23 AM
11-29-2016 03:58 PM
Lets do a little math. 2500 readings of 70bytes each is 175,000 bytes. the typical conversion for 8 N 1 is Buad * 0.125. So, at 9600 you are looking at 1,200 bytes/second or 145.83 seconds to make your transfer. At 57600 Baud (the fastest that device supports) you need 24.3 seconds.
11-30-2016 03:19 AM - edited 11-30-2016 03:20 AM
Thank you for the calculations, Jeff!
By maximizing the baud rate, I managed to read 453 readings before the VISA read timed out.. So I guess the timeout limit is 5 seconds. It would be really good if I can increase this limit since I don't really care how long it takes as long as I get all the readings.
Given my limitations, I'm now working on a '450 measurements:read:450 measurements:read' loop. Not the most elegent solution but the best I can do given my limited knowledge. Thank you again. 🙂
11-30-2016 11:18 AM
You Can change the timeout valueusing a property node. !!!CAUTION: the timeout is normally only set by "Initialize.vi" for the device. So you need to set it back to that value when you exit. If, you don't every downstream call will have the same extreemely long timeout and no one will know how the heck it got to be that long! When they finally find out who did that you may have a VERY angry developer looking for you 😉
11-30-2016 11:32 AM
Can't wait to try! Thanks, Jeff! Hoe I can mark this as solution tomorrow! 🙂