| IF PointNumber = 1 THEN PRINT #1, "WF" ' Put header info before 1st data point | |
| IF PointNumber = 2 THEN PRINT #1, "p" ' Set SYNC Out bit for second point | |
| PRINT #1, PointVal | ' Send Floating point number to 4071 |
| RETURN |
|
Send Integer data to 4071 |
'This format sends a base 10 number which is in the range
'The integer numbers represent
' |
|
|
|
|
|
' | 0 | 1024 | 2047 | ||
' | +.5 | +1.0 |
| ||
' |
|
|
|
|
|
'Rules for Integer format:
'1. The 4071 expects all Integer 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
'and
'fidelity, you should design your waveform so that the peak values "just
'fit" into the range of +2047 to
'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. Use of the "+" character for positive values is optional.
'4. Leading "0"'s are ignored.
'
'5. 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 integer numbers, SYNC Out is set high on point #3:
'0, 123 p
Send data point as Integer | |
SendInteger: |
|
IF PointNumber = 1 THEN PRINT #1, "WI" ' Put header before 1st data point
IF PointNumber = 2 THEN PRINT #1, "p" ' Set SYNC Out for second point
' Convert the value in PointVal to an integer that ranges from
a = INT(PointVal * 2047) ' Convert
65
BK Precision 4071 User Manual Rev.2.2