Skip to content

An ODK project created as a vibe coder (claude), that interacts with Unified PC RT, using the ODK library.

Notifications You must be signed in to change notification settings

dodup/Unified-AdminConsole

Repository files navigation

WinCC Unified Runtime GUI Client

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.

Features

๐Ÿท๏ธ Tag Operations

  • 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

๐Ÿ“Š Logging Operations

  • 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

User Interface

Modern Design

  • 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

Interactive 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

Building and Running

Prerequisites

  • .NET 6.0 SDK or later
  • WinCC Unified Runtime installed
  • Windows 64-bit OS

Build

Debug Build:

cd WinCCUnifiedGUI
dotnet build

Release Build:

cd WinCCUnifiedGUI
dotnet build -c Release

Run

Using dotnet run:

dotnet run

Debug Executable:

cd bin\Debug\net6.0-windows
WinCCUnifiedGUI.exe

Release Executable:

cd bin\Release\net6.0-windows
WinCCUnifiedGUI.exe

Using the Application

1. Connect to Runtime

  1. Launch the application
  2. Click the Connect button in the top-right corner
  3. Wait for connection confirmation
  4. The header will display the runtime version information
  5. The status indicator will turn green

2. Working with Tags

To Read a Tag:

  1. Switch to the Tags tab
  2. Enter the tag name in the "Tag Name" field (e.g., Tag1, HMI_Tag_1)
  3. Click Read Tag
  4. The tag's current value, quality, and timestamp will appear in the grid

To Write a Tag:

  1. Enter the tag name
  2. Enter the desired value in the "Tag Value" field
  3. Click Write Tag
  4. Confirm the write operation in the dialog
  5. The tag will be automatically re-read to show the updated value

To Browse All Tags:

  1. Click Browse All Tags
  2. All tags in the system will be displayed in the grid
  3. Click any column header to sort

3. Viewing Historical Data

To Read Logging History:

  1. Switch to the Logging tab
  2. Enter the logging tag name (format: TagName:LoggingTagName)
    • Example: HMI_Tag_1:LoggingTag_1
  3. Set the time range in minutes (default: 10)
  4. Click Read History
  5. All logged values within the time range will appear

To Browse Logging Tags:

  1. Click Browse Logging Tags
  2. All configured logging tags will be listed

4. Monitoring Alarms

To Subscribe to Alarms:

  1. Switch to the Alarms tab
  2. Click Subscribe to Alarms
  3. The application will:
    • Load all pending/active alarms
    • Monitor for new alarms in real-time
    • Display alarms as they occur

To Stop Subscription:

  1. Click Stop Subscription
  2. No new alarms will be received (existing alarms remain visible)

5. Exploring Plant Model

To Browse Plant Objects:

  1. Switch to the Plant Model tab
  2. Enter the object path (default: .hierarchy::RootNodeName)
  3. Click Browse Plant Objects
  4. All child objects will be displayed

To Read a Property:

  1. Enter the plant object path
  2. Enter the property name
  3. Click Read Property
  4. The property value will appear in the grid

Tag Naming Conventions

Regular Tags

  • Simple: Tag1, HMI_Tag_1
  • Structure members: StructureTag.Member1

Logging Tags

  • Format: TagName:LoggingTagName
  • Examples:
    • HMI_Tag_1:LoggingTag_1
    • Tag1:Tag1Logging1

Plant Model Paths

  • Format: .hierarchy::NodePath
  • Examples:
    • .hierarchy::RootNodeName
    • .hierarchy::RootNodeName/Node1
    • RUNTIME_1.hierarchy::PlantView

Architecture

Technology Stack

  • 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

Key Components

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 model
  • LoggingDisplayItem: Logging data model
  • AlarmDisplayItem: Alarm data model
  • PlantModelDisplayItem: Plant model data model

Assets

  • logo.svg: Application logo (displayed in header)
  • icon.svg: Source vector icon
  • icon.ico: Generated multi-resolution application icon (256, 128, 64, 48, 32, 16px)
  • icon.png: PNG version of icon

Troubleshooting

Connection Issues

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

Tag Operations

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

Alarm Subscription

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

Advanced Features

Auto-refresh

  • Alarms update automatically when subscribed
  • New alarms appear at the top of the grid
  • No manual refresh needed

Data Persistence

  • Grid contents remain until cleared or disconnected
  • Allows comparison of historical values
  • Easy export by copying grid contents

Error Handling

  • All operations include comprehensive error messages
  • Status bar shows operation results
  • Color-coded feedback (green=success, orange=warning)

Comparison with Console Application

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

Next Steps

Customization Ideas

  • Add filtering to DataGrids
  • Implement tag value charts/graphs
  • Add alarm acknowledge functionality
  • Create custom alarm filters
  • Export data to CSV/Excel

Extension Points

  • Modify button styles in App.xaml
  • Add new tabs for additional features
  • Customize grid columns
  • Add search/filter capabilities

Support

For issues or questions:

  1. Check this README for common solutions
  2. Review the console application for API usage patterns
  3. Consult examples/samples/CSharp/ for advanced examples
  4. Check doku/APIWCCUenUS.pdf for complete API documentation

Built with WPF and the Siemens WinCC Unified Runtime API

About

An ODK project created as a vibe coder (claude), that interacts with Unified PC RT, using the ODK library.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages