Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem reading data from Tektronix oscilloscope

206 views
Skip to first unread message

james

unread,
Dec 8, 2009, 3:14:02 PM12/8/09
to
Dear all,

I have a Tektronix DPO4000 series oscilloscope connected to my PC via USB. I'm using the Instrument Control Toolbox and have followed the guide 'USING MATLAB WITH A DPO4000 AND MSO4000 SERIES OSCILLOSCOPES' provided by Tektronix. All works as expected and I am able to save waveform data from each channel on the scope using the 'readwaveform' function.

For my application I need to save 100,000 data points, I have set the record length on the scope to 100,000 yet when I read the data in to MATLAB via USB I only get the first 10,000 points. When I save the data directly on the scope I get the full 100,000 points so I know that's OK. After a little digging I thought that perhaps the input buffer is too small, consequently I have changed it's size to 250,000, yet I still only get 10,000 points! Any ideas??

Thanks,

Jim.

Trent Jarvi

unread,
Dec 8, 2009, 6:35:04 PM12/8/09
to

"james " <jimwa...@hotmail.com> wrote in message
news:hfmc2a$acg$1...@fred.mathworks.com...

Answering Jim her as well...

It appears that the MSO4000 series drivers do not take into account the
record length so it will need to be modified with MIDEDIT. I don't have
this instrument handy for testing but the code for the readwaveform method
would need additional code added like the following:

...

try

% Specify source

fprintf(interface,['DATA:SOURCE ' trueSource]);

%%%%% START CODE TO HANDLE > 10,000 points %%%%%%%%%%

recordLength = query(obj, 'HORIZONTAL:RECORDLENGTH?');

fwrite(' DATA :START 1');

fwrite([' DATA :STOP ' num2str(recordLength)]);

%%%%%%%% END CODE TO HANDLE > 10,000 points %%%%%%%%%

% Issue the curve transfer command.

fprintf(interface, 'CURVE?');

raw = binblockread(interface, 'int16');

% Tektronix scopes send and extra terminator after the binblock.

fread(interface, 1);

catch

set(obj, 'Precision', oldPrecision);

set(obj, 'ByteOrder', oldByteOrder);

error(lasterr);

end

...

All the best,


mario Farrugia

unread,
Jan 29, 2010, 11:31:22 AM1/29/10
to
"Trent Jarvi" <tja...@mathworks.com> wrote in message <hfmnr8$5fs$1...@fred.mathworks.com>...
Hi James,

I am having the same problem as you. Did you manage fix it ?

regards
Mario

james

unread,
Feb 1, 2010, 4:53:02 AM2/1/10
to
"mario Farrugia" <eex...@nottingham.ac.uk> wrote in message <hjv2gq$f9c$1...@fred.mathworks.com>...

Hi Mario,

I've fixed the problem now.

I added the code that Trent kindly provided, however, I was still only able to record 10,000 data points. I spent some time looking through the various functions and properties and found a property called 'MaxNumberPoint' it was set to 10,000. I tried to increase this to 100,000 but wasn't able to. I edited the driver file and set this property manually. Now the system works fine, I get 100,000 data points as desired (BTW be sure to increase the buffer length to accomodate).

Regards,

James.

Bo

unread,
Nov 6, 2012, 4:52:08 PM11/6/12
to
I met this problem too. Now I have solved this problem. Actually there are 2 properties we need to modify. The first one is 'Endingpoint', which belongs to waveform properties. The default number is 10000, we could set that to be the same as Recordlength by editing the driver file *.mdd. The other one is input buffer size. That one could be configured by the set command. It should be at least 2 times larger than the recordlength. After that I am able to get a waveform which contains 10M points.


"mario Farrugia" wrote in message <hjv2gq$f9c$1...@fred.mathworks.com>...

Clayton Chu

unread,
Dec 13, 2012, 8:54:09 PM12/13/12
to
"Bo" wrote in message <k7c0q8$d5n$1...@newscl01ah.mathworks.com>...
> I met this problem too. Now I have solved this problem. Actually there are 2 properties we need to modify. The first one is 'Endingpoint', which belongs to waveform properties. The default number is 10000, we could set that to be the same as Recordlength by editing the driver file *.mdd. The other one is input buffer size. That one could be configured by the set command. It should be at least 2 times larger than the recordlength. After that I am able to get a waveform which contains 10M points.

I'm having trouble getting more than 10k points out too. I'm using the DPO4014 driver, though.

My EndingPoint default number was actually 0 in my driver file. I changed it to 100000 manually. Then I set the InputBufferSize in MATLAB to 210000. ANy ideas?
0 new messages