PRINT #1, a | ' Send integer value to 4070A |
RETURN |
|
Send ASCII Hex data to 4070A |
'This format sends the same two's complement data that Binary format uses,
'except that each nibble (4 bits) of the hex value is represented by
'an ASCII character.
'
'Each point is a 16 bit word which is sent to the 4070A with 4 characters.
'Each character represents 4 bits of the 16 bit value:
'
'0000 to 1001 - Represented by an ASCII "0" to "9"
'1010 - Represented by an ASCII "a" or "A"
'1011 - Represented by an ASCII "b" or "B"
'1100 - Represented by an ASCII "c" or "C"
'1101 - Represented by an ASCII "d" or "D"
'1110 - Represented by an ASCII "e" or "E"
'1111 - Represented by an ASCII "f" or "F"
'For example, the 16 bit value 1101 0011 0101 1111 is sent as "d35f"
'The 16 bit value is in "two's complement" format, which represents a number
'from
' |
|
|
|
|
|
' | 8000 | ||||
' | 0.0 | +.5 | +1.0 | ||
' |
|
|
|
|
|
'Although a 16 bit value is sent to the 4070A, the Arbitrary Waveform system
'uses a 12 bit D/A converter, so not all 16 bits are used. Only the uppermost
'12 bits are used to form the arbitrary waveform point.
'
'Rules for Hexadecimal format:
'1. Each Hexadecimal value may have 1 to 4 characters. Negative values require
'4 characters since the most significant bit of the value (bit 15)
'must be a 1 for negative values. If there are fewer than 4 characters the
'value is interpreted as positive. Characters are not case sensitive.
'
'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 a A b B c C d D e E f F |
' |
|
'3. The most significant nibble character is the first that is sent to the
'4070A. For example, to send the value 1234, the 1 is sent first, then
'the 2, etc.
'
'4. The SYNC Out output is controlled by bit #3 in the low byte. If this bit
'is set to 1, SYNC Out is set high. If this bit is set to 0, SYNC Out
'is set low.
'
'Examples of ASCII hex numbers, SYNC Out is set high on point #3:
'0, 4000, fed8 4570 8000 fff0 E6D0, 10 FF,C06
SendHex:
IF PointNumber = 1 THEN PRINT #1, "WH" ' Put header before 1st data point
'Convert the value in PointVal to two's complement hex j = 32767
66
BK Precision 4070A User Manual Rev.2.2