94 Publication LOGIX-AP008B-EN-P - June 2008
Chapter 4 Conversion of Typical Program Structures
Arrays
STEP 7 and Logix both allow arrays of simple or complex objects to be
created in memory. Logix has high-level support for accessing arrays. In STEP
7 however, low-level programming is needed.
STEP 7 Array Creation
The following screen shot shows two arrays that have been created in an
instance data block. Simple_array is an array of 10 elements. UDT_array is an
array of 10 structures of type test_UDT1, where test_UDT1 is a user data type
containing a few other types, not shown.
Logix Array Creation
This is exactly the same in Logix.
Array Declaration Syntax
STEP 7 uses the declaration syntax ARRAY[0…15] OF REAL. Logix uses
REAL[15].
STEP 7 has a special syntax for strings. STRING[32] is a 32 character string in
STEP 7 whereas in Logix STRING[32] is an array of thirty two strings, each
one containing 82 characters.
Kommentare zu diesen Handbüchern