AnsweredAssumed Answered

Acquire waveform using DSOZ204A and Scilab

Question asked by Kentish on Mar 29, 2018
Latest reply on May 3, 2018 by Kentish

Hello everyone,


I'm in trouble acquiring the waveform of my oscilloscope DSOZ204A. I'm connected in LAN and the connexion is ok as *IDN? works.

The function I use is the following



function [num_values]=DSOZ204A_save_waveform(id)
 //Get the waveform type
 disp("Waveform type :"+string(ans))
 //Get the number of waveform points
 disp("Waveform points :"+string(nb_pt))
 //Choose the format of the data returned
 DSOZ204A_write(id,":WAVeform:FORMat ASCii")
 disp("Waveform format :"+string(ans))
 //Display waveform settings
 disp("Waveform X increment "+string(x_increment))
 disp("Waveform X origin "+string(x_origin))
 disp("Waveform Y increment "+string(y_increment)) 
 disp("Waveform Y origin "+string(y_origin))
 //read waveform data
 DSOZ204A_write(id,":WAVeform:DATA? 1, 50") 
 num_values=strsubst(num_values,","," ") //replace "," by " " in the string
 num_values=strsplit(num_values," ")
 [num_values]=strtod(num_values) //Converts from string to double
 num_values=num_values(1:50);    //delete NaN value

 for (i=1:nb_loop-1)
  cmd=":WAVeform:DATA? "+string(start_pt)+", "+string(end_pt)
  num_values_int=strsubst(num_values_int,","," ") //replace "," by " " in the string
  num_values_int=strsplit(num_values_int," ")
  [num_values_int]=strtod(num_values_int) //Converts from string to double
  //concatenation of vectors
 disp("end of process")

I first tried to read all the data using ":WAVeform:DATA?" and "DSOZ204A_read(id,1200)" but Scilab crash and lacks of memory. So I tried to acquire less points and it works with about fifty points. Thus, my idea was to acquire the waveform segment after segment -which is honestly not a good idea-. By setting the number of points by 200 it works but still not work with more points.


Does anyone have an idea to solve my problem?


NB: I link the code used.