gds-csv-to-rigol(1)

NAME
gds-csv-to-rigol - Convert GDS oscilloscope waveform data to Rigol UltraWave DG function generator format

SYNOPSIS
gds-csv-to-rigol [-d] [-f txt|csv|rdf|scpi] [-h] [-l locale] [-m] [-o out.(txt|csv|rdf|scpi|...)] [-r res] [-t dg1000|dg1000ch2|dg2000|dg3000|dg5000] [-v] [--] [gds.csv]

DESCRIPTION
gds-csv-to-rigol(1) converts GDS oscilloscope waveform csv data in GW Instek CSV file format to Rigol UltraWave DG function generator waveform data.

OPTIONS

-d  Adjust DC component of the signal to maximize available amplitude range. Sample values are centered around 0 V. The use is in particular recommended for the rdf format.

-f txt|csv|rdf|scpi
    Output format. txt indicates Rigol UltraWave DG text file format (default). csv indicates Rigol UltraWave DG CSV file format. rdf indicates Rigol UltraWave DG or generator raw data file format. scpi indicates Rigol DG generator SCPI commands.

-h  Short help information.

-l locale
    UltraWave uses the local numeric format, in particular the local decimal separator in its txt and csv file formats for floating point values. gds-csv-to-rigol does the same. However, gds-csv-to-rigol also allows to select another locale, in case the generated data shall be further processed on a computer with that locale.

    The option is ignored when the rdf or scpi file format is specified.

-m  Generate output data containing the maximum number of samples for the particular type of generator. The actual interpretation of the option differs, depending on the selected file format:

    • txt, csv, and scpi

    Usually the -m option is not needed for these file formats.

    The formats contain information about the number of used samples. txt and csv also contain the total number of samples possible (this is implicit for scpi commands). The default without the -m option is to generate output just as large as the input data.

    When the -m option is used, the total number of samples possible is set to the maximum number of samples possible for the particular generator type data. The actual sample data remains the same.

    • rdf

    rdf files always contain the maximum number of samples for the particular type of generator. Without the -m option the data is just filled up with zeros when the number of input samples is less than the maximum number of samples.

    When the -m option is specified then the input data is ``stretched'' over the full range. This is done by re-sampling the input data and applying a sinc interpolation.

    As a rule of thumb the following applies:

    rdf data to be loaded into UltraWave
        Usage of -m is not recommended if the original data should be loaded.

    rdf data to be directly loaded into the generator
        Usage of -m is recommended.

        UltraWave and the generator interpret rdf files differently. For the generator an rdf file always specifies a full signal cycle. If the signal is not ``stretched'' over the full file length, then the generator drives the signal low for the remaining time of the cycle. This results in a different output waveform and is usually not desired.

-o filename
    Output file with Rigol DG function generator arbitrary waveform data. - indicates standard output (default). If -f is not given, the output format is taken from the file extension of filename. If -f is given, -f overrides.

-r res
    Bit resolution 8 ... 32. Advisory only. Default 14 (dg1000ch2: 10).

    The Rigol UltraWave for DG series txt and csv file formats use floating point numbers, and don't make use of the bit resolution as such. The resolution is just store as an additional data field in the files.

    The rdf format uses 16 bit binary numbers with 14 significant bits. The -r resolution value does not change this data encoding and is completely ignored for .rdf files.

    The scpi commands uses 14 bit values represented as ASCII decimal numbers. The -r resolution value does not change this data encoding and is completely ignored for. scpi files.

-t dg1000|dg1000ch2|dg2000|dg3000|dg5000
    Function generator type. Default dg1000.

    This option controls the maximum number of samples that can be generated. Trying to convert input data with more samples than possible output samples results in an error.

-v  Verbose messages.

--  End of options on the command line.

ARGUMENTS

gds.csv
    Input CSV file with GW Instek GDS oscilloscope waveform data in GW Instek oscilloscope data format. - indicates standard input.

FILES

$HOME/.gds-csv-to-rigolrc
    Overrides defaults of the program.

BUGS
The sinc interpolation that is used when the rdf or scpi output format is specified together with the -m option is rather simple. It introduces ripple into the resulting ``stretched'' waveform.

The information stored in rdf files is rather limited. The rdf format doesn't contain scaling information or cycle duration information. When UltraWave reads such a file it silently applies the voltage range and frequency used by the waveform previously edited in UltraWave. This voltage range and frequency have usually nothing to do with the original data.

The software might not work for any DG generator for which Rigol changed to a VISA interface. Especially DG1022 generators can't be identified by their model number if they already use the VISA interface or not. Rigol silently changed the hardware and software, but kept the model number DG1022 for both versions. DG1022s with firmware version numbers starting with 00.02 probably use the VISA interface.

The support for the DG5000 series is based on very preliminary information.

Generating full length (128 Mega points) DG5000 data takes a long time, and should be avoided.

EXAMPLES
The following example obtains some waveform data from channel 1 of a GW Instek GDS oscilloscope, and converts it to an rdf file to be later directly loaded into a Rigol DG1000 series generator. The command line has been split over multiple lines for presentation purposes only.

    gds-csv 1 | gds-csv-to-rigol                \
                   -t dg1000                    \
                   -d -m                        \
                   -o /media/usbstick/wave1.rdf \
                   --                           \
                   -

SEE ALSO
gds-csv-to-afg(1), gdsh(1).

Programming Guide DG1022 Function/Arbitrary Waveform Generator. August 2009. RIGOL Technologies.

Programming Guide DG2000 Series Function/Arbitrary Waveform Generator. Publication Number PGB02105-1112. Sept. 2008. RIGOL Technologies, Inc.

Programmer's Reference DG3000 Series Function/Arbitrary Waveform Generator DG3121A, DG3101A, DG3061A. Publication Number DG3-070807. August, 2007. RIGOL Technologies, Inc.

COPYRIGHT
Copyright © 2009, 2010 Thomas Weidenfeller

gds2000tools/gds-funcgen is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

gds2000tools/gds-funcgen is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with gds2000tools/gds-funcgen. If not, see <http://www.gnu.org/licenses/>.