Page 360 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 360

Name:      Tank                  Size:  16  byte(s)  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.
                    Description:  Generic Storage Tank Data Type
                                                                         Creating Tags

                                                                         There is more than one way to create tags. You may create
                       Name       Data Type Style  Description
                          Level     INT   Decimal Stores the Level in Inches  tags in the tag editor before your program is entered, enter
                          Pressure  DINT  Decimal Stores the Pressure in PSIG  tag names as you program, or use question marks [?] in
                          Temp      REAL  Float  The Temperature in F    place of tag names and assign the tags later. Figure 15-21
                      Agitator_Speed  DINT  Decimal Speed in RPM         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:
                   Figure 15-20  User-defined storage tank structure.
                                                                           •  A tag name, which must begin with an alphabetic
                                                                             character or an underscore (_). Names can contain
                   added. Tags of these types are created to store input, out-  only alphabetic characters, numeric characters,
                   put, and configuration data for the module. Input tags    or underscores and may be up to 40 characters in
                   labeled Data contain the actual input bits from the mod-  length. They may not have consecutive or trailing
                   ule. Configuration tags determine the characteristics and   underscore characters, are not case sensitive and
                   operation of the module. The name Local indicates that    cannot have spaces in the tag name.
                   these tags are in the same rack as the processor. The 1   •  An optional tag description, which may be up to
                   indicates that the module occupies slot 1 in the chassis.   120 characters in length.
                   The letters I and C indicate whether the data are input   •  The tag type: base, alias, or consumed.
                   data or configuration data.
                     A user-defined structure supplements the predefined   •  The data type, which is obtained from the list of
                   structures by providing the ability to create custom-     predefined or user-defined data types.
                   defined structures to store and handle data as a group.   •  The scope in which to create the tag. Your options
                   Figure 15-20 illustrates a user-defined structure that con-  are the controller scope or any one of the existing
                   tains data for a storage tank. All data relative to the tank   program scopes.
                   are stored together. In the design stage the programmer   •  The display style to be used when monitoring the
                   creates a generic user-defined memory structure that con-  tag in the programming software. The software will
                   tains all the different aspects of the storage tank. Each   display the choices of available styles.
                   member has a meaningful name and is created in the ap-  •  Whether or not you want to make this tag available
                   propriate data type and style like REAL (floating point)   to other controllers and the number of other control-
                   for temperature and DINT (decimal) for agitator speed     lers that can consume the tag.


                                                               New Tag
                                                               Name:    All_Stop                    OK
                                     Controller controller1    Description:  This is the Line Stop pushbutton  Cancel
                                       Controller tags                  input.
                                             New Tag...      Ctrl+W
                                                                                                    Help
                                             Monitor Tags      Tag Type:  Base
                                             Edit Tags
                                             Verify                       Alias
                                             Export Tags...               Produced  1   consumers
                                                                          Consumed
                                             Print               Ctrl+P
                                                               Data Type:  BOOL             ···  Configure ···
                                                               Scope:   Controller1(controller)

                                                               Style:   Binary

                                   Figure 15-21  Controller scope base tag.
                                   Source: Image Courtesy of Rockwell Automation, Inc.



                                                                               Memory and Project Organization  Part 1  341







          pet73842_ch15_333-394.indd   341                                                                              03/11/15   7:33 PM
   355   356   357   358   359   360   361   362   363   364   365