Class Editor
This section describes how to create new classes in ProviewR.
There are a number of different cases when you might consider creating a new class.
Data objects
You want to store data in a data structure, for example to easy gain access to the data from
applications. You can also create data objects that describe material that passes through
a plant, where the data object contains properites for one material, e.g. length, width etc.
The material can be moved between NMps cells to indicate the position of a material in the
plant.
Plc function object
A function object used in plc programming consists of a class that defines the input and
output pins of the function object, and possible internal attributes. This type of objects
also consist of codes that are executed by the plc program. You can choose to create the code
as plc code or c code.
Components
A component object reflects a component in the plant, and is often divided into two or three
different classes, a main object, a function object and a bus object, possibly also a
simulate object. The main object is placed in the plant hierarchy and contains the signals
that are connected to the component, in addition to other configuration data. A function
object, placed in a plc program, is connected to the main object and works partly with data
from its own inputs and outputs, and partly with signals and other parameters in the main
object. If the signal exchange is made via Profibus, you kan also create a special module
object that contains channel objects for the data transported on the Profibus. It is
sufficient to make one connection between the main and the module object, to connect all
signals and channels in the component. The simulation object is a function object, that is
connected to the main object, and that simulates the component when the system is run in
simulation mode.
Subclasses of components
ProviewR contains a number of basecomponent classes for valves, motors etc. These are designed
in a general fashion to cover a large number of components. Often, you create a subclass that
is adapted to a specific component, and that, for example, contains a link to a data sheet,
helptext etc. for this component. By creating a subclass of a basecomponent you inherit all
the methods and attributes from this, but you also have the possibility to increase the
functionality with more attributes and more plc-code.
Aggregates
An aggregate reflects a plant part that contains a number of components. In this case, you can
create an aggregate class that contains the different components in shape of attribute
objects. To the aggregate, there is also a function object, that calls the functions objects
for the present components. Aggregates can also contain other aggregates and give rise to
quite extensive object structures. In principle, you could build a plant is one single object,
but in practice it is appropriate to keep the object structure on a fairly low level. It is
mainly when you have several identical aggregates that you benefit by creating an aggregate
object of a plant part.
Database structure
Class description
Type description
Create classes
Build classvolume
Documentation of classes