Topic 2.2.6: Templates & Instances
- Templates
-
- Templates are high-level definitions of the devices in your environment. Templates are like a cookie cutter from which you can make many identical cookies.
-
- You define a template for an object, such as a valve, one time and then use that template when you need to define another instance of that item. Template names have a dollar sign ($) as the first character of their name.
-
- A template can specify application logic, alarms, security, and historical data for an object.
-
- You can also nest templates, or contain them. Contained templates consist of nested object templates that represent complex devices consisting of smaller, simpler devices, including valves. A reactor is a good candidate of containment.
-
- Templates exist only in the development environment.
- Creating a Template
- Right-click on the appropriate type of object, and select New / Derived Template. For example, use the $UserDefined object to create a $Mixer template as a container for the mixer’s various components (agitator, inlet valves, pumps, and so on).
- Instances
- Instances are the run-time objects created from templates in Wonderware Application Server. Instances are the specific things in your environment like processes, valves, conveyer belts, holding tanks, and sensors. Instances can get information from sensors on the real-world device or from application logic in Wonderware Application Server. Instances exist during run time.
- In your environment, you may have a few instances or several thousand. Many of these instances may be similar or identical, such as valves or holding tanks. Creating a new valve object from scratch when you have several thousand identical valves is time-consuming. That's where templates come in.
Last modified: Saturday, 4 April 2020, 9:56 AM