Object Sub-Structures
Section 6 Program Code Issues
88
3BSE042835-600
Project Constants
Project constants can be read in libraries and be changed project wide with a single
operation. They are suitable for library items that the user may want to change.
Examples are date and time formats, logical colors and names, alarm condition
texts, and alarm and event texts.
Project constants shall not be used to change functionality of an object
(for example, as initial values and as comparisons in code).
Since the project constants are stored on library level, it is important to consider
incompatibilities at new library versions. There can be only one default value of a
project constant with a certain name and since it must be assumed that a library
version should co-exist with previous version, the default value should never be
changed in new library versions.
Project constants shall begin with a lowercase “c”, followed by an uppercase letter.
For structured project constants, this rule applies to the main name only, not to the
individual components (for example cColors.Error).
Object Sub-Structures
Protection and Scope
Internal function block/control module types, that are used for code-reuse (see
further
on page 89), shall have both Protection and Hidden attribute
set to True. See
on page 42, for the non-hidden
function block types/control module types
All non-hidden object types shall have Public scope. The scope of an internal type
depends on the usage. The scope shall be Private if the type only is used within the
same library. Types used in other libraries must, of course, have Public scope. PPA
aspect can be used for object oriented graphical design even if the types are
protected, by using the option
Sub Objects visible in PPA
.
The non-hidden object types with Private scope shall be sub objects to the object
type with Protection attribute.
Содержание AC 800M
Страница 1: ...Power and productivity for a better worldTM AC 800M Library Object Style Guide System Version 6 0...
Страница 2: ......
Страница 3: ...AC 800M Library Object Style Guide System Version 6 0...
Страница 12: ...Related Documentation About This User Manual 12 3BSE042835 600...
Страница 18: ...Naming Convention Section 1 Libraries 18 3BSE042835 600...
Страница 108: ...SIL Mark Restrictions Section 6 Program Code Issues 108 3BSE042835 600...
Страница 116: ...Standard Library Parameters Appendix A Names and Abbreviations 116 3BSE042835 600...
Страница 119: ......