Siemens IP-Module Especificaciones Pagina 61

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 85
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 60
Siemens TCP/IP Ethernet Driver Help
2. Use caution when modifying Word, Short, DWord, and Long types. For I, Q, and F each address starts at a
byte offset within the device. Therefore, Words FW0 and FW1 overlap at byte 1. Writing to FW0 will also
modify the value held in FW1. Similarly, DWord, and Long types can also overlap. It is recommended that
these memory types be used so that overlapping does not occur. For example, DWord, FD0, FD4, FD8 and
so on can be used to prevent overlapping bytes.
Data Block Strings
Data block Strings can be referenced by using S subtypes or String subtypes.
S Subtype
The syntax for the S subtype is DBxSy.n where x is the data block, y is the byte offset, and n is the maximum
String length. String values read and written are stored at byte offset y in data block x.
y y+1 y+2 ... y+n-1
' ' ' ' ' ' ... ' '
S Strings are null terminated. If the maximum string length is 10 and 3 characters are written, the fourth
character is set to NULL, while characters 5-10 are left untouched.
String Subtype
The String subtype follows the STEP 7 String data type definition. The syntax for the String subtype is
DBxSTRINGy.n, where x is the data block, y is the Byte offset, and n is the maximum String length. If n is not
specified, the maximum String length will be 210 characters. String values read and written are stored at Byte
offset y+2 in data block x. The first two bytes contain the maximum string length (n) and the actual string
length. The actual string length gets updated with every write based on the string length of the string being
written.
y y+1 y+2 y+3 y+4 ... y+2+n-1
maximum string length (n) actual string length ' ' ' ' ' ' ... ' '
Note:
String Strings are NULL padded. If the maximum string length is 10 and 3 characters are written, characters 4-
10 are set to NULL.
Hex Strings
The HEXSTRING subtype is specific to the Siemens TCP/IP Ethernet Driver. The syntax for the HEXSTRING
subtype is HEXSTRINGy.n, where y is the byte offset and n is the length. The n value must be specified in the
range of 1 through 212. String is the only valid data type for a HEXSTRING tag.
The value assigned to a HEXSTRING must be an even number of characters. There is no padding, so the entire
string must be specified. For example, tag HexStr defined as DB1,STRING0.10 uses 10 bytes of storage and has
a display length of 20. To assign a value, the string must be 20 characters long and contain only valid
hexadecimal characters. An example valid hex string for this tag is “56657273696f6E353137”.
Arrays
All memory types/subtypes with the exception of those marked with an asterisk support arrays. The syntax below
are valid for declaring an array. If no rows are specified, a row count of 1 is assumed.
<address>[rows][cols]
<address>.rows.cols
<address>,rows,cols
<address>_rows_cols
For Word, Short, BCD and "KT" arrays, the base address + (rows * cols * 2) cannot exceed 65536. Keep in mind
that the elements of the array are words, located on a word boundary. For example, IW0[4] would return IW0,
IW2, IW4, and IW6. "KT" subtypes fall into the 16-bit category because the data stored in the PLC is contained
within a Word. For more information, refer to Timers.
For Float, DWord, Long, and Long BCD arrays (excluding "KT" subtypes), the base address + (rows * cols * 4)
cannot exceed 65536. Keep in mind that the elements of the array are DWord, located on a DWord boundary. For
example, ID0[4] will return ID0, ID4, ID8, ID12.
For all arrays, the total number of bytes being requested cannot exceed the internal block size of 212 bytes.
www. kepware.com
61
Vista de pagina 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 84 85

Comentarios a estos manuales

Sin comentarios