Frame Formats & Registers

Depending on the enabled script, data frames support the following formats. Register numbers currently support 1~64 (content registers).

Simple Format (getString_reg.lua)

$$xxx[Rn]xxx\r\n$$
FieldDescription
xxxTransferred data
[Rn]Register number identifier, n is the register number
\r\nEnd frame

Example: hello[1]world\r\n — transfers helloworld data to register 1

JSON Format

Single Register (getString_json.lua)

$${regNum=n,content="xxx"}\r\n$$
FieldDescription
regNumRegister number (1~64)
contentTransferred data; non-numeric values need quotes, i.e., content="xxx"
\r\nEnd frame

Example: {regNum=1,content="hello"}\r\n

$${regNum=n,content="xxx"}{regNum=n,content="xxx"}...\r\n$$

{} marks one complete data segment; multiple registers can be written in a single frame.

Example: {regNum=1,content="100"}{regNum=2,content="A002"}\r\n

Special Character Compatible Format (getOpMsg.lua)

When the transferred data contains special characters such as {} " ^ %, the JSON format will treat them as syntax identifiers. In this case, use this format with | as the register separator.

$$01content1!@#$%^|11content2|12content3\r\n$$
FieldDescription
01Register number (19 uses two digits 0109)
content1!@#$%^Transferred data containing special characters
|Register separator
\r\nEnd frame

If | itself needs to be transferred as content, the separator will be updated to another identifier — refer to the script version documentation.