Measurement-computing CB-COM-7013 Manuel d'utilisateur Page 15

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 44
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 14
15
CB-7013, CB-7033 Users Manual
2. Command
Command Format; (Leading)(Address)(Command)[CHK](cr)
Response Format: (Leading)(Address)(Data)[CHK](cr)
[CHK] 2-character checksum
(cr) end-of-command character, character return (0x0D)
Calculate Checksum:
1. Calculate ASCII sum of all characters of command (or
response) string except the character return (cr).
2. Mask the sum of string with 0ffh.
Example:
Command string: $012(cr)
Sum of string = ‘$’+‘0’+‘1’+‘2’ = 24h+30h+31h+32h = B7h.
The checksum is B7h, and [CHK] = “B7”.
Command string with checksum: $012B7(cr).
Response string: !01200600(cr).
Sum of string: ‘!’+‘0’+‘1’+‘2’+‘0’+‘0’+‘6’+‘0’+‘0’
= 21h+30h+31h+32h+30h+30h+36h+30h+30h = 1AAh
The checksum is AAh, and [CHK] = “AA”.
Response string with checksum: !01200600AA(cr).
Vue de la page 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 43 44

Commentaires sur ces manuels

Pas de commentaire