Appearance
Workflow Examples
Last updated
Each example uses only node behavior that works as described in these pages.
1. Device offline: set a flag, tell the HMI, publish to MQTT
Goal: when the Haas VF-2 drops off the network, raise a local flag shown on the dashboard and publish an event to the plant broker.
- Create a local tag
Status/VF2_Offline(boolean) on Local Tags. - New workflow VF-2 offline. Add Machine Offline, Device = Haas VF-2.
- Add Set Tag: Device Local Tags, Tag Path
Status/VF2_Offline, Valuetrue. - Add Sound: Stock sound Alarm.
- Add Reformat Date/Time: Format ISO 8601, Output variable
at. - Add MQTT Publish: MQTT Device Plant broker, Topic
plant/machining/vf2/connection, Payload{"state":"offline","at":"{{at}}"}. - Wire Machine Offline → Set Tag → Sound → Reformat Date/Time → MQTT Publish (gray dots only).
- Save, then Enabled.
- Build a second workflow VF-2 online with Machine Online that sets the tag to
false.
2. Shift change: snapshot a counter into a tag
Goal: at 06:00, 14:00 and 22:00, copy the good-part count into "last shift" and reset the live counter.
- New workflow Shift snapshot with a Manual trigger.
- Set Tag: Device Local Tags, Tag Path
Shift/LastShiftGood, Value Source From another tag, SourceLine1/GoodCount. - Set Tag: Device Line 1 PLC, Tag Path
GoodCount_Reset, Value1(the PLC must have write access enabled). - Delay 1000, then Set Tag
GoodCount_Reset=0. - Wire and Save. Leave it disabled — it does not need its own triggers.
- On Schedules, New Schedule: Name Shift snapshot, Action Run Workflow, Target Shift snapshot, Custom cron
0 6,14,22 * * *.
3. Over-temperature email with a debounce
Goal: when Oven 3's high-temperature bit (set by the PLC) stays on for 30 s, email maintenance once per event.
- Trigger: Tag Change on
Oven3/TempHigh. - Condition: Left
{{value}}, Operator ==, Righttrue(or1— use exactly what the Tags page shows for this bit). Wire True onward; leave False unwired. - Delay 30000.
- Read Tag
Oven3/TempHigh, Output variablestillHigh. - Read Tag
Oven3/Temp, Output variabletemp. - Condition:
{{stillHigh}}==true, wire True to: - Send Email: To
maintenance@plant.example, SubjectOven 3 over temperature, BodyOven 3 has been over temperature for 30 s. Current temperature {{temp}} °C..
Check the SMTP limits in Communication Nodes first. Because Tag Change fires on each update of the bit, a PLC that rewrites the bit with a new quality can start extra runs; each still waits and re-checks, so at worst you get a duplicate email.
4. Barcode scan to a data table (workflow + script)
Goal: an operator scans a lot label into a local tag; the scan is logged to a data table.
- A script Log scan that inserts
context.params.codeandcontext.params.stationinto the table (see Scripts and Workflows). - Workflow: Tag Change on Local Tags
Station4/LastScan→ String Compare Left{{value}}, Starts with, RightLOT-→ True → Run Script Log scan with parameterscode={{value}},station=4→ Error → Set TagStation4/ScanError=true.
For a plain insert like this you can use Write DB instead of the script: Table name set to your table, and Column values code = {{value}}, station = 4. Keep the script when the insert needs logic of its own.