Rockwell-automation 1770, D17706.5.16 Ref Mnl DF1 Protocol Command Manuel d'utilisateur Page 203

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 251
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 202
11–7Data Encoding
Publication
17706.5.16 - October 1996
A 16-Bit Word in PLC Memory
10 100101 1 1 0 1 1 001
17 16 15 14 13 12 11 10 7 6 5 4 3 2 1 0Bit
(Octal)
Odd, high byte Even, low byte
Value - A576 hex
A 16-Bit Computer Word with Left-to-Right Byte and Bit Order
1010 0 1 1 0 1 1 0 101
15 14 13 12 11 10 9 8 7 6 5 4 3 2Bit
(Decimal)
Odd, high byte Even, low byte
10
10
Value - A576 hex
This figure shows a 16bit computer word with righttoleft byte and bit order (as in DEC PDP11/34 or
VAX 11/780). It also represents a 16bit word in an 8bit processor (such as Zilog Z80 or Intel 8088
microprocessor). If your computer has this type of word order, the conversion is straightforward.
A 16-Bit Computer Word with Right-to-Left Byte and Bit Order
01110110 0 1 0 1 0 010
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15Bit
(Octal)
Odd, high byteEven, low byte
Value - A576 hex
(after byte swapping)
This figure shows a 16bit computer word with lefttoright byte and bit order (as in IBM Series 1).
If your computer has this type of word order, the conversion is more complex. You will have to
swap bytes into and out of buffers.
A 16-Bit Computer Word with Left-to-Right Byte Order and
Right-to-Left Bit Order
0111 01 0 1 1 0 0 110
15 14 13 12 11 10 9 8 7 6 5 4 3 2Bit
(Decimal)
Odd, high byteEven, low byte
10
00
Value - A576 hex
(after byte swapping)
This figure shows a 16bit computer word with lefttoright byte order and righttoleft bit order
(as in Zilog Z 8000 or Motorola 68000 microprocessors). If your computer has this type of word
order, your communication driver must handle the task of byte swapping as it loads data into a
buffer. Successive bytes received from the PLC must be stored in the following order:
1,0,3,2,5,4,7,6,9,8. . .
Vue de la page 202
1 2 ... 198 199 200 201 202 203 204 205 206 207 208 ... 250 251

Commentaires sur ces manuels

Pas de commentaire