Use the User Defined object
- Last UpdatedJul 19, 2024
- 2 minute read
The User Defined object is a shell object that you can use to create custom objects. You can use the User Defined object in the following ways:
-
As a template containing Attributes associated to multiple variables in a system.
In this case, the object provides a simple and manageable structure as all the variables are contained in the same object.
For example, you might create a User Defined object called "Tank" and configure Attributes that represent variables associated to the tank system:
-
LT100 - Attribute with Read (Input) from a level transmitter configured with options such as: Scaling, Limit alarms and Statistics (Min/Max/Avg).
-
TT100 - Attribute with Read (Input) from a temperature transmitter configured with options such as Rate of Change alarm and Statistics (Min/Max/Avg).
-
SW100a - Attribute with Read (Input) from a limit switch configured with options such as State Labels and State alarm.
-
SW100b - Attribute with Read (Input) from a limit switch configured with options such as State Labels and State alarm.
-
XV100a - Attribute with Read/Write (InputOutput) to a solenoid valve configured with options such as State Labels, State alarm, and Statistics (Open/Close time).
-
XV100b - Attribute with Read/Write (InputOutput) to a solenoid valve configured with options such as State Labels, State alarm, Statistics (Open/Close time).
References between attributes in the object can be accomplished by using relative references, for example:
The "Tank" can be customized to raise an alarm when both XV100a and XV100b valves are open. For example, you can add a Boolean Attribute called "ValueOpenAlarm", configure it with an Alarm Feature, and then add the following OnExecute script:
IF me.XV100a == "Open" AND me.XV100b == "Open" THEN
me.ValueOpenAlarm = true;
ELSE
me.ValueOpenAlarm = false;
ENDIF;
-
-
As a "container" for other objects.
An object relationship in which one object is comprised of other objects is called containment. Containment allows you to group various objects together to make complex objects.
For detailed information on object containment, see the Application Server User Guide, Integrated Development Environment (IDE) documentation.