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.

DPO7014 can’t determine saving CSV data range by programming command

Post Reply
s31167
Posts: 4
Joined: June 23rd, 2016, 10:00 pm
Country: Taiwan

DPO7014 can’t determine saving CSV data range by programming command

Post by s31167 » June 23rd, 2016, 11:40 pm

When the scope recall length is 50K, I want to save channel 4 full data as csv file.

Trying the command as below:
data:stop 50000;
SAVe:WAVEform:FILEFormat SPREADSHEETCsv;
SAVe:WAVEform CH4,"C:\CH4";

But I always got 20K data length , not 50K that I set.
I have looked for the programming manual P.439.
In the manual, it could be use “DATa: STARt and DATa: STOP” command to determine what range I want to save.
But in real, it not so.

Or what command could change the attachment - red block value?
Attachments
1.png
1.png (44.14 KiB) Viewed 7712 times
scope.jpg
scope.jpg (251.84 KiB) Viewed 7712 times

Scott H
Tektronix Applications
Tektronix Applications
Posts: 21
Joined: July 3rd, 2013, 9:29 am

Re: DPO7014 can’t determine saving CSV data range by programming command

Post by Scott H » June 28th, 2016, 7:56 am

Hello s31167,
The DATa:STARt and DATa:STOP commands are supposed to set the saved waveform range but this is a bug that was found after the scope was discontinued. A work around is to use the CURVe? command. The difference between "SAVe:WAVEform" and "CURVe?" is that SAVe:WAVEform will save the file to the scope while CURVe? will return the values to the PC. Then the PC running the script will have to save the results as a csv. Below is an example of the commands to send

DATa:ENCdg ASCIi
DATa:SOUrce CH4
DATa:STARt 1
DATa:STOP 50000
values = CURVe?

C#
System.IO.File.WriteAllLines(@"C:\Temp\Results.csv", values);

Matlab
fid = fopen('Results.csv', 'w+');
for i=1:size(values, 1)
fprintf(fid, '%s ', values(i,:));
end
fclose(fid);

Post Reply

Return to “Programming Support”

Who is online

Users browsing this forum: Bing [Bot] and 5 guests