Author Topic: Running a Lua script in the background  (Read 1104 times)

0 Members and 1 Guest are viewing this topic.

Offline awh216

  • Active Member
  • Posts: 10
    • View Profile
Running a Lua script in the background
« on: August 12, 2016, 10:24:55 AM »
Hello all,

We want our feed rate to be controlled by a Python script we have running in a separate process. To do this, we hoped to be able to run a Lua script in the background of Mach 4 with a while True loop that would read UDP packets and send that value to the feed rate adjuster. Does anyone know if this is possible? I'm still fairly new to Lua altogether. Is there a better way to go about this?

Thanks  :)

Offline awh216

  • Active Member
  • Posts: 10
    • View Profile
Re: Running a Lua script in the background
« Reply #1 on: August 17, 2016, 01:16:09 PM »
Thanks to some external help, I was pointed to the PLC script under Operator -> Edit Screen, Screen Tree Manager, wxMach (head of tree, could be differently named), Events tab, plc script

The script runs continually in the background so I just added my code to the bottom and I was set.