
Templates
Section 6 Program Code Issues
94
3BSE042835-600
components in them. The data type should have attribute Protected and have a
complete description of all components as well as the type itself.
3.
All other data types are presumed to be Public data types. All the Public data
types are important for the user. The Public data types should have a complete
description of all components as well as the type itself.
4.
ISP values must be defined for all components in a data type on order to be
used for a communication variable in a SIL application.
It is not recommended to use the attribute State. Use a construction with a local
variable with the suffix Old, which holds the value of the variable from last scan.
The Old-variable should be assigned at the end of the code block in question.
Templates
There are two kinds of templates: those that are functional as is, and those that
require modifications to work. The latter category shall be NameTemplate (for
example, EquipProcedureTemplate). Code, intended to be changed by the user, shall
be put in templates. All other functional code should be placed in protected object
types. This strategy promotes safe future updates of programs.
Whether the “core” (that is, the code that does not have to be changed) of a template
should be designed as a function block type or a control module type, has to be
determined in each specific case.
In templates, it is recommended to use Structured Text. SFC may be used in
templates under certain circumstances, for example Batch recipes.
Naming of variables is especially important in templates (compared to protected
code), because the user shall be able to easily understand the design and function of
any given template. Refer to
Variables and Project Constants
variable naming recommendations.
Task Considerations
The normal case is when a control module type inherits the task connection of the
surrounding object type. There might however be some special cases where it is
wanted to have a sub module/function block running in another task than its parent.
This kind of constructions are allowed but should be used with caution. One special
Summary of Contents for AC 800M
Page 2: ......
Page 3: ...AC 800M Library Object Style Guide System Version 6 0...
Page 12: ...Related Documentation About This User Manual 12 3BSE042835 600...
Page 18: ...Naming Convention Section 1 Libraries 18 3BSE042835 600...
Page 108: ...SIL Mark Restrictions Section 6 Program Code Issues 108 3BSE042835 600...
Page 116: ...Standard Library Parameters Appendix A Names and Abbreviations 116 3BSE042835 600...
Page 119: ......