Screen Editor
Drag-and-drop visual screen editor (WinCC-like industrial HMI style). It has Design and Run modes.
| Canvas | World-space SVG + screen-space overlay; zoom/pan, alignment guides, distribute evenly, Undo/Redo. |
| Snap / Grid | Grid and object snapping; free movement while Ctrl is held. |
| Multi-select | Move / resize / rotate (group). |
| Screens | Sub-screens (top tab strip), export/import. |
Mouse & keyboard
| Ctrl + wheel | Zoom in/out around the cursor |
| Space / Alt + drag | Pan the canvas |
| Ctrl (while dragging) | Temporary free movement (snap off) |
| Ctrl+Z / Ctrl+Y | Undo / redo |
| "Fit" / "100%" | Center the page in the visible area + fit |
Selection inside a drawing (SVG) — Illustrator flow
| Double-click (on a drawing) | Enters the drawing; the topmost group under the cursor is selected. |
| Single click | Selects the object at that level (orange frame + name label). |
| Double-click (on a group) | Enters the group one level deeper; a breadcrumb bar appears on top (e.g. normal-hat › baglac). |
| Click outside | Goes up level by level until the clicked object is visible and selects it. |
| Esc | Up one level; if already at the top, leaves the selection. |
| Right-click (on a part) | Part menu: add animation, bring to front/send to back, color, size/position, exit to parent group. |
Widgets
Built-in widgets (with variants):
| Basic | Label, rectangle, indicator, gauge, chart, trend-log, lamp, button, switch, input, setting field. |
| Industrial | Tank, 3D Tank, Pump, Valve, Pipe (straight / round 3D / elbow ┌┐└┘). |
| Map & camera | Map/Station (tile + station pin, live color/nav/popup) and Camera (live IP camera video; see IP camera). |
| Connection | Pipe Link (connects two objects with an orthogonal, corner-fixed pipe). |
Elbow pipe: the corner stays fixed and the arms extend with the box — route paths without distortion.
SVG Objects (inline)
Imported/library SVGs are drawn as inline vectors (not raster): they stay sharp at every zoom/rotation. For flawless behavior the SVG should:
- contain a
viewBox; have no fixedwidth/height. - give parts that will be linked to animation an
id/class(WinCC "SVG dynamization" — e.g. fillid="fill", needleid="needle"). - contain no embedded raster (PNG); Illustrator/Inkscape "Optimized/Plain SVG".
The format standard is SVG (WinCC Unified also uses native SVG).
Animation & Tag Binding
Each widget is bound to a tag; animation is applied according to the live value. Multiple (conditional) animations can be added to one widget.
| Color | Fill/line color according to a value threshold (e.g. >8 red). |
| Visibility | Show/hide according to the value (e.g. fault lamp). |
| Level | Tank fill height (min–max scaled). |
| Flow | Pipe flow animation — flows while value ≠ 0. |
| Rotation | Rotate the pump/motor rotor (while running). |
| Text / value | Show the numeric value with unit + decimals. |
Animation list (⚡)
The ⚡ button on the toolbar lists all animations on the screen in one panel: user rules, simple widget animations and template bindings ("template" badge — the water level/flow/status color bindings of the Koru1000 base layer). Clicking a row centers the object on the canvas and makes it glow; hovering highlights the target part; user rules can be deleted from the row.
Preview (▶): plays all rules unconditionally in design mode — you see the animations without switching to Run (it does not change the saved screen).
Macro — your own HTML object + system SDK
A Macro is your own HTML/CSS/JS object that you place on the screen: use it where ready-made widgets are not enough (a plant-specific table, a custom indicator, a small calculation tool, a system dashboard). It is added from the palette with Macro and edited in the properties panel on the right.
It runs in a sandbox (sandboxed iframe): it cannot access the application's page, and its network is closed (CDN scripts, remote fonts/images are not loaded — embed everything). It reaches data through two doors: data-mh-* (tag values) and MH.query (system data).
1) Value binding — without writing JS
The element that will show the value carries its binding itself, and the engine fills it in:
<b data-mh-bind="Anlık güç" data-mh-tag="Kanal1.Pompa1.Guc" data-mh-unit="kW" data-mh-dec="1">--</b>
data-mh-kind | value (default) · state (on/off text) · level (fill height) · color (background) |
data-mh-unit / -dec | Unit and decimal places |
data-mh-on / -off / -threshold | Text/color and threshold for state and color |
data-mh-min / -max | Scale for level |
data-mh-bind | Name shown in the panel — you change the tag from here in the Bound elements list |
2) System data — MH.query / MH.poll
The alarm list, event and audit log, system resources, connected OPC UA clients, device status, a device's read/write log… all can be read from a macro. The macro does not go out to the network: the application asks the question, with your own session — so a macro cannot see what you cannot see. Every query needs the permission of the user who opens the screen (alarm queries Alarms: View, audit Audit log, subsystems Server settings, agents Data Bridge, data logging Data Logs: View; see Permissions page by page). These macros do not need tags.
alarms · alarmDefs · alarmHistory | Active alarms, definitions, history |
events · audit | System event log · who did what (audit) |
metrics · status · subsystems · services | CPU/RAM/disk, tag and OPC load, service statuses |
devices · diagnostics | Device communication · a device's read/write traffic |
opcuaClients | Connected OPC UA clients + subscription/monitored tag count |
tags | Tag search: current value + quality |
agents · loggerStatus · loggerGroups · advancedTags · license | Data bridge agents, data logging, virtual tags, license |
MH.poll('alarms', {}, 5000, function(list){
govde.innerHTML = list.map(function(a){
return '<tr><td>' + MH.esc(a.name) + '</td><td>' + MH.fmt(a.value,1) + '</td>'
+ '<td>' + (a.acked ? 'onaylı' : 'BEKLİYOR') + '</td></tr>';
}).join('');
});
MH.poll repeats the query periodically (the first call is immediate; it does not query while the macro is not visible). Helpers: MH.fmt, MH.saat, MH.tarih and MH.esc (escape system text before putting it into HTML). Writing has a single path: MH.write(tag, değer) — it goes through the application's permission/confirmation and audit path.
3) Element mode — edit the parts inside one by one
From outside, a macro is a single box; to edit the card/title/value inside it, enter element mode: double-click the macro (the same hand habit as part mode in symbols) or use Select elements in the panel. A blue strip appears on top while in the mode.
| Hover | The part under the mouse is framed and its name is shown (⛓ mark on bound ones). |
| Select | The clicked part opens in the panel on the right. The breadcrumb bar (card › row › b) is clickable: click a parent name to select the container. |
| Data | Give the selected part a tag; display (value/state/fill/color), unit and decimals are set here. No JS needed. |
| Appearance | Text and background color, font size, bold, alignment, padding, width share in the row. |
| Layout | Move up/down, copy, delete; add a ready block inside or below. |
| Exit | Esc. While in the mode, clicks go into the macro, so the object is not moved — it returns to normal when you exit. |
Editing on the canvas
A small toolbar appears above the part you select — edit there without going to the panel:
| A | Edit the text in place (double-clicking the part does the same; Enter saves, Esc cancels) |
| B · A− / A+ | Bold; decrease / increase text size |
| ^ · v · = · x | Move up/down, copy, delete |
| tag | Jumps to the tag field in the right panel |
Layout — the macro recognizes its box
A macro box has a fixed size; if the content grows, the parts at the bottom would become invisible. Choose the Layout mode in the panel:
| Fit to box (default for new macros) | The content is measured and scaled to fit the box exactly — never clipped. Same behavior as other SCADA objects; it does not break when the screen is opened with Fit either. |
| Flow | Classic behavior: content flows, and is clipped if it overflows the box (older macros stay in this mode). |
| Fill vertically | Root parts share the box height equally — for card/row layouts. |
| Box follows content | The box grows with the content; if needed the screen page is also extended (the object does not get stuck below the page and vanish). |
Also, a newly added block is scrolled into view and glows briefly; in "Flow" mode, if the content overflows, a "Content overflows the box — fit the box" button appears in the panel.
Blocks (Row, Column, Card, Value, Status badge, Title, Text, Table) let you build a macro from parts: they are added inside/below the selected part or at the end from the panel, and their styles come in automatically once.
4) Code editor
| Highlighting | HTML / CSS / JS separately, with line numbers |
| Expand (⤢) | Opens the same editor full screen |
| Autocomplete | MH.query(' → data list · assign the result to a variable and type . → that type's fields · data-mh-tag=" → real tag search · data-mh- → attributes. Also opens with Ctrl+Space. |
| SDK and examples | Parameters, returned fields and a working example for each data type; Add to JS inserts it straight into the code |
| Templates | Value: KPI card, value list, status badge, fill bar — System: alarm list, event log, system resources, OPC UA clients, device status, read/write log |
var(--mh-primary), --mh-card, --mh-border, --mh-success, --mh-warning, --mh-danger follow the theme; MH.theme() returns night/day.Run Mode (Runtime)
Run mode is the clean operator view: the top bars are hidden, the canvas is full screen, and the controls are in a floating panel at the top right.
| Fit | Fits the entire designed screen into the viewport and centers it (aspect ratio preserved). Recommended. |
| Stretch | Stretches the screen to completely fill the viewport (aspect ratio not preserved). |
| 1:1 | Actual size; navigate with wheel/pan. |
Widget click actions: switch screen, faceplate (opens a designed screen live in a floating window). Bottom tabs: Alarms, Chart (history of logged tags).
Screen status indicators and colour rules
In the SCADA tree on the left you can put small status indicators (icons) next to the name of each screen: is there communication, is the pump running, is there an alarm. You see the state without opening the screen. You set the colour of the icon with a rule: "if the tag value is this, make the colour that".
Adding an indicator: step by step
- Press the pencil button in the screen's row in the tree (or right-click the row): the Screen Properties window opens.
- In the Status Indicators (sidebar) section press Add Indicator.
- Select the icon from the box on the left; type the tag path into the box next to it or select the tag with the magnifier button.
- In the Colour rules box below it you can give the indicator a name if you wish (shown when you hover over it: "Pump", "Communication").
- Press Add rule and fill in the rule: Value [equals / does not equal / is greater than / is greater than or equal to / is less than / is less than or equal to / is between] [number] then colour [colour box] and, if you wish, a state name (e.g. Running). When "is between" is selected a second number box opens (the ends are included).
- Add as many rules as needed. The Preset: running / stopped and Preset: normal / alarm buttons write two frequently used rule sets with one click; you can change the colours and names afterwards.
- Close the window with Save. The icon appears next to the screen name in the tree and is coloured live.
| Order of the rules | Rules are tried top to bottom; the colour of the first rule that matches is used. You change the order with the up arrow in the rule row. Example: first "equals 2 → red (Fault)", then "is greater than 0 → green (Running)"; when the value is 2 the first rule wins. |
| If no rule matches | The icon stays pale grey. |
| If there are no rules | The old behaviour: green if the value is greater than 0.5, red otherwise. |
| If the value cannot be read | The icon stays pale grey and the tooltip says "value not available" (the tag has never been read or there is no communication). |
| Tooltip | When you hover over the icon, the name of the indicator, the state name of the matching rule and the current value are shown. |
| Long screen name | If the name does not fit in the row it is shortened with an ellipsis; the icons and the sub-screen count stay visible. The full name is in the tooltip. |
Kuyu 1.Kuyu 1.Pompa1StartStopDurumu, Preset: running / stopped. Second indicator: icon warning, tag Kuyu 1.Kuyu 1.Al_MotorTermik, Preset: normal / alarm.IP camera: Cameras settings and the Camera component
The live video of IP cameras (RTSP) is watched on SCADA screens with the Camera component. Browsers cannot play RTSP, so a small video engine (go2rtc, MIT licensed) runs on the server: it connects to the camera and converts the video into a format the browser can play. Video flows through MergenHub's own address, past its session and permission checks; the camera's address and password never reach the browser.
Setup: step by step
| 1 | Settings › Web & Connectivity › Cameras. On the Video engine card the status must be Running and Camera video on must be ticked. |
| 2 | Add camera: Name, Main stream address (e.g. rtsp://192.168.1.64:554/Streaming/Channels/101), optional Sub stream address (low resolution, e.g. channel 102), the camera's Username and Password. OK, then Save at the bottom of the page. |
| 3 | Try the video with Preview on the row (save first). Adding and deleting apply in a few seconds without restarting the service. |
| 4 | In the screen designer put the palette › Map & camera › Camera component on the screen and pick the camera in the property panel. A placeholder shows in design; it plays live in Run. |
Video engine
| Status | Running: streams are ready. Starting: wait a few seconds. Stopped: camera video is off or no camera is on. Not installed: go2rtc\go2rtc.exe is missing in the installation folder (the installer puts it there; repair the installation). Error: the message next to it says why. |
| Camera video on | When off, the engine does not run; screens say "Camera video is turned off". |
| WebRTC (low latency) | Off by default. When off, video flows through the web interface's own port (MSE): no extra port or firewall rule is needed, and it works behind HTTPS and reverse proxies. When on, the browser tries WebRTC first and falls back to MSE if it cannot connect within 6 s; the WebRTC port (default 8555, TCP and UDP) must be open in the firewall. |
| Advanced | The engine and the optional ffmpeg.exe run only from the go2rtc\ folder of the installation (e.g. C:\Program Files\MergenHub\go2rtc\); there is no path field in the settings. For H.265 cameras and the MJPEG fallback (old browsers that cannot play MSE) put ffmpeg.exe in that folder. |
Camera definition
| Address | rtsp, rtsps, rtspx and http(s) (MJPEG cameras) are accepted. Hikvision: rtsp://IP:554/Streaming/Channels/101; Dahua: rtsp://IP:554/cam/realmonitor?channel=1&subtype=0. A user:password@ written into the address is moved to the separate fields when saved. |
| Password | Stored encrypted on disk, shown masked in the settings, never sent to the browser. If the password is left masked and the camera's address (server, port) is changed, saving is refused: the stored password is not sent to the new address; enter it again. Use a view-only account on the camera. |
| Camera on | A camera that is off stays in the list; screens showing it say "Camera is turned off". |
| Delete | Screens showing this camera say "Camera not found". |
Camera component
| Camera | One of the cameras in Settings › Cameras. The Manage cameras button (for a user with the Camera settings action) opens the settings page. |
| Stream | Main or Sub (low resolution); shown only for a camera with a sub stream. In small boxes the sub stream saves bandwidth and server load. |
| Fit | Fit (whole image), Fill (crops), Stretch. |
| Muted · Snapshot button · Show name | The snapshot button downloads the current frame as PNG; the full-screen button enlarges the box. |
If the connection drops the box says "No connection" and reconnects by itself with growing waits (2 – 30 s); the stream closes while the browser tab is hidden and reopens when it is back.
settings.cameras) action. Watching: SCADA: View + the "Watch cameras" (camera.view) action; when it is off the screen opens, the box says "You have no permission to watch cameras" and no video leaves the server. A user whose screens are limited by area / screen access (resource ACL) lists and watches only the cameras placed on screens they can see.ffmpeg.exe in the go2rtc\ folder.
MergenHub