Files
atom-hmi-ui-chatgpt/SITE-STUDY.md
T

137 lines
13 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Atom HMI site study
Inspected through the signed-in browser on October 20, 2026. Purpose: prepare to build another Atom HMI installation using existing page patterns and copy/paste. No pages, registers, alarms, device connections, or element definitions were saved or changed. The element Copy control was exercised once; no paste was performed.
## Coverage
| Site | Pages listed | Page trees inspected | Main use |
| --- | ---: | ---: | --- |
| Sweet Grass (`site_sweetgrass`) | 51 | 49 | Grain processing, receiving, cleaning, crimping, groating, shipping, dryer, power |
| KAV Main - Mill (`site_kav`) | 42 | 42 | Mill 2, tempering, receiving, inventory; also legacy water templates |
| KAV East - Mill (`site_kav_east_mill`) | 4 | 4 | Bin monitoring and equipment diagram |
| KAV Main - Water (`site_kav_water`) | 29 | 29 | Cistern, wells, county supply, outlet pumps, truck water |
| KAV East - Water (`site_kav_east_water`) | 38 | 38 | Multiple cisterns, transfers, distribution circuits, wells, temperature |
| Total | 164 | 162 | |
Coverage means opening each page in Configure Pages and inspecting its rendered preview and element names/types. It does not mean every element's settings were opened or every runtime control tested. Sweetgrass `Motors` and `old Motors` timed out in their large editors and remain incomplete. Representative configuration dialogs were inspected for rows, status indicators, gauges, trends, numeric data, command buttons, viewports, and images. All dialogs were closed without saving. No source-code or backend API access was established.
The rendered Sweetgrass Motors page was successfully inspected separately after the builder timeout. It repeats motor-ID/name cards with Auto/Manual, Start/Stop, time since start, and optional frequency adjustment; the South Elevator Valve has Rev/Stop/Fwd and raw position. Its element tree and exact write bindings remain unverified.
The complete page-name inventory is in `PAGE-INVENTORY.md`.
## How the application is assembled
The same Atom HMI application hosts separate sites under `/site_<id>/`. The four KAV sites have custom Select Site pages with links between Main Mill, East Mill, Main Water, and East Water. This is separate from the administrator's global Select Site screen.
Configure Pages has two areas:
- **Data:** page title, URL slug, rendered preview, and a nested element tree.
- **Navigation:** separate menu entries with title, URL, and default flag. Creating a page does not establish that it automatically appears in navigation.
Page slugs appear in routes such as `page_mill2`, `page_receiving`, and `page_sys11`. Titles and slugs can differ: KAV Receiving Settings uses `rec_settings`; its Receiving Trend uses `rec_trend`. Links may be relative, absolute to a site, or include an anchor such as `page_motors#M09`. Preserve case and verify each target when copying.
The builder requires cancelling or saving the currently selected page before selecting another, even if it was only opened for inspection. Otherwise it reports “Please cancel or save current page” and keeps the old tree. Always verify the loaded Title and URL before acting. Long surveys and very large pages caused browser timeouts; reloading the clean configuration page recovered navigation.
## Layout and reusable components
Pages are nested trees. Rows and Divs contain labels, indicators, readouts, buttons, gauges, links, charts, or other containers. The Overview page is a good small example: a Main Selection row contains equipment cards, and each card includes a title, separator, status indicator, and page link with a settings icon.
The UI exposes element copy, paste, reorder, add, edit, and delete controls; there are also page-level Add Element and Paste Element controls. The copy icon was confirmed as `fa-copy`, and paste as `fa-paste`. Copying the top row of KAV East Water Wells left the browser text clipboard empty. **Inference:** the builder uses an application-managed clipboard or another mechanism. Its serialization, child-copy behavior, persistence across navigation, and cross-site compatibility have not been verified. Do not promise external JSON paste until a disposable-page test confirms it.
Styling uses Classes and Styles. Observed classes include `col-6`, `col-12`, `w-100`, `h-100`, `border`, `rounded`, `badge`, `badge-pill`, `bg-danger`, `bg-warning`, `bg-on`, `bg-off`, `btn-start`, and `btn-entry`. These resemble Bootstrap conventions plus application-specific classes. Reuse the parent container's spacing and widths instead of reconstructing each child independently.
### Equipment diagrams
KAV Mill 2 and Tempering combine a View Port diagram with trends and control cards. East Mill Bins is a simpler diagram template. Viewport children include static images, two/multiple/ten-state images, level indicators, static text, and advanced text.
The Main Viewport on KAV Mill 2 has minimum width `25rem`, aspect ratio `16/6`, a light-grey background, and a rounded border. An inspected T1 image has Left `5.75`, Top `5.5`, Width `11`, aspect ratio `auto`, and `/images/static/bin.png` as its off image. The coordinate units were not established. Image editors also expose a value expression, rotation, horizontal/vertical translation, horizontal flip, transition time, and off/on image URLs. Do not infer that a picture by itself establishes the correct level or motor binding.
### Live values, states, and commands
Display expressions support register references, literal values, or equations. Observed expression forms include:
```text
|{register:main:dryer_g_m77_01_out_status}|
|{water:calc_TotalSysIn}|
```
Preserve the source component's supported syntax; these examples are observed forms, not a complete expression-language specification.
The Sweetgrass Overview six-state indicator references `main:dryer_g_m77_01_out_status` and defines texts/classes for Fault, Stopping, Starting, Running, an extra state, and Off/Stopped. State styling and register values must be mapped together.
A gauge exposes value, min, max, units, label, decimal places, update interval, classes, and styles. An inspected KAV East Water Flow gauge uses `|{water:calc_TotalSysIn}|`, limits 0–50, units `gpm`, one decimal, and interval `1000`. Units for that interval were not labelled in the dialog.
**Read and write bindings are distinct.** Sweetgrass Center Receiving's Start Button is a Button Set Value configured to write `1` to `main:recvSeqStart`. It was inspected through the element editor; the operational Start button was not clicked.
Numerical Data can also be editable. An inspected Ratio component displays `|{register:main:dryer_g_centRecBin21Ratio}|` but writes to `main:dryer_g_centRecBin21RatioSel`. Its write expression is `value`, the user-entered variable. It has editable and limits checkboxes, min/max fields, adjustment buttons/step size, suffix, Numeral.js number format, and separate main/inner/label/data classes and styles. The displayed limits 0 and 100 do not prove enforcement: the Limits checkbox was unchecked.
### Trends and history
The Trend editor exposes JSON fields for Series, Scales, and Buttons, plus a default button index, navigator register/color/duration, horizontal grid lines, classes, and styles. Series contain `name`, `register`, `scale`, and `color`. Scales define axes and bounds. Range buttons contain count/type/text and time ranges. Chart bindings use register strings without expression wrappers, for example `water:well21GPM`.
The inspected East Water Wells trend includes a series named “Well 29” bound to `water:g_well30_flow_out_eu`. This looks like a copied label that needs checking; no correction was made. When copying a chart, check every series name, register, scale, navigator, range button, and default index.
## Template choices for another installation
| New requirement | Best starting examples | What to adapt |
| --- | --- | --- |
| Small home/status dashboard | Sweetgrass Overview | Equipment names, state mapping, page links, widths |
| Mill process diagram + controls | KAV Main Mill 2 / Tempering | Images, geometry, bins, motor IDs, series, command targets |
| Simple bin diagram | KAV East Mill Bins | Bin images, levels, labels, gauges and history |
| Grain inventory | KAV Main Bin Inventory | Grain dropdown values, capacity/quantity expressions, totals |
| Receiving source/destination selection | Sweetgrass Center/South Receiving; KAV Receiving | Routing choices, distributor states, sequence and motor references |
| Sequence setup | Sweetgrass Receiving/Crimping/Groater Sequence | Motor IDs, delay and state registers, links |
| Standalone well or VFD pump | KAV Main Water Well 1 New / Well 10 New / Out Pump 1 | Run/mode/speed/flow/level, commands, totals, timers, iframe targets |
| Multiple cisterns and transfers | KAV East Water Cisterns + Cistern Transfer pages | Tank levels, transfer paths, run conditions, settings |
| Distribution circuits | KAV East Water Sys pages + Outflow | Circuit identity, pressure/flow, motor and command bindings |
| Power monitoring | Sweetgrass Power Main / Power Dryer | Meter registers, units, axes and tables |
| Device diagnostics | Device Status across sites | Device prefix, CPU/disk/memory/uptime sources and action buttons |
Treat pages named old, test, New, or Spare as candidates requiring comparison, not automatically current templates. KAV Main has old water pages even though KAV Main Water is a separate live site. Do not select a source on title alone.
## Data and site setup
The observed Sweetgrass chain is:
```text
Page element → device-qualified register → selected slave → PLC tag address
```
Manage Devices lists `global` (Global) and `main` (Main PC). Main PC's slaves are Codesys PLC, Groater PLC, Main PLC, SG Dryer, Shipping PLC, and Terminal. The Main PC register table contains 20,055 definitions, including disabled entries. Presence in the table does not establish that a register is enabled, updating, or logged.
The inspected register `dryer_g_m77_01_out_status` belongs to SG Dryer and uses address JSON:
```json
{ "tag": "sg_dryer.g.m77_01.out_status" }
```
It is enabled, updates On Change with a one-second interval, and has logging disabled. Logging fields showed interval 60 seconds and duration 604800 seconds, but those values do not mean logging is active. A chart needs a deliberate history configuration, not just a display reference.
Registers and alarms each expose Edit and Import tabs. Import formats and submission behavior were not inspected or tested. Sweetgrass Main PC has 1,538 alarm definitions; the sampled list includes receiving-leg and debearder transmitter/current alarms. Alarm notification, trigger, role, and export menus exist, but their detailed configuration has not been audited. Existing PLC logic and interlocks were not inspected.
Create Site is a form with Site ID and Site Name plus Submit. It was opened only; no site was created. The form alone does not establish what defaults, devices, roles, or templates a new site receives.
Manage Elements lists 46 component definitions, with five marked “Dont Use.” Opening an element definition editor shows an “Are you sure?” step; that was declined. These definitions should not be changed to accomplish ordinary page assembly.
## Copy/paste build procedure
1. Define the new site's equipment list, page map, controller/device IDs, register map, and required read versus write behavior.
2. Pick the closest current source template from the table above. Record its site, page, and parent element name.
3. In a disposable destination page, verify that copying a parent includes the expected children and that paste works across the intended site boundary. Inspect the draft and cancel after this first test.
4. Build one representative unit first. Update title/slug, visible labels, element names, anchors/links, images/coordinates, read expressions, write registers/values, state mappings, numeric formats/units/limits, charts, and timers.
5. Check every child for source-site references. A renamed card can still read or write the original equipment.
6. Verify the draft layout and loaded page identity. Save only the intended destination page, then reopen it to verify persistence. Configure navigation separately.
7. Confirm live displays against known register values. Validate history separately. Operational command testing is a separate, explicitly authorized activity with the installation owner; a visual preview is not a control-system test.
8. Once the representative unit is correct, duplicate that adapted unit for the remaining equipment and repeat the register/link checks.
## Remaining evidence needed
- Sweetgrass Motors and old Motors trees, which timed out.
- Actual application clipboard format, nested copy semantics, and cross-site paste behavior.
- A controlled new-page save/reopen test and navigation/default-page test.
- Intended new installation's equipment, controller tags, units, ranges, and command mapping.
- Required alarm/notification rules, user roles, history retention, and exports.
- Whether a supported Atom HMI API or import/export interface can replace browser editing for a standalone agent. No such interface was verified in this study.
This survey establishes a browser editing approach and a template map. It does not yet establish a fully tested autonomous editing agent.