Siemens SIMATIC TI505 Uživatelská příručka Strana 15

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 39
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 14
Simatic/TI 505 Ethernet Driver Help
This type of string is a Standard String with LoHi byte order except the string length is always the maximum
because the string is padded with blank spaces on the right until its length becomes the maximum (no NULLs).
Recall the maximum length of the string is (<last word> - <first word>) / 2 bytes in the address. If a string to be
written is less than this maximum length, it too will be padded on the right with blank-spaces until all maximum
bytes contain a non-NULL value.
Example 1: Standard String
To address a string starting at V200 with a length of 50 bytes and HiLo byte order, enter V200.50H.
Example 2: Standard String
To address a string starting at V500 with a length of 38 bytes and LoHi byte order, enter V500.38L.
Example 3: Null Terminated
Given:
V200/MSB = 'h'
V200/LSB = 'e'
V201/MSB = 'l'
V201/LSB = 'l'
V202/MSB = 'o'
V202/LSB = ' '
V203/MSB = 'w'
V203/LSB = 'o'
V204/MSB = 'r'
V204/LSB = 'l'
V205/MSB = 'd'
To address a null-terminated string starting at V200 with a length of 10 bytes and the memory data is as stated
above:
V200-204C would read "hello wor".
Note: Only 9 characters can be displayed because the last is the null terminator.
Example 4: Length Byte + String
Given:
V200/MSB = 0x04
V200/LSB = 'e'
V201/MSB = 'l'
V201/LSB = 'l'
V202/MSB = 'o'
V202/LSB = ' '
V203/MSB = 'w'
V203/LSB = 'o'
V204/MSB = 'r'
V204/LSB = 'l'
V205/MSB = 'd'
To address a string with length byte information, starting at V200 and the memory data is as stated above:
V200-204P would read "ello".
Note: The length byte is 0x04 so only 4 characters are displayed. If the length byte were 0x07, V200-204P
would read "ello wo".
Example 5: Blank-Padded on Right
Given:
V200/MSB = 'h'
V200/LSB = 'e'
V201/MSB = 'l'
V201/LSB = 'l'
V202/MSB = 'o'
V202/LSB = NULL
V203/MSB = 'w'
V203/LSB = 'o'
V204/MSB = 'r'
V204/LSB = 'l'
V205/MSB = 'd'
To address a blank padded string starting at V200 with a length of 10 bytes and the memory data is as stated
above:
V200-204 would read "hello".
www. kepware.com
15
Zobrazit stránku 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 38 39

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

Žádné komentáře