Downloading Arbitrary Waveforms - Racal Instruments 3155 User Manual

100ms/s arbitrary waveform generator
Table of Contents

Advertisement

User Manual 3155
Downloading Ar-
bitrary Wave-
forms
TRACe:DEFine<segment_number>,<length>
Purpose
This command defines waveform segments and their relative lengths. The use of this command is neces-
sary before downloading data using the SendBlock() function.
<segment_number> sets the selected segment
<length> assigns a length to the above selected segment. Minimum segment length is 16 points, the
maximum is 1Meg.
The 3155 operates in interlaced mode where four memory cells generate one
byte of data. Therefore, segment size can be programmed in numbers evenly
divisible by four only. For example, 2096 bytes is an acceptable length for a bi-
There are two ways to download arbitrary waveform data points into
the memory. You can use Wave Composer utility in WaveCAD to
program segments and their size, create the waveform on the screen
and then with a click of a button, download the entire waveform to the
instrument. On the other hand, if you are writing your own applica-
tion, you'll need to use the SendComand() and SendBlock() func-
tions. Information on these functions is given at the beginning of this
chapter. You can follow the general guidelines below to download
waveforms to the instrument. The following example assumes seg-
ment 1 having 1000 points.
1. Use the function SendCommand() to program trac:sel 1. This
command makes segment number 1 active. Anything that you
download to the 3155 is downloaded to the active segment, in
this case – segment 1.
2. Use the SendCommand() to program trac:def 1,1000. This
command defines the size of segment 1, in this case – 1000
waveform points.
3. Use the function SendBlock() to send waveform data points to
the 3155. You can use this function in two ways: 1) You can
generate and save an external file with the waveform and then
call this function with the path to your file, or 2) you can build
the data into your function, as described earlier in this chapter.
After you download the waveform data to the instrument, you'll have
to change the waveform mode to arbitrary (USER) and set the sam-
ple clock frequency to that the output frequency meets your require-
ments. Additional information on the commands used for arbitrary
waveform management is given below.
If you use multiple segments in your application, you
can combine all segments to one long waveform and
then use trac:def n,m commands to define segments
length.
NOTE
HINT
Programming Reference 4-59

Advertisement

Table of Contents
loading

Table of Contents