Page 52

Petruzella_ProgrammableLogicControllers__5e

Tank Description: Generic Storage Tank Data Type Name Data Type Style Description Level Pressure Temp Name: Agitator_Speed INT DINT REAL DINT Decimal Decimal Float Decimal Size: 16 byte(s) Stores the Level in Inches Stores the Pressure in PSIG The Temperature in F Speed in RPM Figure 15-20  User-defined storage tank structure. added. Tags of these types are created to store input, output, and configuration data for the module. Input tags labeled Data contain the actual input bits from the module. Configuration tags determine the characteristics and operation of the module. The name Local indicates that these tags are in the same rack as the processor. The 1 indicates that the module occupies slot 1 in the chassis. The letters I and C indicate whether the data are input data or configuration data. A user-defined structure supplements the predefined structures by providing the ability to create custom-defined structures to store and handle data as a group. Figure 15-20 illustrates a user-defined structure that contains data for a storage tank. All data relative to the tank are stored together. In the design stage the programmer creates a generic user-defined memory structure that contains all the different aspects of the storage tank. Each member has a meaningful name and is created in the appropriate data type and style like REAL (floating point) for temperature and DINT (decimal) for agitator speed in rpm. Installation and maintenance personnel can easily locate all data associated with the operation of the tank since all the information is stored together. Creating Tags There is more than one way to create tags. You may create tags in the tag editor before your program is entered, enter tag names as you program, or use question marks ? in place of tag names and assign the tags later. Figure 15-21 shows an example of a controller scope base tag created in the new tag dialog box. When defining tags, the following information has to be specified: • A tag name, which must begin with an alphabetic character or an underscore (_). Names can contain only alphabetic characters, numeric characters, or underscores and may be up to 40 characters in length. They may not have consecutive or trailing underscore characters, are not case sensitive and cannot have spaces in the tag name. • An optional tag description, which may be up to 120 characters in length. • The tag type: base, alias, or consumed. • The data type, which is obtained from the list of predefined or user-defined data types. • The scope in which to create the tag. Your options are the controller scope or any one of the existing program scopes. • The display style to be used when monitoring the tag in the programming software. The software will display the choices of available styles. • Whether or not you want to make this tag available to other controllers and the number of other controllers that can consume the tag. New Tag Name: All_Stop OK Description: Cancel This is the Line Stop pushbutton input. Tag Type: Base Alias Produced Consumed Data Type: BOOL 1 consumers Scope: Controller1(controller) Controller controller1 Style: Binary Controller tags New Tag... Ctrl+W Monitor Tags Edit Tags Verify Export Tags... Print Ctrl+P Figure 15-21  Controller scope base tag. Source: Image Courtesy of Rockwell Automation, Inc. Help Configure ··· ··· Memory and Project Organization  Part 1 341


Petruzella_ProgrammableLogicControllers__5e
To see the actual publication please follow the link above