Jump to content
  • 0

Playback of CSV (analog capture) to Digital


enliteneer

Question

Using the Scope I captured/exported a CSV file containing a digital pattern, consisting of either approx 0v and 5v.   

Is there a way to output this pattern via the digital I/O lines  (at 0v and 3.3v)?  

For example, since the file has values like "-3.08368e-05" and "5.01554,"..  I was thinking the csv would have to be first cleaned up (programmatically/ regular expressions ) to convert all values below 2.5v to "0" and all values above 2.5v to "3".    However, before embarking on this journey, is there any built-in way to output digital values based on a CSV that has floating point values captured with the Waveform's Scope?

Any suggestions?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Hi @enliteneer

1. Add in Scope a Custom Math channel which converts to logic value like: C1>2.5?1:0
Under Math channel gear menu Export the data to csv.

image.png.7058bade1b10c2d4217984b38ae52a56.png

2. You can switch to 4th device configuration to have more Custom Pattern buffer.
Add a Signal in Patterns, select Custom, PP and Import the earlier saved data.

image.png.82b945ee709ad25bf1a50768aa0df26e.png

Link to comment
Share on other sites

Ran into a little issue.. The data was captured at 10MSps , with 8000+ samples.. however, the custom pattern generator seems to limit the number of samples at 1024.     (Although your screenshot shows 8192 samples.. how?!)

Since the wavegen doesn't seem to have a limit, I modified the CSV for 0 / 3.3v, but I can't get it to output each sample at the 10Mhz rate, but stop at the last sample.

There seems to be a way to do it progamatically, but I can't find how to do it via the Waveforms GUI!
dwf.FDwfDigitalOutRunSet(hdwf, c_double(sec))    dwf.FDwfDigitalOutRepeatSet(hdwf, c_int(1)) 

 

image.png.ea64ece13e2600042cb1cb5ab3db7077.png

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...