Hello Guest it is November 22, 2025, 04:29:27 AM

Recent Posts

Pages: « 1 2 3 4 5 6 7 8 9 10 »
81
Mach4 General Discussion / Re: Mach4 Signal Tower LUA script
« Last post by henri on October 22, 2025, 01:45:51 PM »
Hi

do need any scripting? Aren't those lights displayed with the same logic displayed on the screen at the moment?

Yes and no... In terms of getting the lathe just to work no scripting is needed. Today I connected the tower to Mach4 given outputs (GCode Running - static green, Feed Hold - static yellow) and everything works perfectly.
Even a tool change output can be used. But blinking option is more difficult to implement directly, that´s why I was looking for a LUA scripting. To my knowledge I can´t take directly the blinking function from Mach4´s LEDs as outputs.
Although, for the emergency stop light (blinking red) I use LOGO! controller which programming was a child´s play.

I wish there were several step-by-step LUA programming examples for common and specific tasks in Mach4. It doesn't need to be a ready-made script, but something that can be taken as a good working example.
If someone knows, I would be very grateful. So far I haven´t found any which can be successfully implemented to build up a working customized script.

I would also be grateful if someone can and want to program some scripts in LUA, for an agreed fee. Through TeamViewer. I have simple turret tool change (8 inputs and one output), spindle speed selection (3 mechanical gears) and some button scripts. I think I´d figure it out myself over time, but I´m running out of time and I need to get the lathe ready soon.

henri
82
Hi,
I inherited a 3 axis CNC router that was originally controlled via a RichAuto A51 hand held control that has failed for the 3rd time.
So, I hope to be able to replace the original control with a PC and Mach3.
I already own a small machine that I produce parts on using Mach3 that is installed on a desktop WinXP machine.
I am conversant with G code programming, tooling etc., but my expertise is almost non existent when it comes to building a control 'from scratch'.
Has anyone the necessary information on how to complete the modification or could perhaps provide me with the necessary links to sources that provide the information?
I have sufficient resources at hand to perform the electrical connections and I'm happy to purchase the details if required.
Many thanks in anticipation of any replies and assistance.   
83
Mach4 General Discussion / Re: Mach4 Signal Tower LUA script
« Last post by joeaverage 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
84
Mach4 General Discussion / Re: Another Feed Hold Question...
« Last post by joeaverage on October 21, 2025, 06:42:15 PM »
Hi,
it is not as simple as you might imagine to do as you want. The reasoning goes something like this:

Mach4 can have ONLY one motion master active at any given time. When you start a Gcode job then the Gcode Interpreter is the motion master, and that motion master
is the ONLY source of motion commands. If, while the job is active, you spin the MPG, nothing happens, because the MPG is associated with the screen chunk, and is NOT the
motion master and therefore can have no effect on the motion of the machine. If you <Feedhold>, even if you stop the spindle, the Gcode job is STILL the motion master, its just
paused. The MPG is still unable to effect motion of the machine.

The only way the MPG can effect machine motion is for the Gcode job to be discontinued, whereon the Gcode interpreter will release its status as motion master, and thus the MPG (screen chunk)
can assume motion master status.

Officially the only way you can do as you want, is not just to <Feedhold> but <Stop> the Gcode job, whereon you can jog around to your hearts content and then RESUME the GCode job
by using the <Run From Here> functionality. I personally hate RunFromHere, and usually restart the job from the start.......but if you get 100% familiar with the RunFromHere procedure
its OK. You may even be able to automate it or at least parts of it........but first you must be 110% on the RunFromHere procedure or you will crash, not once or twice but repeatedly until
you are 110%....ask me how I know!

Craig
85
General Mach Discussion / Re: Mach3 mist sprayer (stepper) external controller
« Last post by arturod on October 21, 2025, 06:20:30 AM »
Very interesting device and application.  We have a similar one: https://www.cnc4pc.com/shop/c92-c-modbus-server-4753

Sometimes it can be a little scary hooking up relays to a PC that are driven by software only, so we added an external enable input that can be hooked up to the enable line of the system.

Arturo Duncan
https://cnc4pc.com
86
General Mach Discussion / Re: Mach3 mist sprayer (stepper) external controller
« Last post by Tweakie.CNC on October 21, 2025, 04:02:33 AM »
Hi Martin,

Yes it is possible.

I have used a Chinese HID Relay board to switch a vacuum pump and an extractor via USB with no connections to the actual CNC machine. I works great.

This thread refers; https://www.machsupport.com/forum/index.php?topic=42968.msg278574#msg278574

Tweakie.
87
General Mach Discussion / Mach3 mist sprayer (stepper) external controller
« Last post by martin2day on October 21, 2025, 03:08:00 AM »
Hello everyone,

today i have a mist sprayer with an Stepper and Air contolled by an arduino.
Now i am thinking off implement this into Mach3.
I don't want to change my wiring and setup in the machine, i am thinking of an standalone system only connect to mach3 via an modern interface.

My questions:
Is this possible?
Can i use an arduino for this? If so, what interface and protocol is possible?

Thank you for your help.

Have a nice day
Martin
88
Mach4 General Discussion / Another Feed Hold Question...
« Last post by mdr01amr03 on October 20, 2025, 12:19:12 PM »
Let's say I am starting a wood craving on my AVID Pro 4'x4' with Mach 4 and for the first minute or two I would like to watch the bit and how it's doing on the wood so I can make sure things are ok.  Then, once I make sure everything is good and I'm liking what is going on so I want to put my dust collector boot on so I don't have to stand there with a shop vac or get shavings all over the place.  I need to hold the feed, then stop the spindle and move it up in the Z direction to make room for the boot brush and then resume the cycle.

When I hit hold feed, then stop the spindle, all my jogging options are greyed out so I can't move it to get the dust boot on.  Moreover, if someone that reads this is able to provide the magic pill for me, obviously after I do this and turn the spindle back on, I'll want to resume the cycle so the spindle goes back to the place it left off and continue the carving.  Is this possible?
89
Mach4 General Discussion / Mach4 Signal Tower LUA script
« Last post by henri 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
Pages: « 1 2 3 4 5 6 7 8 9 10 »