Add Tags to UNS (Tutorial) teaches you to:
- Create different tag types
- Organize tags with folders
- Configure tag properties
- Use UserTypes (UDTs)
Prerequisites:
Tags created here providing the foundation for all other tutorials.
In this page:
Understanding Tag Types
Some fundamental tag types supported by the platform:
Type | Use Case | Example |
---|---|---|
Digital | On/Off states | Motor_Running |
Integer | Whole numbers | Product_Count |
Double | Decimal values | Temperature |
Text | Strings | Batch_ID |
DateTime | Timestamps | Last_Update |
Step 1: Create Tank Farm Tags
- Open Unified Namespace → Asset Tree
- Create folder structure:
- Right-click → New Folder:
TankFarm
- Create subfolders:
Tank1
- Right-click → New Folder:
- Create Tank1 tags:
- Select the Tank1 folder, then click the Add Tag button
- The Tag will be created inside that folder
- If you create in a wrong place, just drag drop to the correct location
Name | Type | Folder | Min | Max | Units | Description |
---|---|---|---|---|---|---|
Level | Double | TankFarm/Tank1 | 0 | 100 | % | Tank level percentage |
Temp | Double | TankFarm/Tank1 | 0 | 150 | °C | Tank temperature |
Pressure | Double | TankFarm/Tank1 | 0 | 50 | PSI | Tank pressure |
PumpStatus | Digital | TankFarm/Tank1 | - | - | - | Pump running status |
ValvePosition | Integer | TankFarm/Tank1 | 0 | 100 | % | Valve position |
Quick duplication for Tank 2 & 3
- Select the Tank1 Folder
- Right-click the mouse and Copy (Ctrl+C)
- Select the
TankFarm
- Paste (Ctrl+V)
- Repeat the process to create Tank3
- Paste again and replace for Tank3
Step 2: Create Production Tags
Used for counters, batching, and KPI calculations:
- Add production tags:
Name | Type | Path | Description |
---|---|---|---|
Production_Count | Integer | Production | Units produced |
Production_Rate | Double | Production | Units per hour |
Batch_ID | Text | Production | Current batch identifier |
Batch_Start | DateTime | Production | Batch start time |
Shift_Number | Integer | Production | Current shift (1-3) |
Quality_Score | Double | Production | Quality percentage |
Paste to the Tags Table
In order to create those tags quicker, just copy copy-paste this table
- Select the entire table, include the titles (Name, Type, Path, Description)
- Open Unified Namespace →Tags
- Right-Click on the first row (insertion) row and execute PASTE
- if by mistake you left-click, instead of right click, you selected one specific cell to edit
- If that happen, either press ESC, or click with the mouse outside the grid area, to close that editing.
- This command will automatically create the Production folder, and the tags.
- Navigate to Unified Namespace →Asset Tree to confirm the tags are in the expected folder
Step 3: Create Equipment Tags
For motor control and equipment status:
- Create folder:
Equipment
- Add equipment tags:
Name | Type | Folder | Description |
---|---|---|---|
MotorRunning | Digital | Equipment | Motor on/off |
MotorSpeed | Double | Equipment | Motor RPM |
MotorCurrent | Double | Equipment | Motor current (Amps) |
MotorHours | Double | Equipment | Run hours |
ConveyoSpeed | Double | Equipment | Belt speed (m/s) |
Use similar expedite process you used for the other tags
Step 4: Configure Tag Properties
Add Simulation (for testing)
- Select
Tank1_Level
- In properties:
- Simulation: Ramp
- Period: 60 seconds
- For temperatures (random variation):
- Select all temperature tags
- Simulation: Random
- Min: 20, Max: 30
Set Retentive Values
For production counters:
- Select
Production_Count
- Enable Retentive checkbox
- Preserves value through restart
Step 5: Create Motor UserType
Build a reusable template:
- Navigate to Unified Namespace → UserTypes
- Create new type:
MotorType
- Add members:
- Running (Digital)
- Speed (Double, 0-3600 RPM)
- Current (Double, 0-100 Amps)
- Hours (Double, retentive)
- FaultCode (Integer)
- Return to Tags
- Create instances:
- Name:
Motor2
, Type:MotorType
- Name:
Motor3
, Type:MotorType
- Name:
Step 6: Create System Tags
For scripts and calculations:
Name | Type | Initial Value | Description |
---|---|---|---|
System_Running | Digital | 0 | System status |
Calc_Average | Double | 0 | Calculated average |
Alarm_Count | Integer | 0 | Active alarm counter |
Report_Trigger | Digital | 0 | Report generation trigger |
Step 7: Test Your Tags
- Click Run (F5)
- Open Unified Namespace → Monitor
- Verify:
- Simulation values changing
- Folder structure visible
- UserType instances expanded
- Double-click values to modify manually
Tag Summary
You've created ~40 tags that serve as the foundation for:
- Alarms: Level and temperature monitoring
- Historian: Time-series data collection
- Scripts: Calculations and logic
- Displays: Visual representations
- Reports: Production metrics
Next Steps
With tags configured, proceed to:
- [Alarms & Audit-Trail] - Monitor tank levels
- [Historian: Store & Trend] - Log process data
- [Scripts & Data Enrichment] - Add calculations
- [Complete Solution] - Build full application
In this section...