Page 51

Petruzella_ProgrammableLogicControllers__5e

• A SINT or Single Integer base tag uses 8 bits of memory and stores the data in bits 0 to 7. These bits are sometimes called the low byte. The other 3 bytes, bits 8 to 31, are unused. SINTs have a range of 2128 (negative values) to 127 (positive values). • An INT or Integer base tag is 16 bits, bits 0 to 15, sometimes called the lower bytes. Bits 16 to 31 are unused. INTs have a range between 232,768 and 32,767. • A DINT or Double Integer base tag uses 32 bits, or all 4 bytes, and has the following range: 2231 to 23121 (22,147,483,648 to 2,147,483,647). • A REAL base tag also uses 32 bits of a memory location and has a range of values based on the IEEE Standard for Floating-Point Arithmetic. Structures There is another class of data types called structures. A structure-type tag is a grouping of different data types that function as a single unit and serve a specific purpose. An example of an RSLogix structure is shown in Figure 15-17. Each element of a structure is referred to as a member and each member of a structure can be a different data type. Name PRE ACC EN TT DN FS LS OV ER Data Types Style Description DINT Decimal Decimal Decimal Members Data Types Decimal Decimal Decimal DINT BOOL BOOL BOOL BOOL BOOL BOOL BOOL 340 Part 1  Memory and Project Organization Name Description Data type : COUNTER Counter Members Data type size : 12 byte(s) Name Data Type Style Description PRE ACC CU CD DN OV UN DINT DINT BOOL BOOL BOOL BOOL BOOL Decimal Decimal Decimal Decimal Decimal Decimal Decimal There are three different types of structures in a ControlLogix controller: predefined, module-defined, and userdefined. The controller creates predefined structures for you that include timers, counters, messages and PID types. An example of a predefined counter instruction structure is shown in Figure 15-18. It is made up of the preset value, the accumulated value, and the instruction’s status bits. Module-defined structures are automatically created when the I/O modules are configured for the system. When you add input or output modules a number of defined tags are automatically added to the controller tags. Figure  15‑19 shows the two tags (Local:1:C and Local:1:I) created after a digital input module has been Figure 15-16  Types of base tag data. BOOL 31 0 Unused SINT 31 7 0 Unused INT 31 15 0 Unused DINT 31 0 REAL 31 0 Figure 15-17  Structure-type tag. Figure 15-18  Predefined structure. Figure 15-19  Module-defined structure for a digital input module. Source: Image Courtesy of Rockwell Automation, Inc.


Petruzella_ProgrammableLogicControllers__5e
To see the actual publication please follow the link above