Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.
- (1.76 KiB) Downloaded 1100 times
I looked over your Matlab script and your coworker will have to rewrite it to be compatible with the DPO77002SX. A few problems I see are:
1) You have a 'for loop' which loops through settings of four channels. This will cause a problem since the DPO77002SX only has three channels (not four).
2) Furthermore channel 2 on the scope is the ATI input. You can only use channels 1 & 3 OR channel 2. So as the loop first mentioned changes to and from channel 2, it'll turn off or on appropriate channels.
3) The third problem I cannot explain why but did notice that 'readasync(dpo)' in your MATLAB script isn't actually reading; which in turn is causing the timeout to send the message 'The oscilloscope has no signal'. Using the 'fread(dpo)' command will read the waveform.
Thanks again for the reply.
I rearrenged the code so it only selects the first and third channel. Tried using the 'fread(dpo)' command to read the waveform but it just says 'Timeout expired before operation completed', furthermore the 'dpo.BytesAvaible' is always equal to 0 so it is not able to aquire data. I'm not quite sure what commands are wrong in the code. What is the simplest way of reading osciloscope data in matlab using visa communication so I can try it?
'fread(dpo)' is not a drop in replacement to 'readasync(dpo)'. 'readasync' will read from the object and store in the buffer; while 'fread' will read into an array. If you do not assign a variable to store the array from 'fread' then using that command will only clear the buffer from the scope.
For examples to use MATLAB with our products, refer to this link:
For an example MATLAB code reading the data from the scope, refer to this link:
Who is online
Users browsing this forum: No registered users and 10 guests