Capturing Data from RS232, Tektronix TDS210 - Page 1
Forum section: electronics / beginners

author: coldfiremc
author_rank: Regular Contributor
timestamp: April 07, 2018, 09:46:52 pm
content: Hi all, this is my first postI have an old Tek TDS210 oscilloscope in my hands. I want to log some waveforms and make some "more decent" graphs, so made one of those null modem cables, and I managed to get data almost successfully with matlab... there are some quirks; the first: Apparently Data is referred to -32768,+32768, and it hasn't the real voltage and time values. Of course, I can get Volts per division and time base, and other properties from the serial interface, but I don't know how to calculate the correct values for waveform. How I can calculate them? Is this the normal behavior? I remember that a TDS1001B with VISA over usb, delivered data in the final representation almost inmediately, so I can expect the same of the first? The second problem: by a strange reason, TekVISA doesn´t work properly from matlab it loops the query command infinetely, and cant get anything, however it says that this TDS210 works with that protocol.I haven't buy this scope, so don't cry that "there are better new scopes", I know it.I will attach you a .csv file and a plot so you can check data. Is the first channel connected to probe test clamp.thanks for your help

author: Nitrousoxide
author_rank: Regular Contributor
timestamp: April 08, 2018, 05:10:11 am
content: From a quick glance, 15 bits of data will give you a maximum unsigned value of 32768. The data is probably in signed 16-bit form from just a guess.Obviously, the scope doesn't have 16 bits of resolution, so at a guess, the values might be scaled by a factor of 256x (not too sure). To convert that into a meaningful form, you'd need the ADC maximum input per range.As for timebase, if you have the sample time you then know the time between each sample.I am confused as to what specifically you would like to calculate? Are you referring to measurements that can be performed by the scope, such as period, Vrms etc? There are quite a few matlab commands that allow you to perform those.Another tip is to check out the test equipment interface toolbox command: oscilloscope();What you may need to be careful of, especially with some scopes and Matlab is that they don't transfer the full sample memory, (i.e. Rigol has a maximum size of 1200 points) and thus may be downsampled.

author: coldfiremc
author_rank: Regular Contributor
timestamp: April 08, 2018, 07:46:18 pm
content: thx man.I managed to get correct values with 1v per div. I divided all values by 65535. however this "stops to work" when I shift the position with the vertical knobs or if I change scale. Also I managed to use VISA. The problem was incorrect serial port settings.The Instrument control toolbox is transferring 2500 samples to PC. Looks enough. Is quite slow... Is GPIB an "upgrade" option here? I have an old gpib pci card, but i can't make it work under modern windows or linux versions it just says IEE488.2.I want to graph the data to make reports, and also logging, also measure RMS, frequency, put cursors to calculate time or voltage offsets.

author: Nitrousoxide
author_rank: Regular Contributor
timestamp: April 09, 2018, 01:14:40 pm
content: Quote from: coldfiremc on April 08, 2018, 07:46:18 pmFor reports, write all your code in a script file and then click on the publish tab, it will give many options to generate a nice report.Again, with a script you can loop the readWaveform/getWaveform function.For RMS values, you can just execute: rms(data)For finding the frequency, there's no specific function to find a "trigger". So there are two ways to find the frequency: Write your own code to find the zero crossings, however this will usually fail as is the data is non-periodic or contains more than a single tone, the reported frequency may not be accurate. Second option would be to utilise the fft and findpeaks function (which I would recommend using).As for using cursors, there are some available in the plot window. It is the 10th icon in the plot toolbar, named "Data Cursor".I can't make a comment on how fast GPIB is as I have never used it. (Only used LXI ).When you change scale, you need to divide by a different value.