Replaying a captured 'scope trace using a Siglent DSO and FeelTech FY6900

When you are developing an embedded device, you often find yourself capturing an interesting signal with the 'scope that you would like to send back into your device. If you have invested in an Arb from the same family as your 'scope then this is as easy as moving a USB Flash drive from the 'scope to the Arb, but such Arbs are not the cheapest option out there.

Since choosing the FeelTech FY6900 as my Arb, I found that it's software "DDS Signal PC Software" can import a list of points but the format is not the same as exported by the Siglent SDS 1104X-E. So I wrote a utility to convert from one to the other, and with some additional options.

SigFyCSV

This is a utility for converting scope captures from a Siglent Digital Storage Oscilloscope into a format which is usable by a FeelElec FY6900 DDS Function/Arbitrary Waveform Generator so that it can stored in one of the Arb memories for replay. This utility is only a file converter and does not communicate with the FY6900, so you need to have installed the FeelTech “DDS Signal PC Software” and the USB cable so that the resultant waveform can be stored in the FY6900.

It was developed using a Siglent SDS 1104X-E scope which has an ethernet connection which allows direct control and file download using a browser, by setting a static IP address in the scope. This provides the fastest method of getting the waveform data from the scope, but the data can also be obtained using the Save/Recall button menu, saving the binary file to a flash drive.

Example

The FY6900 is set to AM waveform at 4 kHz and 4Vpp. This is connected to a x10 probe going into channel 4 of the scope. The scope has been set to a static IP address of 192.168.0.2, so visiting the address with a browser and then clicking on Instrument Control takes you to a mimic screen like this.

 Clicking on the narrow button at the top right opens a control panel:

The orange buttons along the bottom allow direct access to some functions which are not available on the scope or are buried in menus. Waveform Save is a shortcut to the Save/Recall menu Binary file save function and it produces a usr_wf_data.bin file for the browser to download.

To convert this to CSV, click the orange button in the scope mimic panel labelled “Bin_to_CSV_Tool” which downloads Bin2CSV.exe, and run it:

Click Browse, locate your usr_wf_data.bin file and click Convert. This produces a csv_data.csv file in the same folder as the bin file.

Important Note: Bin2csv does not overwrite csv_data.csv. It will append data if the file already exists, which is not what you want. Since there is no Save As, you cannot choose a different destination file with this tool, so be sure to delete any existing csv_data.csv file in the folder you are using before you run Bin2csv!

Alternatively, use the scope Save/Recall menu to save a CSV file to a USB drive instead. 

Start the SigFyCSV program.

File – Open – Browse to your CSV file

At this point you can chose different output conversion options. Every time you change the choice, the output is reconverted from the original and the graph shows the results.

 

Options

Width Options

Complete Waveform

The complete set of input points is used as the base for sampling the output points from.

Start At Trigger

Only those input points which occur after the timestamp reaches zero are used as the base for sampling the output points from.

Output points

The number of output points. Default is 8192 because that is the maximum for the FY6900 so gives the highest horizontal resolution. Reducing it can be useful, for example to allow two waveforms to be concatenated together. It is possible to get aliasing effects if the signal has a high rate of change and the number of output points is reduced, which results in a totally different waveform from that which is expected. 

Sampling

Decimate/Stretch

The output samples take one value from the input set at the spacing given by the ratio of their sizes. This is the default and usually produces the best results. However, all input values in the spacing interval are ignored in this method. 

Average nearest

All input values either side of the sampling point are averaged up until half the spacing interval on either side. This takes all the input samples into account but produces a more smoothed, low pass filtered waveform. 

Peak Detect

Using the same idea as the Average Nearest method but adding in detection of the input points furthest away from the average for that spacing interval and choosing the point that is furthest from the average for each output point. This makes sure that extreme values are always taken into account. 

Vertical Scale

No Change

Use the input values as given. 

Rescale to 0 … 1.0

Rescales all points s that the minimum output point is 0 and the maximum output point is 1.0. This can lead to a DC offset in the signal of 0.5 if the signal is symmetrical. 

Rescale to -1.0 … 1.0

Rescales all points s that the minimum output point is -1.0 and the maximum output point is 1.0. This should result in no DC offset in the signal if the signal is symmetrical. 

Export to FeelTech “DDS Signal PC Software”

File – Save As

Saves a text file which is just a list of sample values (vertical, not including time stamps) in a .FY file for the DDS Software to read in to its File – Open in the Waveform Window. However, this crashes the FeelTech software when you click Load Data, at least in version 6.3. 

File – Copy To Clipboard

Clears the clipboard and replaces it with a list of values which can be pasted into the Text Window tab of the FeelTech software.

Select the Text Window tab, choose the Loading Area (Arb number).

Click in the left pane and Control-V (paste)

Click Send Data to transfer to FY6900 (assuming you have installed the USB driver, connected the USB cable and switched the FY6900 on – then you should see the connected message in the lower right of this window). 

Blue progress bar shows progress and on completion the left status bar area says “Data is written to the completion of.” If the Channel was on (CH button is green on the FY6900) and that arb wave was selected as the output signal, then it immediately appears, as well as being illustrated on the screen of the FY6900.

Parsing of the CSV file is done in a background worker thread with a progress bar because it typically takes about 1.0 seconds to parse 1.4M lines.

To run this program, you need the files in the Release folder at https://github.com/MartinCowen/SigFyCSV/tree/master/SigFyCSV/bin/x86/Release There is no installer but it will on run on up to date Windows 10 systems.

To build this program from source:
This is a VB.NET desktop application (WinForms) built using Visual Studio Community 2019, with the .NET Framework 4.8.03752 and LiveCharts from https://lvcharts.net/ (MIT licenced).

The GitHub repo for this project is MIT licenced.