Skip to content

Trigger Nodes ​

Last updated

A trigger node starts a run. Trigger nodes have no input dots. A workflow must contain at least one trigger node, even if you only start it from a button — without one every run fails with No trigger node found in workflow.

A real event runs only the chain behind the trigger node that fired, so a workflow can hold several triggers driving different actions. Run Now, the Schedules page and a Run Workflow node have no single trigger to point at, so those still run every trigger's chain — keep to one trigger in any workflow you plan to run those ways (see How Workflows Run).

NodeStarts a run when
Tag ValueA tag updates and its value meets a condition
Tag ChangeA tag updates
Machine Online / Machine OfflineA device connects / disconnects
ScheduleAn interval, cron time or time of day comes round
StartupThe Scada.Ink service starts
User Login / User LogoutSomeone signs in / out
Network EventA web address becomes reachable or unreachable
Message ReceivedA script or workflow sends a message with this name, here or from a paired appliance
ManualNever by itself — marks a workflow meant for Run Now, buttons and scripts
Called by WorkflowNever by itself — marks a workflow meant to be called
ShutdownNever (see below)

Tag Value ​

FieldDefaultNotes
Device—The device the tag belongs to. Filled in when you pick the tag
Tag Path—Pick with the browse button. With no tag the trigger does nothing
Operator==, ≠, >, <, ≥, ≤
Threshold0A fixed number

The tag's value is converted to a number (true/false become 1/0). Values that are not numbers are ignored.

Warning: This trigger is level-based. It fires on every update of the tag while the condition holds, not once when it becomes true. For "when the oven goes over 250 °C, email once", trigger on a boolean alarm bit set by the PLC or a ladder rung, or use an alarm with a pipeline.

A tag "updates" when the driver reports a new value or a new quality. Changes smaller than the tag's deadband are not reported. A write to a local tag counts as an update even if the value is the same.

Tag Change ​

FieldDefault
Device—
Tag Path—

Fires on every update of the tag (same rules as above), including a quality change with the same value. Use {{value}} for the new value.

Machine Online / Machine Offline ​

FieldDefault
Device—

Fires when the device's connection status becomes connected or disconnected. A device that flaps fires on every flap.

Schedule ​

FieldShown whenDefaultNotes
TypealwaysIntervalInterval, Cron or Time of Day
Interval (ms)Interval60000Milliseconds between runs. Counting starts when the triggers are registered, and restarts on every Save and restart
Cron ExpressionCron* * * * *Five fields, local time. Built with the cron builder
Time (HH:MM)Time of Day08:0024-hour, the appliance's local time
  • Cron is checked once a minute, counted from when the workflow was saved or the server started, not on the minute boundary. Occasionally a minute can be skipped or matched twice.
  • Time of Day is checked every 30 s and fires once when the clock reads that minute.

Tip: For anything that must happen at a set time — shift change at 06:00, a nightly export — use the Schedules page instead of this node. It checks every 30 s, fires at most once per matching minute, and shows the last run on one screen.

Startup ​

No fields. Fires about 0.1 s after the Scada.Ink service starts, once, for every enabled workflow. Saving or enabling a workflow does not fire it — to try a Startup workflow, use Run Now.

Devices may not have connected yet at server start, so tag reads in a Startup workflow can return nothing. Put a Delay of 10–30 s first if you need live values.

User Login / User Logout ​

FieldDefaultNotes
Filter by users (empty = any)none tickedTick users to fire only for them. No filter = triggers for any user

Provides {{userId}} and {{email}}.

Network Event ​

FieldDefaultNotes
Check URLhttp://1.1.1.1Checked with an HTTP HEAD request every 60 s, 3 s timeout. Any response below 500 counts as connected
Fire onAny changeAny change, Connected or Disconnected

It fires only when the state changes between two checks — never on the first check after start. Provides {{connected}} and {{state}}.

On an appliance with no internet, point Check URL at something on the plant network, such as a switch's web page or your MES server.

The run continues from Connected or Disconnected, whichever state the address just changed to, so wire each to what should happen in that case. Run Now has no network state, so it follows neither.

Message Received ​

FieldNotes
Message NameThe name senders use, such as batch/done. Exact match, case-sensitive. Leave it blank and the trigger never fires

The workflow runs when a script calls messages.send(name, payload) or messages.sendRequest(name, payload), or a Send Message node sends that name — on this appliance or, with mesh networking on, from a paired appliance. It listens alongside any Message Handler scripts with the same name: a send reaches all of them.

What the run gets:

  • Every field of the payload, by name: a payload { lot: 42 } gives {{lot}}.
  • {{messageName}} and {{messageHops}} (how many messages in a row led here; see the loop limit below).
  • From a paired appliance, {{fromPeer.name}} and {{fromPeer.id}}, and the run's History starts with a line naming the appliance and what sent it there, for example Message "batch/done" from paired appliance "Line 2" (…), sent by workflow "Pack-out". A local message has no fromPeer.
  • These names are set after the payload's fields, so a payload can't pretend to be another appliance or another message.

Requests: messages.sendRequest and a Send Message that waits for a reply get one answer. When a Message Handler script listens for the name, the first such script answers, as it always has. When none does, the first listening workflow answers, with the value of the first Reply node its run reaches (see Communication Nodes). A run that finishes without reaching a Reply answers with nothing (null); a run that fails answers with an error, Message "…" handler failed: ….

A workflow runs one at a time. While it is still running, it skips a new message, and that message does not count it as a recipient.

A message chain is limited: a run that a message started can send a message, which starts another run, and so on, five messages deep. The sixth is refused. This stops two workflows (or a workflow and a script) that message each other, here or between two paired appliances, from running forever.

Run Now on a workflow with only this trigger runs its chain with no payload.

Manual ​

No fields. Does nothing by itself. Use it in workflows started by Run Now, a dashboard button, a script or the REST API — it satisfies the "needs a trigger node" rule without firing on its own. See Running with Parameters.

Called by Workflow ​

No fields. Exactly like Manual: it does not register anything and any trigger node would do. Use it to label a workflow as a sub-routine that another workflow or a script calls.

Shutdown ​

No fields. Fires when the Scada.Ink service shuts down gracefully — a restart from the Appliance page, an update, or a normal stop — before devices and the database close. Runs get about 2 seconds; anything still going after that is cut off. It does not fire on a power loss or a crash.

See also ​

Scada.Ink Help Center