Hello Guest it is December 02, 2025, 06:20:55 AM

Recent Posts

Pages: « 1 2 3 4 5 6 7 8 9 10 »
71
Mach4 General Discussion / Re: Mach4 on 2 computers working together
« Last post by Bill_O on November 06, 2025, 06:21:26 PM »
Craig,

I don't need the 8 axis to be coordinated.
At the most it will be 4 axis.
I am not worried about IO
I use a Pokeys 57U for my pendant now and can easily use it if i need the extra IO
I did mention to my boss about Mach is supposed to at some point be able to have multiple instances.
Because it is not available now i think i can just use multiple laptops and IO between them to run the machine.
I appreciate the assistance.

Bill
72
Mach4 General Discussion / Re: Mach4 on 2 computers working together
« Last post by joeaverage on November 05, 2025, 06:49:51 PM »
Hi,
a Hicon is not going to help that much.

Mach4Hobby has a maximum of SIX coordinated axes, as does Mach3 which preceded it and Mach4Industrial.  Mach4Hobby and Mach4Industrial can also have six out-of-band axes.
The ESS is limited to six motors. Thus a Hicon, may help there, as you can have eight motors, but Mach4 still can only control six coordinated motors.

Mach4 can have ONE any only one active motion control, it can however have auxiliary input boards. For example if you have an ESS as motion control, but require more inputs
then its not uncommon to use a PoKeys 57E as an auxiliary IO board. Note however Mach cannot drive motors attached to the 57E, and the data going to and from the 57E is refreshed
approx every 25ms, and thus none of the IO of the 57E could be considered realtime.

I suspect what you really want, and I believe Mach4 is in fact capable of, even if not released publicly is a version of Mach4 that can have multiple instances. Lets say you have Mach4 running two instances,
then each would have its own active motion controller, say an ESS on each. Mach4 was always intended to be multi-threaded, but its synchronisation between two threads which is the sticking point.
Smurph will know more about it.

Craig
73
Mach4 General Discussion / Re: Mach4 on 2 computers working together
« Last post by Bill_O on November 03, 2025, 08:02:16 AM »
Steve,

It will all be a very repetitive operation.
Having the motors split will also help in some time issues.
I can have motors 1-4 doing an operation and have motors 4-8 doing an operation without needing to be in sync with motors 1-4

Bill
74
Mach4 General Discussion / Re: Mach4 on 2 computers working together
« Last post by Bill_O on November 03, 2025, 07:56:52 AM »
Chad,

I could use a Hicon. I did look at them before but went with the ESS.
I also hate ladder logic so would prefer to use 2 pcs and program in LUA.
I may change my mind after a while though.

Bill
75
Mach4 General Discussion / Probe Calibration Tab/Screen
« Last post by Cudaman1970 on November 01, 2025, 03:07:04 PM »
Hello everyone.

I just updated from Mach3 to Mach4 Hobby while changing to a new PC that will be dedicated to only run my CNC mill.

I've been using Mach3 for 11 years, it has worked pretty well but thought an upgrade would be good.  I have the latest version of Mach4 installed and working.

One thing missing in the newer build of Mach4 is for the probe, missing is the calibration tab/screen.

On YouTube I have seen video's showing that tab and how to calibrate the CNC probe, it shows a calibration screen and how to calibrate the probe using a know artifact, say a 1" master I.D. gauge.

Am I just missing where the calibration screen is, or is it just not there in the newer builds?

Thanks to anyone that can help!
76
Mach4 General Discussion / Probe/Touch Off Error
« Last post by tbadger on November 01, 2025, 01:49:50 PM »
Recenlty I've been getting an error when I run the Touch Off UI the second time. It works the first time and after probing Z, I run my program. Then I change the bit and run the Touch Off UI again, but it does not load. I see this error in the UI:

Lua: Error while running chunk

Viewing the log, I see this:

C:\Mach4Hobby\ScreenScript.lua:925: attempt to index a userdata value (global 'Iframe')
stack traceback:
   C:\Mach4Hobby\ScreenScript.lua:925: in function 'btnTouch_Left_Up_Script'


This is the Lua code referenced:
Code: [Select]
function btnTouch_Left_Up_Script(...)
    --Touch Button script
    if (Iframe == nil) then
   
    --TouchOff module
    package.loaded.mcTouchOff = nil
    mcTouchOff = require "mcTouchOff"
   
    Iframe = mcTouchOff.Dialog()
    else
    Iframe:ShowMenu()
    Iframe:Raise()
    end

I've not made any changes to the screen, modules, or anything else that I'm aware of recently  Short of reinstalling Mach 4 and having to reconfigure everything. Any input on why I'm seeing this?  I've run it as Administrator and not as Administrator and get the same error and issue. Running on Windows 11.
77
Turned out that for some strange reason mach3 was loading older macros for the tool change.  The CS-labs controllers do not support G31 probing. Following contact with Ger, the creator of the 2010 screenset he told me to edit macros to use the M31 alternative. I couldn't understand initially how the toolchange had worked so well for so long and was now showing classic signs of the G31 probe issue.  Ger told me to edit three macros so I began looking at them and thought this seems so familiar and I was sure there were macros especially for the CS-labs controllers that were included with the screenset.  I checked the original installation files and still had the CS-labs specific macros, checked them against the ones Mach3 was using and they were different?? replaced them with the CS=labs specific macros and all works fine.  Goodness knows how the macro file s changed but all is well now.  Bit of a head scratcher though.
78
Mach4 General Discussion / mach4 feed rate bouncing ( changing rate)
« Last post by fozzyber on October 30, 2025, 06:32:43 PM »
ello all, I just converted from m3 to m4 with a new hicon 7866 controller.
I'm running steppers , with no feed back to the hicon,
when I'm running my feed rate display keeps changing...????
if  I  command a G01 Y60 F125 the feed rate display will bounce between something
like 124.53 to a 125.8  this seems strange to me,  why would it be changing?  also the movement is jerky I can feel it is not smooth.
Can any one explain this to me?
this evens happens even  if I use  a G61 .
not sure this will work but here is a video of what it is doing.
https://photos.app.goo.gl/bESwCdwpXtysWmGA6

Thank you
Jerry
79
Mach4 General Discussion / Re: Mach4 Signal Tower LUA script
« Last post by Cbyrdtopper on October 30, 2025, 11:57:45 AM »
Weird setup but it works.  It requires some setup... so be prepared. 
We make our PLC handle all the flashing, but I figured out how to let Mach4 handle it all internally. 
This example will make the Yellow Light flash when the code reaches the end and reads M30.  (Adjust as you see fit.)

This requires you to make a register:  Go to Config --> Plugins --> and make a new register called Timer.

This also uses Output 30 as an M30 output.  So you will need to create an m30 macro as well.
Here is the code for it: Create a new macro m30 (save it in Mach4Folder --> Profiles --> YOUR PROFILE --> Macros --> m30.mcs)

function m30()
local inst = mc.mcGetInstance()
local M30Output = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT30)
local Coolant = mc.mcSignalGetHandle(inst, mc.OSIG_COOLANTON)
mc.mcSpindleSetDirection(inst, 0)
mc.mcSignalSetState(M30Output, 1)
mc.mcSignalSetState(Coolant, 0)
mc.mcCntlMdiExecute(inst, "G40")
end --m30()

if (mc.mcInEditor() == 1) then
   m30()
end

Next you will need a way to turn of the m30 output (output 30).  I handle this by pressing the Reset button or by hitting cycle start. 
Change the script on your reset button on your screen to this:  Reset()
Next in the screen load script make a new Reset Function.  Here is the code for it:  Add it anywhere after the SigLib()

---------------------------------------------------------------
--Reset Function
function Reset()
local inst = mc.mcGetInstance()
local M30Output = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT30)
local M30Flasher = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT1)

mc.mcSignalSetState(M30Output, 0)
mc.mcSignalSetState(M30Flasher, 0)

mc.mcCntlReset(inst)
mc.mcSpindleSetDirection(inst, 0)
mc.mcCntlSetLastError(inst, '')
end--Reset()
---------------------------------------------------------------

Next replace your CycleStart() Function with this

---------------------------------------------------------------
-- Cycle Start() function.
---------------------------------------------------------------
function CycleStart()   
   local rc
    local tab, rc = scr.GetProperty("MainTabs", "Current Tab")
    local tabG_Mdione, rc = scr.GetProperty("nbGCodeMDI1", "Current Tab")
   local tabG_Mditwo, rc = scr.GetProperty("nbGCodeMDI2", "Current Tab")
   local state = mc.mcCntlGetState(inst)
   local M30Output = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT30)
   local M30Flasher = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT1)
   
   if (state == mc.MC_STATE_MRUN_MACROH) then
      mc.mcCntlCycleStart(inst)
      mc.mcSignalSetState(M30Output, 0)
      mc.mcSignalSetState(M30Flasher, 0)
   elseif ((tonumber(tab) == 0 and tonumber(tabG_Mdione) == 1)) then 
      scr.ExecMdi('mdi1')
      mc.mcSignalSetState(M30Output, 0)
      mc.mcSignalSetState(M30Flasher, 0)
   elseif ((tonumber(tab) == 5 and tonumber(tabG_Mditwo) == 1)) then 
      scr.ExecMdi('mdi2')
      mc.mcSignalSetState(M30Output, 0)
      mc.mcSignalSetState(M30Flasher, 0)
   else
      mc.mcCntlCycleStart(inst)
      mc.mcSignalSetState(M30Output, 0)
      mc.mcSignalSetState(M30Flasher, 0)
   end
end--CycleStart()
-------------------------------------------------------

Finally, add this to the end of your PLC Script (But above the section that says "this is the last thing we do".

--Custom Scripts
--Blink when m30 is on.
local inst = mc.mcGetInstance()
local M30Output = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT30)
local FlashingLight = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT1)
local M30OutputState = mc.mcSignalGetState(M30Output)
local FlashingLightState = mc.mcSignalGetState(FlashingLight)
if M30OutputState == 1 then
    local TimerReg = mc.mcRegGetHandle(inst,"iRegs0/Timer")
    local TimerVal = mc.mcRegGetValue(TimerReg)
    mc.mcRegSetValue(TimerReg, (TimerVal + 1))
    if TimerVal >= 50 then --Adjust the number for flashing frequency
        if FlashingLightState == 0 then
          mc.mcSignalSetState(FlashingLight, 1)
       else
          mc.mcSignalSetState(FlashingLight, 0)
       end
       mc.mcRegSetValue(TimerReg, 0)
    end--Timer >= Number
end--M30Output == 1
80
Mach4 General Discussion / Re: Mach4 on 2 computers working together
« Last post by Cbyrdtopper on October 30, 2025, 10:51:16 AM »
Can you not just get a controller that has 8 motors?  The HiCON Integra has the ability to use 8 motors and their EC01 ethercat has the ability to use 12 motors.
Then use a PLC to communicate over TCP modbus to handle all of your IO.  That would be a very robust system.
Pages: « 1 2 3 4 5 6 7 8 9 10 »