Skip to content

Lua Program

Lua files are stored in the ~/robot/job/lua directory.

File upload and file list viewing use the SCP method.

Run Program

Host PC sends: 0x2511

json
{
  "fileName": "xxx.lua"
}

Controller returns: 0x2512

json
{
  "fileName": "xxx.lua",
  "result": true,
  "error": "Error reason"
}
ParameterTypeRequiredDescription
fileNamestringYesLua file name
resultboolYesWhether the run was successful
errorstringYesError reason; empty string on success

Stop Program

Host PC sends: 0x2513

json
{
  "fileName": "xxx.lua"
}
ParameterTypeRequiredDescription
fileNamestringYesLua file name

Current Running

Host PC sends: 0x2515

json
{}

Controller responds: 0x2516

json
{
  "fileNames": [
    {
      "fileName": "xxx.lua",
      "status": 1
    }
  ]
}
ParameterTypeRequiredDescription
fileNamesarrayYesList of running files
fileNames[].fileNamestringYesLua file name
fileNames[].statusintYes1-paused, 2-running