Cause:
- Live diagnostics required logging from multiple applications without blocking TBF.
- Shared nlog.config files caused configuration conflicts.
- The original viewer lacked configurable colors and practical log controls.
- Inconsistent diagnostic deployment caused log transfer failures and locked shared DLLs during builds.
Solution:
1. Added universal diagnostic transport
- Added AppDiagnostic.Logging with an NLog target and named-pipe communication.
- Added background buffering and automatic reconnection.
- Registered the diagnostic connector programmatically.
2. Separated diagnostic window lifecycle
- Run AppDiagnostic as an independent process.
- Activate the existing window on repeated launches.
- Keep TBF running when the diagnostic window closes.
3. Corrected diagnostic deployment
- Copy the complete diagnostic output into a dedicated AppDiagnostic subdirectory during build.
- Overwrite existing deployment files to prevent inconsistent versions.
- Validate and launch the executable from that subdirectory with an explicit working directory.
4. Improved the log viewer
- Added configurable substring colors with a palette and live preview.
- Added text, level and application filters.
- Added line wrapping, clipboard actions and log export.
- Added Pause/Resume, Refresh, Clear, auto-scroll and Always on top.
- Added connection and log counters.
- Persist color rules between sessions.
5. Removed legacy dependencies
- Replaced LiveLogCache with structured diagnostic storage.
- Removed AppDiagnostic dependencies on log4net and SharedComponents.
Validation:
- Confirmed successful log transfer when launching AppDiagnostic from TBF.
Cause:
- GenesisCommunication did not expose GCI preadjustment phases as selectable test activities.
- Meter size and temperature inputs required by preadjustment could not be configured.
- The configuration control incorrectly expected the iPerlCommunication configuration type.
- Preadjustment results were not propagated to TBF test and meter results.
Solution:
1. Added standalone preadjustment activities
- Added Initialization, Detect, Preparation, Amplitude Test, Temperature Calibration, Push Temperature, Offset Test and Completion.
- Each phase can be selected and executed independently.
2. Added preadjustment parameters
- Added configurable meter size and temperature.
- Added validation and supported meter-size selection.
3. Added batch preadjustment execution
- Resolves enabled Genesis register readers and their slots.
- Verifies that all readers use the same GCI Bridge instance.
- Dispatches the selected activity through the corresponding GCI Bridge API.
4. Added result processing
- Stores execution time and completion status.
- Updates test and meter results according to the GCI response.
5. Fixed the configuration control
- Corrected TestMethodCfgCtrl to accept the GenesisCommunication TestMethodCfg type.
6. Increased revision
- Updated revision to 3.9.3146.101.
Cause:
* A configuration control can reject an incompatible configuration and return null.
* ComponentsManagerDlg accessed the rejected configuration without validation, causing a NullReferenceException and closing TBF.
* The standard MessageBox was difficult to read and did not provide convenient access to technical details.
Solution:
1. Added configuration validation
* Validates the configuration returned by the component control.
* Logs the rejected control and configuration types.
* Cancels the add operation without terminating TBF.
2. Added a reusable error details dialog
* Displays a clear error summary and structured technical details.
* Allows the diagnostic text to be selected and copied.
* Added Copy and Close actions and registered the new form in TBF.csproj.
3. Increased revision
* Updated revision to 3.9.3145.109.
Cause:
- GciBridge Factory used an incorrect namespace substring offset when generating the component class name.
- The generated value was `geComponents.GciBridge` instead of `BridgeComponents.GciBridge`.
- The invalid class name could prevent correct component registration and lookup.
Solution:
1. Corrected class name generation
- Changed the namespace substring offset from 12 to 8.
- GciBridge Factory now returns the correct `BridgeComponents.GciBridge` class name.
2. Restored component identification
- GciBridge can now be registered and resolved using the expected TBF component class name.
3. Increased revision
- Updated revision to 3.9.3145.108.
Cause:
- GciBridge threw an exception when the configured UniDataStorageReader or UniDataStorageWriter was not available during component initialization.
- The exception prevented TBF from starting and made it impossible to correct the component configuration through the UI.
Solution:
1. Improved missing component handling
- Replaced fatal exceptions for missing storage components with warning logs.
- Allowed GciBridge and TBF to continue initialization.
2. Preserved existing behavior
- Available UniDataStorageReader and UniDataStorageWriter components are still linked as before.
- Existing GciBridge configurations remain compatible.
3. Increased revision
- Updated revision to 3.9.3145.107.
Cause:
- Repeating XML output always included every published meter test.
- The existing TestID/Prüfpunkt configuration was not used to filter generated XML test records.
- A configured TestID could be evaluated in an incorrect repeating test context.
Solution:
1. Added optional test filtering
- Non-empty TestID values define the tests included in repeating XML output.
- Multiple configured TestID values act as a whitelist.
2. Preserved existing behavior
- When no TestID is configured, all published tests are exported as before.
- Existing configurations remain compatible without migration.
3. Prevented cross-test evaluation
- Test-dependent items are evaluated only for their matching TestID.
- Values from one test are no longer reused in another test record.
4. Improved source formatting
- Reformatted ResultsWriter.cs for easier reading and searching.
5. Increased revision
- Updated revision to 3.9.3145.106.
Cause:
- Previous results opens the ResultsWriter configuration through GetControl(null).
- The component entity list is therefore unavailable.
- The DropDownList could not display the saved ParentName because it was not present in its Items collection.
Solution:
1. Restored the saved parent writer
- Adds the configured ParentName to the list when it is not already available.
- Selects the restored UniDataStorageWriter in parentComboBox.
2. Preserved standard configuration behavior
- All available UDSW components are still loaded when component entities are provided.
- Previous results can now display and use the previously configured parent writer.
3. Improved source formatting
- Removed inappropriate line wrapping from ResultsWriterCfgCtrl.cs.
4. Increased revision
- Updated revision to 3.9.3145.105.
Cause:
- ResultsWriter explicitly suppressed the existing TestID column.
- Users could not configure the test identifier for test-dependent result variables.
- In the German localization, the corresponding Prüfpunkt column was therefore hidden.
Solution:
1. Enabled TestID configuration
- Set SupressTestIDColumn to false.
- The TestID/Prüfpunkt column is now displayed after Merge.
2. Preserved existing configuration handling
- TestID values continue to use the existing WMeterRsltItemSpec serialization.
- No configuration format change was required.
3. Increased revision
- Updated revision to 3.9.3145.104.
Cause:
- Payload archive filenames required values from the generated XML payload.
- Date/time values needed filename-safe formatting.
- XML result values such as Passed and Failed needed configurable conversion to P and F.
Solution:
1. Added XML filename tokens
- Supports any unique non-repeating XML value using {Xml:/path}.
- Resolves filename values directly from the generated payload.
2. Added user-friendly token configuration
- Clicking inside a token opens the XML value chooser.
- Added Time format and Mask transformations.
3. Improved filename generation
- Validates XML paths and rejects ambiguous repeating values.
- Sanitizes resolved values for safe filesystem usage.
- Passes the per-meter payload context from ResultsWriter.
4. Integrated the new dialog
- Added PayloadFileNameXmlTokenDlg and its Designer file.
- Updated the TBF project configuration.
5. Increased revision
- Updated revision to 3.9.3145.103.
Cause:
- Previous Results used fixed column widths, making long procedure and purchase order values difficult to read.
- Result columns could not be resized interactively.
- Window resizing caused unnecessary UI redraws and visible lag.
- The existing result layout lacked clear column headers and visual separation.
Solution:
1. Added resizable result columns
- Added draggable column separators.
- Keeps column widths synchronized across all displayed result rows.
- Added optimized resize preview to reduce UI lag.
2. Improved responsive layout
- Enlarged the default Previous Results window.
- Keeps Purchase Order, OK, NOK and Actions aligned to the right.
- Uses Procedure as the flexible column when resizing the window.
3. Improved result presentation
- Added aligned column headers.
- Added modern column colors and styled action buttons.
- Reduced spacing between result rows and improved separators.
4. Increased revision
- Updated revision to 3.9.3145.103.
Cause:
- The customer XML format requires batch, DUT, group and test-level metadata.
- ResultsWriter did not provide variables for test position, repetition index, batch duration, DUT test duration or aggregated test statuses.
- Missing WaterMeterData could cause a NullReferenceException while evaluating WM Type.
Solution:
1. Added XML mapping variables
- Added TestPositionInBatch and TestRepetitionNr.
- Added BatchTime and TestsTotalTime.
- Added PassedFromAllTests and PassedFromRepeatedTests.
2. Added hierarchical result evaluation
- Evaluates the overall PANEL/DUT status from all tests.
- Evaluates GROUP status from repeated instances of the selected test.
3. Improved meter data handling
- Made WM Type evaluation null-safe when WaterMeterData is unavailable.
4. Increased revision
- Updated revision to 3.9.3145.102.
Cause:
- ResultsWriter evaluated selected test-dependent items without the actual TestID.
- This caused values such as Test passed(), timestamps, flow, pressure, temperature, conductivity and error data to be empty or incorrect.
Solution:
1. Fixed test-aware result evaluation
- Uses published regular meter test results.
- Passes mtr.Name() as TestID to item.Print(wm, testId).
2. Restored correct test result mapping
- Test-dependent values are now resolved from the correct TestRslt / MeterTestRslt.
3. Increased revision
- Updated revision to 3.9.3145.101.
Cause:
- ResultsWriter required a generic way to generate customer-specific XML result data from TBF measurement results.
- The customer reference XML contains example runtime values and repeated result structures, so it cannot be used directly as the generated output.
- TBF result variables must be explicitly mapped to destinations in the customer XML structure.
- The generated XML result data must support two output targets:
- direct creation of an XML file,
- delivery of the XML payload to a Microsoft SQL stored procedure.
- Preview generation must allow the XML structure and configured mappings to be verified without executing the production database write.
- Increase revision to 3.9.3145.100.
Solution:
1. Added XML reference analysis
- Creates a clean base XML structure.
- Extracts the repeating result prototype.
- Prevents sample runtime values from the customer reference XML from leaking into generated results.
2. Added configurable TBF-to-XML result mapping
- Allows explicit mapping of TBF result variables to customer XML destinations.
- Supports one-time and repeating XML destinations.
- Keeps the mapping independent of the semantic meaning of customer XML attribute names.
3. Added XML destination viewer and configurator
- Shows the current mapping.
- Highlights repeating destinations.
- Identifies already used one-time destinations.
4. Added runtime XML result generation
- Uses the configured TBF-to-XML mappings.
- Uses measurement procedure result data.
- Builds the output from the clean base XML and repeating XML prototype.
- Generates repeated result records according to the executed measurement procedure.
5. Added simulation-based Preview request
- Generates a complete XML payload using simulation values.
- Allows XML structure and mapping verification before production execution.
- Does not execute the production stored procedure.
6. Added direct XML file output support to UniDataStorageWriter
- Supports File / .xml as a physical output target.
- Creates the generated XML result file in the configured output directory.
7. Added Microsoft SQL stored-procedure XML output
- Supports Microsoft SQL / StoredProcedure as a physical output target.
- Passes the generated XML payload through the configured stored procedure parameter.
8. Added optional XML payload archiving
- Allows generated XML payloads to be stored in the configured Payload archive.
- Can be used together with the Microsoft SQL stored-procedure output.
9. Kept ResultsWriter independent of the physical output target
- ResultsWriter generates the result payload.
- UniDataStorageWriter decides how and where the payload is physically written.
- The same ResultsWriter XML generation mechanism is therefore used for both XML file and MSSQL outputs.
10. Increased revision
- Updated revision to 3.9.3145.100.
Cause:
1. Background: Restore/ensure testInProgress behavior before the DataEntry sequence and explicitly prevent to reset the pulse.
2. Increase revision to 3.9.3145
Solution:
1. Deleted .AddOperation(testInProgress) calling
2. Increased revision to 3.9.3145
Cause:
1. When the Cycle was stopped during the second or a later test and then resumed using the Start Test button, the resume confirmation was handled incorrectly. After selecting to continue, the sequence restarted from the first test instead of continuing from the interrupted test.
2. Increase revision to 3.9.3134.114
Solution:
1. Corrected the Cycle resume logic so that, after confirming continuation, the sequence resumes from the interrupted test instead of restarting from the first test.
2. Increased revision to 3.9.3134.114
Cause:
1. Background: there was a suspicion that the Bukoven board left RefPulses active across operations; this was investigated and ruled out. The pulse counter is reset by testInProgress when an operation is reused. During the third DataEntry window testInProgress had been temporarily disabled (SLM vs Karlsruhe difference), which allowed RefPulses to appear to persist.
2. Increase revision to 3.9.3134.113
Solution:
1. Restore/ensure testInProgress behavior during the DataEntry sequence and explicitly reset the pulse counter when starting a new operation.
2. Increased revision to 3.9.3134.113
Cause:
1. Background: there was a suspicion that the Bukoven board left RefPulses active across operations; this was investigated and ruled out. The pulse counter is reset by testInProgress when an operation is reused. During the third DataEntry window testInProgress had been temporarily disabled (SLM vs Karlsruhe difference), which allowed RefPulses to appear to persist.
2. Increase revision to 3.9.3134.112
Solution:
1. Restore/ensure testInProgress behavior during the DataEntry sequence and explicitly reset the pulse counter when starting a new operation.
2. Increased revision to 3.9.3134.112
Cause:
1. Unnecessary and mandatory user verification before the test, in addition, a bug appears: the "Approval by legalizer" window is displayed behind the main application window. The window was only needed for the Polish project.
2. `LANG_PL` constant in `TBF.csproj` was no longer needed.
3. Assembly version and file version in `AssemblyInfo.cs` needed to be incremented to `3.9.3134.111`.
Solution:
1. Made `altProcNameLabel` and `altProcNameTextBox` always visible and disabled specific UI controls in `ProcedureDlg.cs`.
2. Removed `LANG_PL` from `DefineConstants` in `TBF.csproj`.
3. Updated assembly version and file version in `AssemblyInfo.cs` to `3.9.3134.111`.
Cause:
1. Missing functionality to display remaining time during tests in `StandingStartMassCollectionSeq.cs` and `StandingStartMassCollectionAdvanceSeq.cs`.
2. Assembly version and file version required an update to reflect changes.
Solution:
1. Implemented remaining time display in `StandingStartMassCollectionSeq.cs` and `StandingStartMassCollectionAdvanceSeq.cs` using `Bridge.OnActivity` to show time in minutes and seconds or seconds only.
2. Updated assembly version and file version in `AssemblyInfo.cs` to `3.9.3134.110`.
Cause:
1. Updated `unit` constant in `TestStartEndForm` class within `TBF.Rig.DataEntry.StandardCamera` namespace from `Unit.m3` to `Unit.l`.
2. Updated `unit` constant in `TestStartEndForm` class within `TBF.Rig.DataEntry.StandartCameraPurchaseOrder` namespace from `Unit.m3` to `Unit.l`.
3. Incremented assembly version and file version in `AssemblyInfo.cs` to `3.9.3134.109`.
Solution:
1. Changed `unit` constant in `TestStartEndForm` class within `TBF.Rig.DataEntry.StandardCamera` namespace to `Unit.l`.
2. Changed `unit` constant in `TestStartEndForm` class within `TBF.Rig.DataEntry.StandartCameraPurchaseOrder` namespace to `Unit.l`.
3. Updated assembly version and file version in `AssemblyInfo.cs` to `3.9.3134.109`.
- generate available units using Units.IsQuantity(...)
- use Quantity.MultiFunctionalVariables to populate supported units
- centralize unit selection through Units.GetQuantity()
- Store the value as the default PumpPower for subsequent test instances in the cycle.
- Add logging when PumpPower is initialized from the pump.
- Add logging at test start including test name, repetition number,
last repetition flag, and PumpPower to improve diagnostics.
- Store the value as the default PumpPower for subsequent test instances in the cycle.
- Add logging when PumpPower is initialized from the pump.
- Add logging at test start including test name, repetition number,
last repetition flag, and PumpPower to improve diagnostics.
- When STOP is pressed during PerformSteps() in the BeforeTest transition,
Transition() returned immediately and skipped the common shutdown logic.
This caused FM pumps and valves to remain in their previous state.
- Perform the required safe shutdown (FM pump off and default valve setup)
before returning UiCmdStop or Error.
- Added Underload measurement state
- Detect underload responses from Mettler Toledo scales
- Automatically zero the scale after underload detection
- Restart mass measurement after successful zeroing
- Prevent zeroing response from being used as a valid measurement
- Preserve measurement stability by clearing buffered readings after underload