Lua Scripts

The communication format is determined by built-in Lua scripts on the mainboard. The corresponding script must be loaded and enabled on the development board before use.

Script List

ScriptData FormatUse Case
checkConnectivity.luaAny stringConnectivity test; data goes to register 1 (test only)
getString_reg.luaSimple formatSimple data exchange; register number identified by frame
getString_json.luaSingle JSONSingle register write, standardized format
getString_multi_json.luaMultiple JSONRecommended — write multiple registers in one frame, supports remote commands
getOpMsg.luaSpecial character formatWhen data contains {} " ^ % etc.

Script Selection Guide

RequirementRecommended Script
Connectivity test onlycheckConnectivity.lua
Simple data transfergetString_reg.lua or getString_json.lua
Multiple registers / remote controlgetString_multi_json.lua (recommended)
Data with special charactersgetOpMsg.lua

Data Flow

$$Host/Scale/PLC ──(Serial/Network)──> Lua script parses │ Writes to register │ Canvas object updates$$

Note: checkConnectivity.lua is for connectivity testing only — it does not support signal switching.