Hello Guest it is May 13, 2026, 03:18:07 PM

Author Topic: tower lights  (Read 2004 times)

0 Members and 1 Guest are viewing this topic.

tower lights
« on: February 18, 2026, 08:55:01 AM »
I've noticed a few people have LED's on there CNC to show what it happening on the CNC. there are Tower lights available but seem to be very simple.

I've created a LUA script which pairs with an arduino. 3 outputs from your BOB are needed so it's not for everyone if you don't have them.
I used an arduino mini pro for mine. Just about any arduino will work though. maybe not ATTINY's though. 3 inputs and one output. Arduino
bit bangs the addressable RGB LED strip. I used a 1 meter (39") long strip with 144 LED's in it. Still a couple of little niggles to investigate, but it's working.
script's and code are available on github at
https://github.com/cdedwards/Tower-Script/tree/main

This will eventually work on MachPro as well. (a little problem where it's giving me an error about an ='s sign)


Colten
Re: tower lights
« Reply #1 on: March 10, 2026, 12:03:24 PM »
I got this working on MachPro with the available code. I have pasted the towerscript.PLC script into the PLC Script file, under the Operator > Screen Editor, [Screen Name] PLC Script, as follows:

Code: [Select]
if m.CommonPLCScript ~= nil then
m.CommonPLCScript()
end

if towerscript == nil then
towerscript = require "towerscript" -- Load's towerscript.lua from a path. probably C:\Mach4\Modules
end
towerscript.PLCScript()
Re: tower lights
« Reply #2 on: March 10, 2026, 12:31:09 PM »
I'm attempting this using the "recommended" global Monitoring System. So far I get some of it working as advertised, but this is not quite ladder logic and is rather limited. I'll keep plugging away at it thoug.
Re: tower lights
« Reply #3 on: March 10, 2026, 01:25:13 PM »
I've seen a YouTube video done by Carl on the Global Monitoring System and its use for non-alarm type things. So far I've not got my head wrapped around it. Seems incongruent with how I see things. Hoping for more documentation and good examples of how to use it.
Re: tower lights
« Reply #4 on: May 12, 2026, 04:22:36 AM »
What challenges did you face while implementing the LUA script for the Arduino and LED strip
Re: tower lights
« Reply #5 on: May 12, 2026, 12:24:42 PM »
none really. finding the event's was somewhat challenging, but overall it was fairly easy to implement. The GMS from MachPro is another matter though. that thing is painful and if your not careful, can lead to error's that are difficult to fix.