AUBRAUX
 

 

Exim

Ensemble

Quantum

JitLab

PCScope

Modules:

SigGen

SoundImp

SoundExp

Plot

Meas

Stats

FileImp

TextImp

TextExp

Filter

FFT

DspWnd

Visa

Arithmetic

Plugins:

CodeEditor

SchEditor

Wizards:

JitLab

Help:

Getting Started

Examples:

PC Oscilloscope

Signal Generator

Amp. Modulation

Freq. Modulation

Phase Modulation

AM, FM & PM

PAM

PWM

Text Imp. & Exp.

 

Text Data Import and Export


You can use two SigGen modules to generate an amplitude modulated signal, and use the Plot module to display them. The following example generates two sine waves, uses one to modulate the other one and plots them.

You can also use other modules to process the generated data. For example, you can save the data in binary or text format and also perform various measurements.

Open the Modulation-AM.dsp project in DspSee to see this example in action. Click to download DspSee dsp software.


Below is a description of the Modulation-AM.dsp project file. Feel free to change it to try different things.


//TextIO.dsp
//Copyright www.aubraux.com
//DspSee sample file. Shows usage of TextImp and TextExp modules.
//Requires TextImp, TextExp, SigGen and Plot modules.

//Signal generator
load sg1="SigGen"//Loads the SigGen module. This module can generate sine and other types of waves.
sg1.reclen=1000//Sets the record length to 1000
sg1.freq=2e6//Sets the frequency to 2MHz
sg1.samplerate=1e8//Sets the sample rate to 100 MSPS
 
//Text exporter
load fout1="TextExp"//Loads the TextExp module. This module can export data in text format.
link fout1.src=sg1.out//Links SigGen output to TextExp input
fout1.sep.col=","//Sets the column seperator to ","
fout1.xaxis.on=1//Selects the x-axis to be saved
fout1.yaxis.on=1//Selects the y-axis to be saved
fout1.dataorg=1//Selects the data to be saved vertically, i.e. in columns
fout1.filename="ftxt.txt"//The data will be saved in "ftxt.txt" file
fout1.gui.wnd="fio"//Moves the fout1 gui to new window named fio
fout1.gui.move(500,0)//Moves the fout1 gui to (x=500, y=0)
 
//Text importer
load fin1="TextImp"//Loads the TextImp module. This module can import data from text files.
fin1.sep.col=","//Sets the column seperator to ","
fin1.xaxis.on=1//Sets the xaxis to be imported
fin1.dataorg=1//Sets the data organization in columns
fin1.filename="ftxt.txt"//The data will be imported from "ftxt.txt" file
fin1.gui.wnd="fio"//Moves the fin1 gui to new window named fio
fin1.gui.move(500,0)//Moves the fin1 gui to (x=500, y=0)
 
//Plot
load p1="Plot"//Loads the Plot module. This module can display input data in various formats.
p1.plot.title="Plot Window"//Sets the title of the plot window to "Plot 1"
link p1.src.ch1=sg1.out//Links the SigGen output to Plot input
link p1.src.ch2=fin1.out//Links TextImp output to Plot input
p1.ch1.label="Exporter Input"//Sets the Plot ch1 label
p1.ch2.label="Importer Output"//Sets the Plot ch2 label
p1.setup.move(280,0)//Moves the plot setup gui to (x=280, y=0)
p1.plot.move(0,220)//Moves the plot window to (x=0, y=220)
p1.plot.size(1000,420)//Resizes the plot window to (width=1000, height=420)
 
©Aubraux

All Rights
Reserved