Anode Meter Configuration Help
Help for the configuration editor module that creates, loads, validates, archives,
recovers, and exports SmelterConfiguration.xml files.
Overview
The Config module edits the plant layout and measurement XML used by AnodeMeter. The TinyCLR meter code remains the canonical definition of accepted configuration behaviour; this editor follows that behaviour where it is known and keeps validation intentionally compatible with older accepted files.
- Load XML by choosing or dropping a file into the upload target.
- Create a starter configuration for a new site.
- Paste XML copied from a SQL Server database cell.
- Load from or save to a plant-local AnodeMeterService gateway.
- Save immutable archive versions and autosaved recovery drafts when signed in.
- Export the generated XML for plant import, review, or database update scripts.
Workflows
File upload and export
- Use Choose File or drop a
.xmlfile on the upload target. - Edit the configuration in the tabs.
- Run Validate before distributing the file.
- Use Export XML to download the current generated XML.
New configuration
- Use New configuration to open the starter form.
- Set the location, shift timing, default line, starter line, room, section, pots, and anodes per pot.
- The generated starter includes explicit Measurement and Anodebar defaults that can be edited later.
Database cell transfer
- Open XML & Validation.
- Paste XML copied from a SQL Server cell into Database Cell Transfer.
- Use Load pasted XML to import it.
- Use Copy generated XML to copy the edited result back for SSMS or an update script.
Editing Tabs
- File Workflow
- Shows the available import/export modes and the current file name and validation summary.
- Location
- Sets the site tag, shift length, first shift start time, and default line name.
- Lines
- Adds or removes potlines, sets anodes per pot and metering direction, and controls optional Anodebar data.
- Rooms & Sections
- Adds rooms and metering sections, assigns anode order rules, previews traversal, edits pot lists or sequential ranges.
- Pots — comma-separated pot identifiers. The meter stores all pot names in a single hashtable, so pot names must be unique across all lines. Duplicates will cause one entry to silently overwrite the other.
- Start / End — edit the sequential range to auto-fill the pot list. Numbers are zero-padded to match the width of the start or end value (e.g.
1–260produces001,002,…260). - Prefix — adds the line name as a prefix to every pot in the section, with consistent zero-padding. For example, if the line is named
Aand pots are1,2,3, clicking Prefix producesA001,A002,A003. This ensures unique pot names across lines. - Duplicate check — as you edit, the portal warns immediately if any pot name appears in more than one line. The full Validate run reports duplicates as errors with guidance on using line prefixes.
- Measurement
- Controls optional rod/clamp scaling, display format, units, default use mode, and ad-hoc type attributes.
- XML & Validation
- Shows validation issues, generated XML, database-cell transfer, gateway controls, and the archive panel.
- Archive
- Lists previous saved versions available to the signed-in user and saves the current XML as a new immutable archive entry.
Archive and Drafts
Signed-in users can save validated or in-progress configurations to the SQL-backed archive. Archive records are immutable and keep the user, site code, source, file name, notes, validation summary, and XML at the time of save.
The editor also autosaves the current working XML as a recoverable draft after edits. If the browser connection drops, the module attempts to restore that user's draft on the next visit. Save draft now forces an immediate draft save, and Discard draft removes the stored recovery draft for the signed-in account.
C-Born administrators can inspect active drafts from Admin > Config drafts when helping a user recover or troubleshoot work.
Site Gateway
AnodeMeterService uses port 1957 for the meter TCP connection and port 1958 for the optional browser HTTP gateway. When the gateway is enabled, the Config module talks to the configured gateway URL for narrow status, configuration load, and configuration save endpoints.
- Test connection checks service, database, read, and write availability via
GET /api/anodemeter/status. - Load from gateway imports the current XML returned by the gateway.
- Save to gateway validates the current XML and asks for confirmation before posting it to the gateway.
The gateway URL is shared across portal modules through browser local storage. Set it once on the Config or Update Packages page and it applies to all modules that use the gateway.
Validation
Validation combines source-aware business checks with the embedded XML schema. The schema stays permissive where older meter files are accepted, while business validation reports the issues most likely to affect meter operation.
- Location, line, room, and metering section structure must be complete.
- Numeric fields are checked for source-compatible values where known.
- Pot identifiers are treated as plant strings, not numeric-only values.
- Warnings identify risky or incomplete optional data without blocking export.
- Gateway save is blocked when validation contains errors.
Anode Order Patterns
Section previews show the traversal rule for anodes in each pot. Anode numbers start at 1 in the top right corner and run anticlockwise. The expanded preview can be opened from the section row.
Compatibility Notes
- Older Clock and TimeZone elements may load, but current meters run in local time and the editor omits those elements on export.
- Measurement and per-line Anodebar elements are optional for older files.
- Missing metering direction defaults to clockwise in AnodeMeter.
- Missing or blank anode order rule defaults to CPattern in AnodeMeter.
- ClampScaleFactor, ClampUnits, TypesEnabled, DefaultUseMode, and AdhocTypes are preserved where present.
- The AnodeMeter source and meter firmware remain the final authority for accepted XML semantics.