Skip to content

System Status Tags (_STATUS) ​

Last updated

The appliance publishes its own health as ordinary tags, under the _STATUS/ prefix: whether a device is talking, whether a ladder task is faulted, whether the last run of a workflow or script failed.

Because they are ordinary tags, being paged when a ladder task faults is the same job as being paged for a high temperature — an alarm rule, a pipeline, a dashboard widget, a trend, history. Nothing special is needed and nothing has to be turned on.

There are three families.

Appliance health tags ​

The appliance reports its own resources on the Local Tags device, sampled every 10 seconds:

Tag pathTypeValue
_STATUS/System/CpuPercentfloatShare of all CPU cores busy since the previous sample, 0–100, one decimal.
_STATUS/System/LoadAverage1mfloatThe operating system's 1-minute load average.
_STATUS/System/MemoryPercentfloatMemory in use, 0–100. Memory the system can reclaim from its cache counts as free.
_STATUS/System/MemoryUsedMBintMemory in use, in MB.
_STATUS/System/DiskPercentfloatSpace used on the disk that holds the appliance's database, 0–100.
_STATUS/System/DiskFreeMBintFree space on that disk, in MB.
_STATUS/System/CpuTempCfloatCPU temperature in °C. Only on hardware with a temperature sensor (the Raspberry Pi has one); elsewhere the tag is not created.

A value is written only when it changes at the precision shown, so a steady reading does not fill the historian. They are created at start-up and hold 0 until the first sample.

Device connection tags ​

Every device with a real protocol driver carries _STATUS/Connected, _STATUS/SecondsSinceLastComm and _STATUS/LastCommTime on that device. They are the "machine offline" story and are described in Tags & the Tag Browser; the behavior behind them is in Polling, Reconnect and Connection Status.

Ladder, workflow and script tags ​

Every ladder task, workflow and script gets its own tags on the Local Tags device.

Tag pathTypeValue
_STATUS/Ladder/<task name>/Runningbooltrue while the task is scanning.
_STATUS/Ladder/<task name>/Faultedbooltrue from the scan that faults until a scan completes cleanly or the task is stopped.
_STATUS/Ladder/<task name>/LastErrorstringThe fault message. Empty while the task is healthy.
_STATUS/Workflow/<workflow name>/Failedbooltrue if the most recent run failed, back to false after the next run that succeeds.
_STATUS/Workflow/<workflow name>/LastErrorstringThe error from that failed run. Cleared by the next successful run.
_STATUS/Script/<script name>/Failedbooltrue if the most recent run failed, back to false after the next run that succeeds.
_STATUS/Script/<script name>/LastErrorstringThe error from that failed run. Cleared by the next successful run.

<task name>, <workflow name> and <script name> are the item's name as it appears in its list, with one change: a slash in a name becomes a hyphen, because a slash in a tag path reads as a folder. A task named Line 2/Palletizer gets _STATUS/Ladder/Line 2-Palletizer/Faulted.

The set is brought back into step when the appliance starts, whenever a task, workflow or script is created, renamed or deleted, and whenever the license changes. The ladder tags exist only while the Ladder Logic feature is licensed and turned on: without it they are removed from the tag list, and they come back, reset to their defaults, when the feature returns. An alarm rule or widget on a ladder tag shows the tag as missing in the meantime. A rename moves the tags to the new name and removes the old ones, so an alarm rule or a widget bound to the old path has to be repointed as well.

What a restart does ​

  • Running and Faulted describe this run of the appliance, so both are set to false when it starts, along with the ladder LastError. A task that was running when the power went out does not come back reading "running" until it actually starts.
  • Failed and its LastError are the last run's outcome, which is still true after a restart. They change only when that workflow or script runs again.

Alarming on them ​

Alarm rules need numbers, and true/false count as 1/0, so the rule is Condition Equal to, Threshold 1 on the bool tag. Pick device Local Tags, then the tag by its display name — a ladder task named Filler sequence is listed as Filler sequence — faulted, — running and — last error. Attach the rule to a pipeline to email, text or call someone; see Alarm pipelines.

The LastError tags are strings, and string tags cannot be alarmed. Show one on a dashboard next to the alarm, or read it where you need the text: tags.read(devices.localId(), '_STATUS/Script/Nightly export/LastError').

Useful rules:

RuleTagCondition
A ladder task faulted_STATUS/Ladder/<task>/FaultedEqual to 1
A ladder task that should always scan has stopped_STATUS/Ladder/<task>/RunningEqual to 0
A workflow's last run failed_STATUS/Workflow/<workflow>/FailedEqual to 1
A script's last run failed_STATUS/Script/<script>/FailedEqual to 1
The disk is nearly full_STATUS/System/DiskPercentGreater than 90
The appliance is running hot_STATUS/System/CpuTempCGreater than 80
Memory is running out_STATUS/System/MemoryPercentGreater than 90, with a debounce of a minute or more

Things to know ​

  • They are subscriptions on the Local Tags device, so they appear on the Local Tags page and in the Tag Browser with your own local tags.
  • History is off. Tick it on Devices → Local Tags → Manage Tags to trend a tag or put it in a report.
  • Don't write to them from a script, a widget or ladder logic. The engine owns their values and overwrites whatever you write.
  • The _STATUS/Ladder/, _STATUS/Workflow/, _STATUS/Script/ and _STATUS/System/ folders on Local Tags belong to the appliance: a tag in them that matches no task, workflow, script or health reading is deleted. Keep your own tags out of those folders. Deleting one of these tags on the Local Tags page removes it only until the next restart, or the next time that task, workflow or script is saved.

See also ​

Scada.Ink Help Center