Tektronix AFG2021 Programmer's Manual page 140

Arbitrary function generator
Hide thumbs Also See for AFG2021:
Table of Contents

Advertisement

Programming Examples
Example 2
4-2
Tvc1.WriteString ("VOLTAGE:OFFSET 1.00") 'Set offset 1V
Tvc1.WriteString ("PHASE:ADJUST 0DEG") 'Set phase 0degree
'
'
'Save settings and output on
'
Tvc1.WriteString ("*SAV 1") 'Save settings to Setup1
Tvc1.WriteString ("*RCL 1") 'Recall settings from Setup1
'
End Sub
This is a sample program for sending an arbitrary waveform to the instrument's
Edit Memory and copying the contents of Edit Memory to the user waveform
memory.
Private Sub Sample2_Click()
'
'Assign resource
'
Tvc1.Descriptor = "GPIB0::11::INSTR"'
'Initialize of device setting
'
Tvc1.WriteString ("*RST")'
'Make arbitrary block data (2000 Points)
'
Dim wave(4000) As Byte
For i = 0 To 499 'Leading edge (500 Points)
Data = i * Int(16382 / 500) 'Data range is from 0 to
16382
High = Int(Data / 256) 'AFG's Data Format is big endian
Low = Data - (High * 256)
wave(2 * i) = High wave(2 * i + 1) = Low
Next i
AFG2021 Arbitrary Function Generator Programmer Manual

Advertisement

Table of Contents
loading

Table of Contents