'******************************************************************************
' | Subroutines |
' |
|
'These subroutines take a value in PointVal (which ranges from
'and converts it to various data formats, (i.e. Floating Point, Binary,
'ASCII Hex, and Integer) and then sends that value to the 4070A.
'
'Before the first data point is sent, a Header consisting of two characters
'is sent to the 4070A. The first character of this header is a "W", which
'tells the 4070A to expect arbitrary waveform data points. The second
'character of the header tells the 4070A what data format to expect,
'
'"F" = Floating Point
'"I" = Integer
'"H" = ASCII Hexadecimal
'"B" = Binary
'
'Each subroutine gives a short example of each format.
'******************************************************************************
Send Floating Point data to 4070A |
'This is the easiest format to use with Basic since no format conversion is
'necessary. Basic will output floating point numbers by default.
'
'Rules for floating point format:
'1. The 4070A expects all floating point values to be between
'If a number falls outside that range, the number is set to
'These correspond to the peak values of the waveform.
'If the output voltage level were set for 5V p
'corresponds to +2.5V and
'For maximum signal fidelity, you should design your waveform so that the
'peak values "just fit" into the range of
'using the full output range of the DAC.
'
'2. To separate each number, you may use commas, tabs, spaces, carriage
'returns and/or linefeeds, semicolons, colons or basically any character
'that is not among the following:
' | 0 1 2 3 4 5 6 7 8 9 . - + e E |
' |
|
'3. You do not have to include an exponent (i.e.
'given, the 4070A assumes that the exponent is 0.
'
'4. Whitespace characters are not allowed between the mantissa and exponent.
'5. Use of the "+" character for positive values is optional.
'
'6. To set SYNC Out high during a data point, put a "p" or "P"
'BEFORE that data point. The "P" character may have whitespace around
'it if desired. SYNC Out is set low for all data points that
'do not have a "p" or "P" before them.
'
'Examples of floating point numbers, SYNC Out is set high on point #4:
'0, .584737,
SendFloat:
64
BK Precision 4070A User Manual Rev.2.2