Hello Guest it is November 27, 2025, 12:33:25 PM

Recent Posts

Pages: « 1 2 3 4 5 6 7 8 9 10 »
71
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.
72
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
73
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
74
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.
75
Mach4 General Discussion / Re: Mach4 on 2 computers working together
« Last post by Steve Stallings on October 30, 2025, 10:02:45 AM »
The original big old Hardinge Superslant lathe used basically this trick to run two turrets, one for side cutting and one for end working the stock. It had two Fanuc controls on board.
76
Mach4 General Discussion / Re: Mach4 on 2 computers working together
« Last post by Steve Stallings on October 30, 2025, 09:59:52 AM »
If the second system only needs one trigger input and runs only one sequence of operations, it should be easy to have a program on the second system just pause and wait for a trigger to continue, then loop and wait for the trigger again. Perhaps you could even have the second system look at extra inputs and conditionally run sections of code that are associated with the data read from the extra inputs.
77
HiCON Motion Controller / new conversion from mach 3 to mach4 feed rate bouncing
« Last post by fozzyber on October 29, 2025, 07:41:19 PM »
Hello 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 .

Thank you
Jerry

78
Mach4 General Discussion / Mach4 on 2 computers working together
« Last post by Bill_O on October 29, 2025, 05:25:35 PM »
Strange question but has anyone put Mach4 on 2 different computers and had an output from one trigger an input on the second so it will do an operation?
I am needing to make a machine that has 8 motors and a bunch of inputs and outputs and was thinking this might be the easiest way.
i know i could use a PLC but think this might be easier and more flexible.

Bill
79
CS-Lab / Help needed please.
« Last post by Pugman1 on October 29, 2025, 04:48:41 PM »
I just purchased a milling machine that was in parts. The controller is the CS-LABS CSMIO/IP-S along with the expansion unit for the hand remote. However what I don’t understand is the need to the Geckodrive G540 unit. From the little I have read all the G540 controls is the E-stop. There is also a bit about having to download firmware for the g540 to function. Do I just download this the same as the firmware for the CSMIO/IP-S and or do I place the G540 firmware in the mach3 folder like you would the license.
80
Yes, it is just a matter of replacing the motion controller.  All the components remain the same. 

Note that you will have to change the configuration in the VFD to take the variable speed, as the richauto does not handle variable speed, but just a set of fixed speeds.

If you need a hand with this, you can open a ticket in our website and we will help you: https://www.cnc4pc.com/contact

Arturo Duncan
https://cnc4pc.com
Pages: « 1 2 3 4 5 6 7 8 9 10 »