Jump to content
  • 0

AD2 waveForms script


omur

Question

6 answers to this question

Recommended Posts

Mr. Atilla, Thanks for your reply. Can you check my script. I normalized my bus. It is ok but I cannot send this data to wavegen

 

Wavegen1.Channel1.Mode.text = "Custom";

Scope1.Trigger.Trigger.text = "Repeated";

Scope1.run();

Logic1.run();

var datam = Logic1.Channels.Bus.data

var data_norm = [];

for(var idx = 0;idx < 2500; idx++){

data_norm[idx] = parseFloat(datam[idx])/4095;

}

print(data_norm)?  

plot1.X.data = idx

plot1.Y1.data = data_norm

Wavegen1.Channel1.Custom.Type.text = data_norm?

Wavegen1.run();

Link to comment
Share on other sites

Hi @omur

 

// start capture and wait to be finished
Logic1.single()
Logic1.wait()

// on AD by default the Logic Analyzer and Wavegen have the same 4064 buffer
var datam = Logic1.Channels.Bus.data
var data_norm = []
datam.forEach(function(v){data_norm.push(v/4095)})

plot1.Y1.data = data_norm

Wavegen1.Channel1.Mode.text = "Custom"
Wavegen1.Custom.set("mycustom", data_norm)
Wavegen1.Channel1.Custom.Type.text = "mycustom"
Wavegen1.run()

image.thumb.png.004701633194b240b87592b4150fae31.png

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...