Complete Solution (Tutorial) teaches you to:
- Create a tank farm monitoring system with:
- 3 tanks with level, temperature, and status
- Real-time data simulation
- Operational displays with gauges
- High/low level alarms
- Historical trending
- Simple reports
Prerequisites:
- Alarms & Audit-Trail (Tutorial)
- Historian: Store & Trend Data (Tutorial)
- Displays - Add Animations (Tutorial)
- Displays - Add Components (Tutorial)
In this page:
Table of Contents maxLevel 2 minLevel 2 indent 10px exclude Steps style none
Create Solution Structure (3 min)
Create New Solution
- Open Solution Center
- Click New
- Configure:
- Name:
TankFarmMonitor
- Template:
HeaderLayout
- Product:
FactoryStudio
(or your license)
- Name:
- Click Create
- Designer opens automatically
Create Asset Folders
- Go to Unified Namespace → AssetTree
Create structure:
- TankFarm/
- Tank1
- Tank2
- Tank3
Step 2:
Configure Tags (5 min)
Create Basic Tags
Using simple types (no templates yet):
- Go to Unified Namespace → Tags
- Create these tags:
Tank 1 Tags:
Name | Type | Folder | Description |
---|---|---|---|
Tank1_Level | Double | /TankFarm/Tank1 | Tank level 0-100% |
Tank1_Temp | Double | /TankFarm/Tank1 | Temperature °C |
Tank1_Status | Integer | /TankFarm/Tank1 | 0=Empty 1=Filling 2=Full |
Tank1_HiAlarm | Digital | /TankFarm/Tank1 | High level alarm |
Tank1_LoAlarm | Digital | /TankFarm/Tank1 | Low level alarm |
- Copy-Paste for Tank 2 and 3:
- Select all Tank1 rows (Ctrl+Click)
- Copy (Ctrl+C)
- Paste (Ctrl+V)
- Find/Replace: Tank1 → Tank2
- Paste again and replace Tank2 → Tank3
Add Simulation
For testing without real devices:
- Select
Tank1_Level
- In properties, set:
- Min: 0
- Max: 100
- Simulation: Ramp
- Period: 60 seconds
- For temperatures:
Tank1_Temp
: Random, 20-30°CTank2_Temp
: Random, 20-30°CTank3_Temp
: Random, 20-30°C
Setup Alarms (3 min)
Info | ||
---|---|---|
| ||
One key productivity feature: After creating tags, you can copy and paste them directly to:
|
Copy Tags to Alarms
- Go back to Tags table
- Select level tags:
- Tank1_Level
- Tank2_Level
- Tank3_Level
- Copy (Ctrl+C)
- Go to Alarms → Items
- Paste (Ctrl+V)
- Configure each row:
Tag | Condition | Limit | Priority | Message |
---|---|---|---|---|
Tank1_Level | Hi | 90 | High | Tank 1 High Level |
Tank1_Level | Lo | 10 | Medium | Tank 1 Low Level |
- Copy first row, paste, modify for Tank2 and Tank3
Configure Historian (3 min)
Copy Tags to Historian
- Go to Tags table
- Select all level and temperature tags
- Copy (Ctrl+C)
- Go to Historian → Tags
- Paste (Ctrl+V)
- Set intervals:
- Level tags: 10 seconds
- Temperature tags: 30 seconds
Storage Configuration
- Go to Historian → Storage
- Use default SQLite for testing
- Set retention: 30 days
Create Main Display (7 min)
Setup Display
- Go to Displays → Draw
- Create new display:
Overview
Quick Tank Creation
For each tank:
- Draw Rectangle (tank body)
- Size: 200x300
- Fill: Light gray
- Border: Dark gray, 2px
- Copy Tag to Display:
- Go to Tags table
- Select
Tank1_Level
- Copy (Ctrl+C)
- Go back to display
- Paste (Ctrl+V)
- Text box appears with tag binding
- Add Bargraph:
- Draw rectangle inside tank
- Double-click for properties
- Dynamics → Bargraph
- Expression:
Tag.Tank1_Level
- Direction: Bottom to Top
- Add Values Display:
- Add TextBox
- Type:
Level: #Tag.Tank1_Level# %
- Copy, paste, change to:
Temp: #Tag.Tank1_Temp# °C
- Status Indicator:
- Draw circle
- Dynamics → FillColor
- Expression:
Tag.Tank1_Status
- Limits: 0=Gray, 1=Yellow, 2=Green
- Duplicate for Other Tanks:
- Select all Tank1 graphics
- Copy and paste twice
- Use Replace (Ctrl+H): Tank1 → Tank2, Tank3
Create Trend Display (3 min)
Add Trend from Historian
- Create new display:
Trends
- Go to Historian → Tags
- Select all configured tags
- Copy (Ctrl+C)
- Go back to display
- Paste (Ctrl+V)
- TrendChart automatically created with all historian tags
Configure Chart
- Set time range: Last hour
- Add navigation buttons to return to Overview
Create Simple Report (3 min)
Production Report
- Go to Reports → Text
- Create new:
DailyReport
- Add content:
DAILY TANK REPORT Date: @Info.Date@ Tank 1: @Tag.Tank1_Level@ % Tank 2: @Tag.Tank2_Level@ % Tank 3: @Tag.Tank3_Level@ % Average: @Tag.Average@
- Go to Scripts → Tasks
- Create task to calculate average:
csharp
@Tag.Average = (@Tag.Tank1_Level + @Tag.Tank2_Level + @Tag.Tank3_Level) / 3;
Test Solution (2 min)
Start Test Mode
- Press F5 or click Run Testshortcut
- Verify:
- Levels changing (simulation)
- Alarms triggering
- Trends updating
- Navigation working
Test Checklist
- All tags showing values
- Bargraphs animating
- Alarms at 90% and 10%
- Trend showing history
- Report generating
Run Solution (2 min)
Start Runtime
- Go to Runtime → Startup
- Select Development profile
- Click Run Startup
Open Clients
- Web Browser: http://localhost
- Mobile: Use tablet browser
- Navigate through displays
Productivity Tips
Copy-Paste Workflow
The power of copy-paste:
- Create once in Tags
- Copy to Alarms, Historian, Points
- Automatic binding when pasted to displays
- Bulk operations with Find/Replace
Quick Duplication
For similar equipment:
- Configure one completely
- Copy all related items
- Paste and Find/Replace names
- Saves 70% configuration time
Direct Tag Dropping
Alternative to copy-paste:
- Select tags in tree
- Drag directly to display
- Auto-creates appropriate control
Next Steps
Add Complexity Gradually
Now that basics work, add:
- Device Connection (10 min)
- Replace simulation with real PLCs
- Map points to tags
- User Security (10 min)
- Add login screen
- Configure permissions
- Advanced Graphics (15 min)
- Import P&ID backgrounds
- Add animations
- Create popups
- Business Logic (15 min)
- Calculate KPIs
- Add recipes
- Create schedules
Learning Resources
- Tutorial: Connecting to Devices
- Tutorial: Adding Scripts
- Tutorial: Security Configuration
- Video: Advanced Graphics
Troubleshooting
Tags not updating:
- Check simulation enabled
- Verify runtime started
- Look for typos in names
Copy-paste not working:
- Ensure compatible types
- Check column mapping
- Verify destination table
Alarms not triggering:
- Check limits are correct
- Verify tag values reaching limits
- Ensure alarm group enabled
This guide demonstrated building a complete solution using basic tag types and the copy-paste accelerator, providing a foundation for more complex applications while maintaining simplicity for beginners.
In this section...
Page Tree | ||||
---|---|---|---|---|
|