Lua Scripting Engine - Advanced Usage | Scribe

    Lua Scripting Engine - Advanced Usage

        Navigating to Lua Engine

        1
        Click "Lua Scripting Engine"
        2
        Click "Scripts"
        3
        This view shows the Lua Scripts and their enabled status

        Adding New Lua Script

        4
        Click this button field.
        5
        Enter the name of the script
        6
        For Example Type "TestScript1"

        Data Receivers

        information ordinal icon
        Tip! Lua Scripts are triggered by Data Receivers - When data is received by the Data Receiver it will fire off any scripts which are set to receive data. For example Axia GPIO
        7
        Click this dropdown to select the Data Receiver
        information ordinal icon
        Tip! Lua Scripts can be used to store data and properties - in this case no Data Receiver is selected

        Data Types

        8
        Select the Data Type
        information ordinal icon
        Tip! Datatypes can be Bytes / UTF8 ASCII / AxiaDataReceived Object / Json Object or XML
        9
        Enable the script to run
        alert ordinal icon
        Alert! When creating a new script there must be an Entry Function called the same name as the Script
        10
        Click here.
        11
        Click "Save"

        Debug Console