Siemens SIMATIC S7-200 Driver Manual - Page 19

Browse online or download pdf Driver Manual for Industrial Equipment Siemens SIMATIC S7-200. Siemens SIMATIC S7-200 28 pages. Ethernet gateway for simatic mpi/ profibus driver
Also for Siemens SIMATIC S7-200: Manual (30 pages), Manual (35 pages), Manual (49 pages), Manual (18 pages), System Manual (20 pages)

Siemens SIMATIC S7-200 Driver Manual
19
Note: V30.10@bool, V30.2@byte, and V30.26@DWord all reference the same bit in the controller.
Arrays
Certain memory types (I, Q, M, SM, V, AI, and AQ) support an array operation. Boolean arrays are not
allowed at this time. To specify an array address, append [rows][cols] to the end of an address. If only [cols] is
specified, [rows] defaults to 1. With the array type, it is possible to read and write a block of 200 bytes at one
time.
The maximum array size for Word and Short types is 100, and for DWord, Long and Float types is 50. The
array size is determined by the multiplication of rows and cols.
Note: The maximum array size also depends on the maximum block size of the device being used.
Examples
1. To read and write an array of 10 Variable Memory Float values starting with V10, declare an address as
follows: V10 [1][10]. Choose Float for the data type.
Note: This array reads and writes values to registers V10, V14, V18, V22 ... V46.
2. To read and write to bit 23 of Internal Memory Long M20, declare an address as follows: M20.23. Choose
Long for the data type.
Strings
The driver allows for variable length strings to be stored in Variable Memory locations. The bit number
specifies the string length (1-211) in characters. String data that is sent to the device, but is smaller in length
than the string character count (bit number), is null terminated. String data that meets or exceeds the
character length is truncated to the character count and sent to the device without a null terminator.
To read and write a string starting at V5 for a length of 10 characters, declare an address as follows: V5.10.
Choose string for the data type.
Notes:
1. V Memory locations V5-V14 would be used to store this 10 character string.
2. Not all devices support up to 211 character requests in a single transaction. To determine the
maximum number of characters that can be requested in a transaction, consult the device's
documentation. This value is the largest string the driver can Read/Write to and from the device.
www. ptc.com
Siemens S7-200 Driver