beautypg.com

Tektronix AWG610 User Manual

Page 317

background image

Programming Examples

AWG610 Arbitrary Waveform Generator User Manual

3-199

Figure 3-60: Waveform generated bythe Example 2 equation

The following example creates one sequence file and four waveforms.

delete(”test.seq”)

size=512
clock=1e9
num=4

’write sequence file header

write(”test.seq”,”3002\n”)
write(”test.seq”,”LINES ”:num:”\n”)

for i = 1 to num

’create a waveform file
”test”:i:”.wfm” = sin(2 * pi * i * scale)

’add line to sequence file
rep = num * i
write(”test.seq”,”\”test”:i:”.wfm\”,\”\”,”:rep:”\n”)
next

The first line is the statement for deleting the existing waveform. If that file does
not exist, then no action is taken.

The size and clock keywords are the system valuables representing the waveform
record length, in points, and the sampling clock frequency. They are set
to 512 points and 1.0 GS/s in the above example.

The comment text on line 5 starts with a single quotation (’) character. Comment
text is effective until the end of the line containing the single-quote character.

Example 3