> For the complete documentation index, see [llms.txt](https://docs.monokot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.monokot.io/tags-and-devices/iec-60870-5-104-connectivity/diagnostics-and-commands.md).

# Diagnostics and Commands

In addition to the diagnostic variables described in "Devices" [<mark style="color:blue;">section</mark>](/tags-and-devices/devices/diagnostics.md), the IEC 60870-5-104 device also has the following diagnostic variables:

* **RecvCounter**: received messages counter.
* **SentCounter**: sent messages counter.

Variables with the *Run* prefix allow you to manually start the execution of application commands of the IEC 60870-5-5 standard. To do this, you need to write any value to the corresponding variable. The following variables are defined in the device:

* **RunGeneralInterrogation:** initializes general interrogation of the station. The command is executed with the qualifier specified by the user, for example QOI = 20 (station interrogation).
* **RunCounterInterrogation:** initializes counter interrogation. The command is executed with the qualifier of QCC = 5 (general group of counters).
* **RunFreezeCounters:** initializes the counter freeze command. The command is executed with the qualifier of QCC = 69 (freeze for general group of counters).
* **RunFreezeResetCounters:** initializes the counter freeze and reset command. The command is executed with the qualifier of QCC = 133 (freeze and reset for general group of counters).
* **RunResetCounters:** initializes the counter reset command. The command is executed with the qualifier of QCC = 197 (reset for the general group of counters).
* **RunTestProcedure**: initializes the testing command (TEST-FR).
* **RunTimeSync**: initializes the time synchronization command.

For application commands to be initialized by the OPC UA client, the following conditions must be met:

* the user must have the *Run Command* rights from the *Devices* category. You can read more about this [<mark style="color:blue;">here</mark>](/basics/users-and-roles.md).
