01-23-2007 08:15 AM - edited 01-23-2007 08:15 AM
Thanks for your reply.
I've been fiddling with it for the past hour and the problem appears to be in "Read Waveform to Array.vi". If I use the lightbulb on that (which also slows down its execution?) the rest of the program runs fine, no errors, and can be run many times. The problem still remains however that not all data points are being gathered onto the PC. It appears (though it might be a coincidence) that the more peaks that are displayed on the oscilloscope, the more data points the PC will gather (inspecting the code, and from the screenshot below this is 2513 in total, and 2500 waveform points, and sometimes it does gather 2500). However, sometimes it can be as low as around 150.
After this VI has been run the buffer is flushed so the rise time can be measured without error, however i really would like the whole waveform to be displayed. Im wondering whether to set the data points to manually be 2500 rather than let the program determine it, as the example is obviously written for a general audience. Im starting to get the feeling i should write from scratch, however i feel that its easier to learn by tweaking an example.
Perhaps the read visa function is not reading all the points before moving on? Im not sure if it makes a difference but by typing the curve? command into hyperterminal and seeing the binary results being displayed it takes a good few seconds for it to be totally written out. Im not sure if thats a limitation of hyperterminal or the fact that the read buffer is slow. Any ideas? I really appreciate the help so far, im almost there!
Message Edited by Exulus on 01-23-2007 08:17 AM
Message Edited by Exulus on 01-23-2007 08:19 AM
01-23-2007 08:26 AM
01-24-2007 04:21 AM - edited 01-24-2007 04:21 AM
Message Edited by Exulus on 01-24-2007 04:22 AM
01-24-2007 08:12 AM
No, what I wanted probed was the return count output which will have the exact number of bytes read and not the number of bytes requested. In any case, my previous answer about hard coding some large number of bytes to read would probably not work because you have a serial connection and forgot that for a moment.
I wish I had access to the actual scope but that would mean that I would have to take one away from one of the debug techs on the floor for some amount of time. There are a couple of things that you can try. First, have you simply tried changing the stop point? Instead of 2500, try some higher number and see if you get an error. The other thing that could be done is place a VISA Bytes at Serial Port just before the VISA Read in the TKTDS1K2K Read subVI. This function will report the number of bytes that are in the serial port buffer. If there is a difference between this value and the number of bytes that has been calculated, then that will tell us something.
01-24-2007 10:42 AM
01-24-2007 06:13 PM - edited 01-24-2007 06:13 PM
Message Edited by Jason Hobbs on 01-24-2007 06:14 PM
01-25-2007 02:18 AM
01-25-2007 10:20 AM
01-25-2007 10:21 AM
01-26-2007 11:56 AM