R3132 Series Spectrum Analyzer Operation Manual
4.2.10 Example Programs
4-59
Example VB-16: Enter data into A memory in ASCII mode
(When the 501 point mode is set, change 1001 and 1000 to 501 and 500, respectively.)
Dim trdata(1000) As Integer
Dim i As Integer
trdata(0) = 1792 ’ Provide a temporary data used to test the input (*).
For i = 1 To 1000 Step 1
trdata(i) = Str(Val(trdata(i - 1)) + 12)
DoEvents
Next i ’ When there is the data, the steps between the place marked with
’ (* ) and this point are not required.
Call ibclr(spa) ’ Perform a device clear.
Call ibwrt(spa, "AB") ’ Set Trace A to BLANK.
Call ibwrt(spa, "TAA") ’ Set Trace A in ASCII.
For i = 0 To 1000 Step 1 ’ Repeats the operation for 1001 points.
Call ibwrt(spa, CStr(trdata(i))) ’ Sends the value after it has been converted to the ASCII data.
DoEvents
Next i
Call ibwrt(spa, "AV") ’ Set Trace A to VIEW.