Hello Guest it is October 22, 2025, 06:06:57 AM

Author Topic: Mach4 Signal Tower LUA script  (Read 127 times)

0 Members and 1 Guest are viewing this topic.

Mach4 Signal Tower LUA script
« on: October 20, 2025, 08:25:39 AM »
Hi

I have been struggling with LUA signal tower script for a while and decided to ask some help. I do not have much experience with LUA (in the context of Mach4) and I´m continuously trying to figure some things out.

About the script. At first I made the logic in PMC, then converted to LUA but couldn´t get it to work. The script seemed very long and complicated one. Then I was suggested to pure LUA approach which I have been working with, but so far without any promising results. I have also used AI input (Gemini, GPT 5), but it seems they are a bit suspicious about giving some appropriate results.

Can anyone suggest some decent LUA script for signal tower logic? Or some hint how to build up the correct one?

I have following setup for my lathe:
- Mach4 version 4.2.0.5036
- CSMIO/IP-S controller (plugin ver 3.501)

Machine conditions (may change):
Blinking Red - Estop condition
Static Yellow - Hold
Blinking Yellow - Tool change
Static Green - Gcode finished
Blinking Green - Gcode running

Mach4 outputs:
Output 0 - green light
Output 1 - yellow light
Output 2 - red light
Re: Mach4 Signal Tower LUA script
« Reply #1 on: October 21, 2025, 07:31:10 PM »
Hi,
do need any scripting? Aren't those lights displayed with the same logic displayed on the screen at the moment?

Would it be sufficient just to have a mach output reflect what those LEDs are doing already?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'