NEXT HMIDocs
Widgets & styling / Alarms & recipes

Alarms & recipes

Two features that turn a dashboard into an operations tool: condition-based alarms with acknowledgement, and recipes — named parameter sets you push to and pull from live variables.

Define an alarm

  1. Open the Alarms area — Add an alarm (organise them in groups if you like).
  2. Point it at a variable — Bind the alarm's source value to the tag it watches.
  3. Choose a trigger typeBoolean — fires on true or false. Value Range — fires outside a Min / Max threshold.
  4. Set severity & presentation — Pick Error, Warning or Info, write the operator message, and optionally give a popup image (a filename in assets/images/).

Surface them with the Alarm List and Alarm History widgets, and show a live count anywhere with the $alarmCount source (filter by all / unacked / error / warning / info).

Build a recipe

  1. Create a dataset type — In the Recipes area, add a dataset type — the shape of one recipe (e.g. "Product profile").
  2. Add parameters — For each value in the recipe, click + Add and give it a label and a binding to the variable it maps to; the data type follows from the tag.
  3. Save datasets — Store named datasets under the type — one per product, grade or batch.

The two runtime operations are download — writing a dataset's values to their variables, loading the recipe into the machine — and upload, capturing current live values back into a dataset.

Put a recipe screen in front of the operator

There is no built-in recipe widget: the selection UI is yours to design, because what a recipe screen should look like varies too much between plants. Build it as a custom widget, which is a short job with the pieces the SDK hands you:

  • Bind a record-list field to the $recipeList source for the grid of saved datasets.
  • Read state with $recipeLoaded recipe name (activeName), Is loaded (loaded), or Parameters changed (parametersChanged, true when live values have drifted from the loaded set).
  • Call recipeDownload(datasetId) and recipeUpload(datasetId) from your buttons, and read the configuration with useRecipeConfig / useRecipeState.

The same two operations are also available over REST at POST /api/recipes/datasets/{id}/download and /upload, which is the route to take from an external MES or scheduler.