Programming Examples
3-198
AWG610 Arbitrary Waveform Generator User Manual
When you perform the operation between the waveforms which have a different
point size, the lowest point size among them is used. Therefore the c.wfm will
have the point size of 1500.
Figure 3–59 shows the waveforms to be generated by the above example.
a.wfm
b.wfm
c.wfm
Figure 3-59: Waveforms generated from the Example 1 equation
Below is an example in which the for and if statements are used.
num = 30
for i = 1 to num
if i = 1 then
”t.wfm”=cos(2*pi*scale)
else
”t.wfm”=”t.wfm”+cos(2*pi*i*scale)
endif
next
”t.wfm”=”t.wfm”/num
Num and i are user-defined variables. I is used as part of the for loop parameter.
The statements placed between the for and next keywords repeat 30 times while
the i increments by 1 for each loop.
The conditional branch statement must start with the if keyword and end with the
endif keyword. In the above example, if i = 1, the equation creates the waveform
t.wfm. When i
0
1, the newly created waveform and the one created in the
previous loop are added, and the result is stored in the waveform t.wfm. The
resultant waveform is then normalized.
Figure 3–60 shows the waveform generated by the previous example.
Example 2
Summary of Contents for AWG610
Page 4: ......
Page 24: ...Preface AWG610 Arbitrary Waveform Generator User Manual...
Page 216: ...Quick Editing AWG610 Arbitrary Waveform Generator User Manual...
Page 220: ...The Table Editor AWG610 Arbitrary Waveform Generator User Manual...
Page 242: ...The Sequence Editor AWG610 Arbitrary Waveform Generator User Manual...
Page 288: ...The UTILITY Window AWG610 Arbitrary Waveform Generator User Manual...
Page 292: ...Capturing Waveforms AWG610 Arbitrary Waveform Generator User Manual...
Page 326: ...Programming Examples AWG610 Arbitrary Waveform Generator User Manual...
Page 338: ...File Management AWG610 Arbitrary Waveform Generator User Manual...
Page 424: ...Appendix B Performance Verification AWG610 Arbitrary Waveform Generator User Manual...
Page 440: ...Appendix E File Transfer Interface Outline AWG610 Arbitrary Waveform Generator User Manual...