Campbell TX312 Specifikace Strana 72

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 96
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 71
Appendix F. High Resolution 18-Bit Binary Format
F-2
Where 17 represents bit 17 - the most significant bit and is used to
determine the sign.
Converting the 18 bit data point to an integer can be done manually. Don’t
forget the 18 bits are numbered 0 through 17. Bit 17 is the sign bit, when bit 17
is set, the number is negative. If bit 17 is set, subtract 1 from the number then
take the complement of the number. If bit 17 is not set, simply convert the
number to its decimal equivalent.
Example positive data point conversion:
Byte Label byte 3 byte 2 byte 1
Actual data point 01000101 11110010 11010010
Drop first 2 bits of
each byte 000101 110010 010010
Combine the 3
bytes into one word 000101 110010 010010
Convert from Binary to Decimal 23698
Example of a negative data point conversion:
Byte Label byte 3 byte 2 byte 1
Actual data point 01111010 11001101 11101101
Drop first 2 bits of
each byte 111010 001101 101101
Notice bit 17 is set,
Combine the 3
bytes into one word 111010 001101 101101
Subtract 1 from the number 111010 001101 101100
Take the complement of
each bit 000101 110010 010011
Convert the binary value
into a decimal value, don’t
forget the negative sign -23699
Zobrazit stránku 71
1 2 ... 67 68 69 70 71 72 73 74 75 76 77 ... 95 96

Komentáře k této Příručce

Žádné komentáře