Skip to content

Dynamic template connection with index for open page - #2508

Draft
kjellMenu wants to merge 1 commit into
frangoteam:masterfrom
kjellMenu:Test-with-index-for-open-page
Draft

Dynamic template connection with index for open page#2508
kjellMenu wants to merge 1 commit into
frangoteam:masterfrom
kjellMenu:Test-with-index-for-open-page

Conversation

@kjellMenu

Copy link
Copy Markdown

📌 Description

Please describe the changes introduced by this Pull Request.

  • What problem does this solve?
    It addresses the scalability issue when working with User Defined Types (UDTs) and indexed tags (e.g., UDT Veld.Motor[0], UDT Veld.Motor[1]) from a single (OPC UA) connection. Currently, FUXA requires manual placeholder coupling or creating separate target devices for every single instance, which becomes inefficient in large-scale environments. This solution introduces a proof of concept to dynamically bind structured tag names to a single Template screen upon page navigation.

    *This Draft PR was created in response to the discussion thread Best practices for scalable UDTs and Template Screens with OPC UA? #2476

  • What was changed?
    The frontend runtime component (client/src/app/fuxa-view/fuxa-view.component.ts) was modified to intercept and resolve structured tag paths dynamically when a page loads.

    1. A new function applyIndexedTagMapping() was added to strip a temporary @ validation token, read the target index, and resolve the string name.
    2. It searches FUXA's internal tag configuration by name/address to map the temporary template binding directly to the concrete internal FUXA Tag ID.
    3. Currently, the code reads a global internal server tag called Index during the loadPage() command to trigger the resolution.

    ⚠️ Note: This code is an experimental prototype implemented to evaluate architectural feasibility for my Master's thesis scalability testing. Because it is meant strictly as a functional proof of concept, it lacks comprehensive error handling, is not optimized for production, and currently only triggers via the "open page" command.

  • Why is this needed?
    This functionality eliminates the need to manually assign every single tag to a template screen. When working with a single PLC tag connection, it allows you to dynamically handle hundreds of identical template screens (like motors or valves) via text-based mapping, significantly reducing engineering configuration overhead and improving project scalability.

🧪 Type of Change

Please mark the relevant option:

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Other

🚫 Build Artifacts Check

Please confirm:

  • I did NOT commit /client/dist
  • I did NOT commit generated Angular build output
  • Only source files are included

@kjellMenu
kjellMenu marked this pull request as ready for review August 10, 2026 13:13
@kjellMenu
kjellMenu marked this pull request as draft August 10, 2026 13:13
@kjellMenu kjellMenu changed the title Add files via upload Dynamic template connection with index for open page Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant