10 example arb program – BNC 630 User Manual

Page 73

Advertising
background image

68

7.10 Example Arb Program

ARB.BAS

ARB.BAS is a program written in Microsoft Quick Basic which calculates the points of a sinewave and downloads them to the 630
as an arbitrary waveform. The program can generate the waveform in all of the supported formats (Floating Point, Integer,
Hexadecimal, and Binary) and shows how SYNC Out can be asserted during waveform points.

This program can serve as a good starting point for writing you own waveform generation programs. You can replace the sin(x)
function with your own mathematical function and pick which data format you wish to use by calling the appropriate subroutine.
(Binary format is the most efficient since it requires the least amount of bytes per data point, and can therefore be downloaded
faster).

A complete listing of ARB.BAS begins on the following page. The source file for this program can also be found on the
accompanying compact disk.

Advertising