Appendix D
Sending Binary Data Over RS-232
About This Appendix
This appendix describes the procedure for sending pure binary data over an
RS-232 interface. The formatting described is used in the
DIAG:DOWN:CHEC[:MADD]
,
DIAG:DOWN:CHEC:SADD
, and
DIAG:DRIV:LOAD:CHEC
commands. This appendix contains the following
main sections.
•
Formatting Binary Data for RS-232 Transmission . . . . . . . . . Page 261
•
Sending Binary Data Over RS-232 . . . . . . . . . . . . . . . . . . . . Page 263
Formatting Binary Data for RS-232 Transmission
The most straightforward way to send a block of data is to open the data
file, read the next byte from the file, and send it to the System Instrument
until you reach the end of file. However, binary data cannot be sent to the
system instrument as is. It must be converted into a format that will not
conflict with the special characters that the RS-232 interface recognizes.
This is done by sending only one half byte (a nibble) at a time.
To prevent this nibble from being confused with a special character, bit 7 of
the nibble is set to one. This gives all data bytes in the block values greater
than 127 so they are not confused with ASCII characters. It also doubles
the size of the file to be sent and the transmission time for the file. Since a
transmission error that required re-transmission of the entire data block
would be very time consuming, a 3-bit error code (which allows for
correction of single bit errors) is added to the transmission byte. The
following format is sent for each nibble:
Bit #
7
6
5
4
3
2
1
0
1
Correction Code
Data
The error correction code is based on the nibble of data sent. The easiest
way to implement this code is to use Table D-1. It is indexed based on the
value of the nibble to send out, so there are 16 elements to the table.
Appendix D
Sending Binary Data Over RS-232 261
Summary of Contents for E1406A
Page 2: ......
Page 14: ...Notes 12 Agilent E1406A Command Module User s Manual ...
Page 15: ...Notes Agilent E1406A Command Module User s Manual 13 ...
Page 16: ...Notes 14 Agilent E1406A Command Module User s Manual ...
Page 90: ......
Page 91: ......
Page 92: ......
Page 93: ......
Page 94: ......
Page 95: ......
Page 96: ......
Page 97: ......
Page 98: ......
Page 99: ......
Page 100: ......
Page 101: ......
Page 102: ......
Page 120: ...Notes 118 Triggering and System Status Chapter 4 ...
Page 179: ... DIAG BOOT COLD will set PARity to NONE Chapter 5 Agilent E1406A Command Reference 177 ...
Page 240: ...Notes 238 Agilent E1406A Command Reference Chapter 5 ...
Page 252: ...Notes 248 Agilent E1406A Specifications and General Information Appendix A ...