A modern Windows Presentation Foundation (WPF) graphical user interface for interacting with Siemens WinCC Unified Runtime. This application provides comprehensive access to tags, logging, alarms, and plant model operations through an intuitive tabbed interface.
- Read Tags: View current tag values with quality and timestamp
- Write Tags: Update tag values with confirmation dialogs
- Browse Tags: Discover and list all available tags in the system
- Real-time Display: DataGrid shows tag name, value, quality, timestamp, and data type
- Read Historical Data: Retrieve logged values with configurable time ranges
- Browse Logging Tags: List all tags configured for logging
- Flexible Time Range: Specify how many minutes of history to retrieve
- Data Visualization: View logged data in a sortable grid
- Clean Layout: Professional blue color scheme with white accents
- Rounded Corners: Subtle modern styling with 4px corner radius
- Custom Application Icon: SVG-based icon displayed in Windows taskbar and title bar
- Tab-based Navigation: Easy switching between functional areas
- Status Bar: Real-time connection status and operation feedback
- Connection Indicator: Visual indicator (red/green) for runtime connection status
- Borderless Window: Custom window chrome with minimize, maximize, and close controls
- Connect/Disconnect: One-click connection management
- Operation Buttons: Clearly labeled buttons for all operations
- Input Validation: Built-in checks for required fields
- Confirmation Dialogs: Safety prompts for write operations
- .NET 6.0 SDK or later
- WinCC Unified Runtime installed
- Windows 64-bit OS
Debug Build:
cd WinCCUnifiedGUI
dotnet buildRelease Build:
cd WinCCUnifiedGUI
dotnet build -c ReleaseUsing dotnet run:
dotnet runDebug Executable:
cd bin\Debug\net6.0-windows
WinCCUnifiedGUI.exeRelease Executable:
cd bin\Release\net6.0-windows
WinCCUnifiedGUI.exe- Launch the application
- Click the Connect button in the top-right corner
- Wait for connection confirmation
- The header will display the runtime version information
- The status indicator will turn green
To Read a Tag:
- Switch to the Tags tab
- Enter the tag name in the "Tag Name" field (e.g.,
Tag1,HMI_Tag_1) - Click Read Tag
- The tag's current value, quality, and timestamp will appear in the grid
To Write a Tag:
- Enter the tag name
- Enter the desired value in the "Tag Value" field
- Click Write Tag
- Confirm the write operation in the dialog
- The tag will be automatically re-read to show the updated value
To Browse All Tags:
- Click Browse All Tags
- All tags in the system will be displayed in the grid
- Click any column header to sort
To Read Logging History:
- Switch to the Logging tab
- Enter the logging tag name (format:
TagName:LoggingTagName)- Example:
HMI_Tag_1:LoggingTag_1
- Example:
- Set the time range in minutes (default: 10)
- Click Read History
- All logged values within the time range will appear
To Browse Logging Tags:
- Click Browse Logging Tags
- All configured logging tags will be listed
To Subscribe to Alarms:
- Switch to the Alarms tab
- Click Subscribe to Alarms
- The application will:
- Load all pending/active alarms
- Monitor for new alarms in real-time
- Display alarms as they occur
To Stop Subscription:
- Click Stop Subscription
- No new alarms will be received (existing alarms remain visible)
To Browse Plant Objects:
- Switch to the Plant Model tab
- Enter the object path (default:
.hierarchy::RootNodeName) - Click Browse Plant Objects
- All child objects will be displayed
To Read a Property:
- Enter the plant object path
- Enter the property name
- Click Read Property
- The property value will appear in the grid
- Simple:
Tag1,HMI_Tag_1 - Structure members:
StructureTag.Member1
- Format:
TagName:LoggingTagName - Examples:
HMI_Tag_1:LoggingTag_1Tag1:Tag1Logging1
- Format:
.hierarchy::NodePath - Examples:
.hierarchy::RootNodeName.hierarchy::RootNodeName/Node1RUNTIME_1.hierarchy::PlantView
- Framework: .NET 6.0 with WPF
- UI Pattern: Code-behind with observable collections
- Data Binding: Two-way binding for real-time updates
- Threading: SynchronizationContext for cross-thread UI updates
- SVG Rendering: SharpVectors.Reloaded library for logo and icon rendering
- Icon Generation: Custom SVG-to-ICO converter with multi-resolution support
MainWindow.xaml
- XAML markup defining the UI structure
- Tabbed interface with DataGrids
- Modern styling with custom resources
- Borderless window with custom title bar and rounded corners
MainWindow.xaml.cs
- Event handlers for all UI operations
- Runtime API integration
- Observable collections for data binding
- Alarm subscription callbacks
- SVG logo loading with PNG fallback
App.xaml
- Application-wide resource dictionary
- Blue color palette with consistent theming
- Custom button and control styles
- Window control button styles (minimize, maximize, close)
App.xaml.cs
- Application lifecycle management
- Startup configuration and splash screen
- Process cleanup on exit
SplashScreen.xaml / SplashScreen.xaml.cs
- Loading screen with animated progress bar
- SVG logo rendering with fallback
Display Item Classes
TagDisplayItem: Tag data modelLoggingDisplayItem: Logging data modelAlarmDisplayItem: Alarm data modelPlantModelDisplayItem: Plant model data model
Assets
logo.svg: Application logo (displayed in header)icon.svg: Source vector iconicon.ico: Generated multi-resolution application icon (256, 128, 64, 48, 32, 16px)icon.png: PNG version of icon
Problem: "Failed to connect to WinCC Unified Runtime"
Solutions:
- Ensure WinCC Unified Runtime is running
- Verify a project is loaded in the runtime
- Check that you're running the application as the same user
Problem: Tag not found
Solutions:
- Use "Browse All Tags" to see available tags
- Check tag name spelling and case sensitivity
- Verify tag exists in the loaded project
Problem: No alarms appearing
Solutions:
- Check that alarms are configured in your project
- Verify system name (default: SYSTEM1)
- Try triggering an alarm in the runtime
- Alarms update automatically when subscribed
- New alarms appear at the top of the grid
- No manual refresh needed
- Grid contents remain until cleared or disconnected
- Allows comparison of historical values
- Easy export by copying grid contents
- All operations include comprehensive error messages
- Status bar shows operation results
- Color-coded feedback (green=success, orange=warning)
| Feature | Console App | GUI App |
|---|---|---|
| User Interface | Text-based menu | Modern graphical interface |
| Data Display | Sequential text | Sortable grid with columns |
| Real-time Updates | Manual polling | Automatic UI updates |
| Multiple Operations | One at a time | Browse while subscribed |
| Data Export | Manual copy | Grid copy/export |
| Usability | Developer-focused | User-friendly |
- Add filtering to DataGrids
- Implement tag value charts/graphs
- Add alarm acknowledge functionality
- Create custom alarm filters
- Export data to CSV/Excel
- Modify button styles in
App.xaml - Add new tabs for additional features
- Customize grid columns
- Add search/filter capabilities
For issues or questions:
- Check this README for common solutions
- Review the console application for API usage patterns
- Consult
examples/samples/CSharp/for advanced examples - Check
doku/APIWCCUenUS.pdffor complete API documentation
Built with WPF and the Siemens WinCC Unified Runtime API