runtime/PlcStatus.py
author Edouard Tisserant <edouard@beremiz.fr>
Fri, 07 Feb 2025 10:52:09 +0100 (2 months ago)
changeset 4104 9e59bb5ad9e1
parent 2416 1ca207782dde
permissions -rw-r--r--
Python runtime: call "OnIdle" tasks when py_eval FBs execution queue is empty.

This is usefull to execute slow operations that can be deffered from functions called by py_eval FBs.
User python code add a callable to "OnIdle" list made available in global scope.
# -*- coding: utf-8 -*-

# See COPYING.Runtime file for copyrights details.


def _(x):
    """No translation"""
    return x


Broken = _("Broken")
Started = _("Started")
Stopped = _("Stopped")
Disconnected = _("Disconnected")
Empty = _("Empty")