Measurement-computing CB-7000 DIO Manuale Utente Pagina 26

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 68
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 25
26
CB-7000 DIO Manual
2. Commands
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 re-
sponse) string except the carriage 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: !01400600(cr)
Sum of string: ‘!’+‘0’+‘1’+‘4’+‘0’+‘0’+‘6’+‘0’+‘0’
= 21h+30h+31h+34h+30h+30h+36h+30h+30h = 1ACh
The checksum is ACh, and [CHK] = “AC”
Response string with checksum: !01400600AC(cr)
Vedere la pagina 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 67 68

Commenti su questo manuale

Nessun commento