Siemens 6AV6651-7KA01-3AA4 - S7-1200 + KTP400 Basic Starter Kit 6AV6651-7KA01-3AA4 사용자 설명서

제품 코드
6AV6651-7KA01-3AA4
다운로드
페이지 364
 
PLC concepts made easy 
 
4.4 Memory areas, addressing and data types 
Easy Book 
Manual, 03/2014, A5E02486774-AF 
61
 
Data types 
Description 
Array and structure 
data types 
 
Array contains multiple elements of the same data type. Arrays can be created in the block 
interface editors for OB, FC, FB, and DB. You cannot create an array in the PLC tags editor. 
 
Struct defines a structure of data consisting of other data types. The Struct data type can be 
used to handle a group of related process data as a single data unit. You declare the name 
and internal data structure for the Struct data type in the data block editor or a block interface 
editor. 
Arrays and structures can also be assembled into a larger structure. A structure can be nested 
up to eight levels deep. For example, you can create a structure of structures that contain arrays. 
PLC data types 
PLC Data type is a user-defined data structure that defines a custom data structure that you can 
use multiple times in your program. When you create a PLC Data type, the new PLC Data type 
appears in the data type selector drop drop-lists in the DB editor and code block interface editor. 
PLC Data types can be used directly as a data type in a code block interface or in data blocks. 
PLC Data types can be used as a template for the creation of multiple global data blocks that use 
the same data structure. 
Pointer data types 
 
Pointer provides an indirect reference to the address of a tag. It occupies 6 bytes (48 bits) in 
memory and can include the following information to a variable: DB number (or 0 if the data is 
not stored in a DB), memory area in the CPU, and the memory address. 
 
Any provides an indirect reference to the beginning of a data area and identifies its length. 
The Any pointer uses 10 bytes in memory and can include the following information: Data 
type of the data elements, number of data elements, memory area or DB number, and the 
"Byte.Bit" starting address of the data. 
 
Variant provides an indirect reference to tags of different data types or parameters. The 
Variant pointer recognizes structures and individual structural components. The Variant does 
not occupy any space in memory. 
Although not available as data types, the following BCD (binary coded decimal) numeric 
formats are supported by the conversion instructions. 
●  BCD16 is a 16-bit value (-999 to 999). 
●  BCD32 is a 32-bit value (-9999999 to 9999999).