5. Initial Programming
221
The Table 5-2 shows the organization and memory access, illustrating the significance of bytes and
the disposition of other variable types, including overlapping.
Project Profiles
A project profile in MasterTool Xtorm is a group of rules, common features and patterns used in the
development of an industrial automation solution. A profile implies in the implementation of the
application form. Following a profile is a way to simplify the programming complexity. The
applications can be created according the following profiles:
For each profile defined for the RTS, MasterTool Xtorm provides several compatible templates.
When the user selects a template as a model in project creation, the new application will be
developed as a specific profile, adopting rules, characteristics and standards defined by the profile
associated with the template. Each project profile defines standard names for tasks and programs,
which are pre-created by the project templates. The developer is required to follow the nomenclature
strictly for the tasks, but can follow or not the suggested names for the respective programs.
To ensure compatibility between the project and the profile across the application development, two
approaches are used:
MasterTool IEC Xtorm allows the project creation only based on a template, selected at the same
time as the profile to be used.
At the code generation, the MasterTool Xtorm executes the verification of all defined rules for
the user valid profile.
The next sections bring details regarding the features and patterns of each profile, which increase
gradually in complexity. It is recommended the user to apply always the simplest profile that meets
his application needs, migrating to another profile, more sophisticated, only when the correspondent
rules are bringing more problems than helping. It is important to stress that the programming tool
allows the profile change from an existent project, but it is up to the developer to adjust what is
necessary to guarantee the project compatibility with the new rules from the selected profile.
ATTENTION:
While the project profiles are being described, some tasks are named. See Task Configuration.
Profile for RTU
The “Profile for RTU” can be created for redundant or non-redundant projects. In this profile type,
the application can have up two user tasks - the “MainTask” which is created by default for simple
and redundant projects, and the “ProtTask” which will be created only if the user defines its use in
the project. The “MainTask” is responsible for the execution of a single “Program” unit called
“MainPrg”. This program cannot be edited and it can call other four programming units (“Program”
type), named “StartPrg”, “EngineeringPrg”, “AlarmPrg” and “UserPrg”.
The programs “StartPrg” and “UserPrg” are the only ones of “MainTask” that may contain user
codes with the possibility to call other programming units (“Program”, “Function” or “Function
Block”). However, the user code will be implemented by “MainTask”. As for the programs
“EngineeringPrg” and “AlarmPrg”, they are created automatically and are responsible, respectively,
for performing the engineering conversion and signal alarms mapped by the user in the CPU
configuration screens. For more information about alarms and engineering conversion, see chapter
CPU.
“ProtTask” also runs a single programming – “Program” - whose name is “ProtPrg”. This program
cannot be edited and it calls the “UserProtPrg” which, in turn, can call other programming units and
is responsible for executing the project protection routines.