Hello Guest it is March 05, 2026, 12:55:28 AM

Recent Posts

Pages: « 1 2 3 4 5 6 7 8 9 10 »
21
MachPro General Discussion / Re: MachPro
« Last post by cd_edwards on February 20, 2026, 11:28:18 AM »
Here is my lua script which is causing me problems. mc.mcRegGetHandle() mc.mcRegValue() never returns values that are definitely in the registry. I had a couple of Mach engineers logged into that system to see what the issue was. handle return code is -17. and a 0. Value returns and error because a handle of 0 doesn't exist.

anyways, it's just a method of dropping a dust shoe and picking it up again from a RapidChange ATC. I know RapidChange is working on there wizard/scripts and MachPro as well.

22
MachPro General Discussion / Re: MachPro
« Last post by paul.stephens on February 20, 2026, 11:06:18 AM »
Hi,

Would you be able to send me your Mcode script?

In MachPro, Mcodes are handled a bit differently than what you may be used to. We use a file called UserMCodeModule for custom or modified MCodes. We are working on getting documentation on how this is done and what available API's can be used as there are a lot more than just what is available on the Mach core API list now.

First thing on that list before we get that information out is having the new APIs documented. We are working on that process now.

When it comes to Mach4, I will be working on doing some bug fixes to try and provide a stable and solid product. There will just be no new planned features for the product.  This will take some time however.
23
MachPro General Discussion / Re: "Upgrading" from Mach4 to MachPro
« Last post by paul.stephens on February 20, 2026, 10:55:52 AM »
Currently, we don't support the old analog drives on MachPro. We are mostly trying to push into EtherCAT systems due to their reliability, safety, and functionality. At this time, the choices would be a Galil motion controller or a competitor like Centroid. At some point in the future, we may get Galil as a supported or certified motion controller, but there is no current ETA for that.

Current drives supported on MachPro when doing positional movements.
  • EtherCAT
  • Step and Direction - Differential - Open or closed loop
  • Step and Direction - Single ended - Open or closed loop (Can be done, not recommended due to reliability)

Current drives supported on MachPro when doing velocity movements. (Like a VFD)
  • EtherCAT
  • Step and Direction - Differential - Open or closed loop
  • Step and Direction - Single ended - Open or closed loop (Can be done, not recommended due to reliability)
  • +-10v Analog
  • Serial / Modbus
  • PWM
24
Mach4 General Discussion / Servo ready input ess , howto block cyclestart
« Last post by DAAD on February 19, 2026, 01:57:18 PM »
Hello,

I'ts been a long time i've adjusted things in mach 4.
Atm i have changed from steppers to dmm servo motors on my machine.
I already wired ALM inputs when triggered to Feedd hold the machine, this i have done in the screen load script with the input signal triggering the feed hold.

Now my question, how do i handle the following situation:

Servo not ready (one motor not ready or no power to the servo system) should prevent the system from starting the cyclestart. I already implemented this for homing all of my axis, but can't figure out how i have done it.

If someone has some info top point me in the right direction, it would be very helpfull.
I'm no programmer at all, and it's been a long time since.

All the best,

Adam
25
M31 Motion Controller / Re: VFD
« Last post by paul.stephens on February 18, 2026, 01:22:03 PM »
Ahh, so you're not communicating. That will be a network issue. You're Ip for the network adapter you're using will need to be something like 192.168.208.10

If you're IP is not in the same range as the M31, it will not communicate at all.


Configure the Dedicated Network Interface (J20)
The M31 motion controller connects to the control computer through a static IP Ethernet connection.

Follow the Microsoft guide below to manually set your network adapter to communicate with the M31:
 Microsoft Instructions: Manually Configure IPv4 Settings Scroll to the bottom and expand the section titled “To specify IPv4 settings manually.”

Then perform the following steps:

https://support.machmotion.com/link/1928#bkmrk-set-ip-address-to%3A-1

Set IP address to: 192.168.208.10

Set Subnet mask to: 255.255.255.0

Save the settings and close the window.

Connect the Mach J20 port to the dedicated network port on the control computer.
26
Mach4 General Discussion / tower lights
« Last post by cd_edwards 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
27
M31 Motion Controller / Re: VFD
« Last post by edcross on February 17, 2026, 11:14:45 AM »
At startup shows  Error : no M31 controller found
28
M31 Motion Controller / Re: VFD
« Last post by edcross on February 17, 2026, 10:17:00 AM »
Still does not jog , when i open logging it shuts Mach down
29
M31 Motion Controller / Re: VFD
« Last post by paul.stephens on February 17, 2026, 09:58:43 AM »
Software configuration steps:

In your M31 Config (M31 Plugin):

Check Motor0, make sure your Type is set to stepper at index 0, Feedback source is undefined at index 0, Select your homing type
Check Motor1, make sure your Type is set to stepper at index 1, Feedback source is undefined at index 1, Select your homing type
Check Motor2, make sure your Type is set to stepper at index 2, Feedback source is undefined at index 2  , Select your homing type
IF a 4th axis:
Check Motor3, make sure your Type is set to stepper at index 3, Feedback source is undefined at index 3, Select your homing type

You wont need to check polarity at this time as the M31 should be blind to direction with no feedback.

In Configure → Control... → Motors, make sure that your desired motors are enabled.
In Configure → Control... → Axis Mapping, make sure that your Motors are mapped to your Axis and enabled. Only enable and map the axis that you are using.

Make sure that an ESTOP event is not happening. You will not get motion without an ESTOP. (M31 expects a N.C. setup)

Open your logging data in Diagnostic → Logging and keep an eye on your status bar to verify no errors. The logging data will tell you almost every event in Mach. It will be your number 1 troubleshooting tool.

Enable Mach, lower your rapid, and try to jog your machine to see if you get any motion. If you do not, please send over your logging data for review and double check your wiring.




30
MachPro General Discussion / Registers
« Last post by cd_edwards on February 17, 2026, 09:23:08 AM »
I've been attempting to use Registers for an automatic unload/reload of a dustboot. Here is my script so far.

In m6 I have
require "dustboot"
and have placed DropDustBoot() and PickupDustBoot() in appopriate places.


And here is my DustBoot.lua file. All of the mcRegGetHandle() always return 0 for the hreg and rc of 0. 
As well mcRegGetValue() calls have a return code of -27 and return 0 even when there's definitely values in the registers. Yes iRegs0/DustBoot/* all exist. -27 indicates it doesn't exist which should be correct as a register 0 doesn't exist but then the Gethandle should have told me that.
hreg,rc = mc.mcRegGetHandle(inst, "core/global/Version") fails with a hreg of 0 and a rc of 0. Either that exists or Mach is not running.

I believe this is ALL IPC related. Mach4 with it's wxprobe screen doesn't recognize probes have activated. This script fails there as well. I'm open to suggestions here.


local DustBoot = {}

-- Dustshoe Entry Settings
local inst = mc.mcGetInstance()

local hreg, rc, ignoreDustBoot
local DustBootX = 46.2057   
local DustBootY = 11
local DustbootZ = -3.7143
local DustbootRateY = 100
local DustBootRateZ = 200
local DustBootYSlide = 4   
local DustBootStatus

hreg, rc = mc.mcRegGetHandle(inst, "iRegs0/DustBoot/ignoreDustBoot")

if (rc == 0) then
    ignoreDustBoot, rc = mc.mcRegGetValue(hreg)
   hreg, rc = mc.mcRegGetHandle(inst, "iRegs0/DustBoot/DustBootX")
   DustBootX, rc = mc.mcRegGetValue(hreg)
   
   hreg, rc = mc.mcRegGetHandle(inst, "iRegs0/DustBoot/DustBootY")
    DustBootY , rc = mc.mcRegGetValue(hreg)
   
   hreg, rc = mc.mcRegGetHandle(inst, "iRegs0/DustBoot/DustBootZ")
   DustBootZ, rc = mc.mcRegGetValue(hreg)


   hreg, rc = mc.mcRegGetHandle(inst, "iRegs0/DustBoot/DustBootRateY")
   DustBootRateY, rc = mc.mcRegGetValue(hreg)

   hreg, rc = mc.mcRegGetHandle(inst, "iRegs0/DustBoot/DustBootRateZ")
   DustBootRateZ, rc = mc.mcRegGetValue(hreg)

    hreg, rc = mc.mcRegGetHandle(inst, "iRegs0/DustBoot/DustBootYSlide")
   DustBootYSlide, rc = mc.mcRegGetValue(hreg)

    hreg, rc = mc.mcRegGetHandle(inst, "iRegs0/DustBoot/DustBootStatus")
   DustBootStatus, rc = mc.mcRegGetValue(hreg)   
else
    ignoreDustBoot = 0
end

                                          ------ How far from dustshoe to start with Y Park Movement
   
-- =========================================================== drop dust boot =============================================================================
function DropDustBoot()

    if (ignoreDustBoot == 1 or DustBootStatus == 0) then
      do return end
    end

   GCode = "G00 G90 G53 Z-1\n"                                                             ------ Z Up   
   rc = mc.mcCntlGcodeExecuteWait(inst, GCode)

   if (rc ~= 0) then
      do return end
   end
   GCode =  string.format("G00 G90 G53 X%.4f Y%.4f \n", DustBootX, DustBootY-DustBootYSlide)       ------ TO DUSTSHOE ENTRY
   mc.mcCntlGcodeExecuteWait(inst, GCode)
            
   GCode =  string.format("G00 G90 G53 Z%.4f\n", DustBootZ)                                     ------ TO DUSTSHOE Z
   mc.mcCntlGcodeExecuteWait(inst, GCode)
            
   GCode = string.format("G01 G90 G53 Y%.4f F%.4f\n", DustBootY,DustBootRateY)                        ------ MOVE Y INTO DUSTSHOE HOLDER
   mc.mcCntlGcodeExecuteWait(inst, GCode)
            
   GCode = "G00 G90 G53 Z-1\n"                                                             ------ PICK UP Z --- DROP SHOE IN HOLDER --
   mc.mcCntlGcodeExecuteWait(inst, GCode)
            
   GCode =  string.format("G00 G90 G53 Y%.4f \n", DustBootY-DustBootYSlide)                      ------ MOVE TO SAFE Y
   mc.mcCntlGcodeExecuteWait(inst, GCode)
   hreg = mc.mcRegGetHandle(inst, "DustBoot/DustBootStatus")
   mc.mcRegSetValue(hreg, 0)
end


--  ============================================================ PICKUP DUST SHOE ==========================================================================   
   
function PickupDustBoot()   
   if (ignoreDustBoot == 1 or DustBootStatus == 1) then
      do return end
    end
   local toolnum, rc = mc.mcToolGetCurrent(inst)
    if (toolnum == 0) then
      do return end
   end
   
   mc.mcCntlGcodeExecuteWait(inst, "G00 G90 G53 Z-1.0\n")                                       ------ Z UP
   
   GCode =  string.format("G00 G90 G53 X%.4f\n", DustBootX)                                  ------ To DustShoe Entry X
   mc.mcCntlGcodeExecuteWait(inst, GCode)
            
   GCode =  string.format("G00 G90 G53 Y%.4f\n", DustBootY)                                  ------ To DustShoe Entry Y
   mc.mcCntlGcodeExecuteWait(inst, GCode)
   
   GCode = string.format("G00 G90 G53 Z%.4f\n", DustBootZ+0.75)                                 ------ G00 Quick down to 20mm above DustShoe Pick Up
   mc.mcCntlGcodeExecuteWait(inst, GCode)
   
   GCode = string.format("G01 G90 G53 Z%.4f F%.4f\n", DustBootZ,DustBootRateZ)                     ------ DustShoe Pick Up
   mc.mcCntlGcodeExecuteWait(inst, GCode)
            
   GCode = string.format("G01 G90 G53 Y%.4f F%.4f\n", DustBootY-DustBootYSlide,DustBootRateY)      ------ DustShoe SlideOutY
   mc.mcCntlGcodeExecuteWait(inst, GCode)
   hreg = mc.mcRegGetHandle(inst, "DustBoot/DustBootStatus")
   mc.mcRegSetValue(hreg, 1)
end   

if mc.mcEditor() == 1 then
   DropDustBoot()
   PickupDustBoot()
end

return DustBoot

Pages: « 1 2 3 4 5 6 7 8 9 10 »