Motor don't work in Mach3

Moderators: TomKerekes, dynomotion

Platax
Posts: 6
Joined: Thu Jul 03, 2025 11:50 am

Motor don't work in Mach3

Post by Platax » Thu Jul 03, 2025 12:13 pm

Hello
I configure my Kflop board and it's working fine in KMotion CNC (except Z axe witch is inverted).
I installed the Mac 3 plugin for dynomotion , endstop are seen correctly in Mach3, but motor don't move.
I've configured I/O as explained in this documents : dynomotion.c/Help/Mach3Plugin/Mach3.htm

If you have any ideas where to search for a solution, I will be pleased.
Thanks Pierre

User avatar
TomKerekes
Posts: 2861
Joined: Mon Dec 04, 2017 1:49 am

Re: Motor don't work in Mach3

Post by TomKerekes » Thu Jul 03, 2025 1:19 pm

Hi Pierre,

Do the DROs in Mach3 change?

Do the Destinations in KMotion.exe Axis Screen change?

Post your initialization C Program and Mach3 Profile and we can look at them.
Regards,

Tom Kerekes
Dynomotion, Inc.

Platax
Posts: 6
Joined: Thu Jul 03, 2025 11:50 am

Re: Motor don't work in Mach3

Post by Platax » Thu Jul 03, 2025 2:25 pm

Hi Tom Thanks for your help
DRO change when I click on arrows but motor don't move.
I cant open Mach3 and KMotion CNC together.

Here are my config files (changed XML/TXT) :

Do you need more information ?

Thanks
Pierre
Attachments
Mach3fraisage.zip
(25.17 KiB) Downloaded 225 times
Init3FabLab.c
(3.94 KiB) Downloaded 205 times
Last edited by Platax on Thu Jul 03, 2025 2:32 pm, edited 1 time in total.

User avatar
TomKerekes
Posts: 2861
Joined: Mon Dec 04, 2017 1:49 am

Re: Motor don't work in Mach3

Post by TomKerekes » Thu Jul 03, 2025 7:51 pm

Hi Pierre,
I cant open Mach3 and KMotion CNC together.
Yes you can. Or why not? But I asked you to run KMotion at the same time, not KMotionCNC.

Your configuration seems to work for me. The Destinations in the KMotion | Axis Screen change. Do they for you?

Your C Program configures for DAC Servos with Encoders. Do you have those?

I'm running Mach3.3.043.066. and KMotion 5.4.0 (I doubt if its a KMotion Version issue if KMotionCNC works)

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

Platax
Posts: 6
Joined: Thu Jul 03, 2025 11:50 am

Re: Motor don't work in Mach3

Post by Platax » Sun Jul 06, 2025 10:14 pm

Hi Tom.

I don't have Servo nor Encoder, I'm driving Stepper motor in open loop with dedicated driver (Step/Dir) since my KStep board died.
I did many try with init C files, when I had endstop working I what happy and did'nt make a complete check or the rest of the parameter. :(
It was a bit confused for me because I tried 3 different PC to make it work (H/W and OS problems before Kmotion and Mach3 works flawlessly)

I'm not sure to fully understand your question "The Destinations in the KMotion | Axis Screen change. Do they for you?"
My axis are wired as this :
Ch0 => axe Z
Ch1 => axe Y
Ch2 => axe X
Ch4 not wired now !

I confirm KMotionCNC works except Z axis movment is inverted.

I will be at the FabLAb thursday with the machine to do tests

Many thanks
Best regards
Pierre

User avatar
TomKerekes
Posts: 2861
Joined: Mon Dec 04, 2017 1:49 am

Re: Motor don't work in Mach3

Post by TomKerekes » Mon Jul 07, 2025 5:03 pm

Hi Pierre,
I don't have Servo nor Encoder, I'm driving Stepper motor in open loop
That's what I suspected. But the Init3FabLab.c file you sent me contains:

Code: Select all

	ch0->InputMode=ENCODER_MODE;
	ch0->OutputMode=DAC_SERVO_MODE;
Which is for analog servo motors, not Step/Direction Drives. If you use that with Mach3 or KMotionCNC it will not work. If KMotionCNC is working you must be using something else.
I'm not sure to fully understand your question "The Destinations in the KMotion | Axis Screen change. Do they for you?"
Run KMotion.exe. Open the Axis Screen. When you Jog in Mach3 do the Destination values for the corresponding axis change?

Dest.png
Regards,

Tom Kerekes
Dynomotion, Inc.

Platax
Posts: 6
Joined: Thu Jul 03, 2025 11:50 am

Re: Motor don't work in Mach3

Post by Platax » Thu Jul 10, 2025 5:21 pm

Hi Tom
I I try to launch KMotion while running Mach3 I get an error : "unable to connect KMotion server"
Whith the previous ini file I send you, I can run both together.

When I use "C:\KMotion5.3.7\C Programs\InitStepDir3Axis.c" in Mach3 motors don't move. I think this file is more adequate for initialization of my stepper configuration. But I get error KMotion server.
Regards
Pierre

User avatar
TomKerekes
Posts: 2861
Joined: Mon Dec 04, 2017 1:49 am

Re: Motor don't work in Mach3

Post by TomKerekes » Sat Jul 12, 2025 9:07 pm

I I try to launch KMotion while running Mach3 I get an error : "unable to connect KMotion server"
Whith the previous ini file I send you, I can run both together.
Strange. I just tried it with Version 5.4.0 without problems. Not sure what .ini file you are referring to. C Program? That shouldn't make any difference.

Maybe you are mixing Version of KMotion? When you install KMotion and select to install the plugin for Mach3 that Version gets associated with Mach3 so Mach3 will be using that Version. You must run KMotion.exe from that Version. What was the last Version you installed the Mach3 Plugin with?

Maybe you should just install the latest 5.4.0 plugin. Then run KMotion from 5.4.0 to see if it works.

When I use "C:\KMotion5.3.7\C Programs\InitStepDir3Axis.c" in Mach3 motors don't move. I think this file is more adequate for initialization of my stepper configuration.
It configures as Step/Direction mode which is more appropriate for you. But may be the wrong mode regarding TTL or Open Collector drive.

Please use the same Initialization c file that works with KMotionCNC.

But I get error KMotion server.
Like I said earlier this is very strange as what initialization file you use should have nothing to do with KMotionServer. I suspect you are running a different version of KMotion to use the other file?
Regards,

Tom Kerekes
Dynomotion, Inc.

Platax
Posts: 6
Joined: Thu Jul 03, 2025 11:50 am

Re: Motor don't work in Mach3

Post by Platax » Thu Jul 17, 2025 12:12 pm

Hello TOM
You are right my init file was trying to launch an old version (3.6) of KMotion somewhere on my hard disk, I uninstalled it and now I get the error msg : Missing MFC140.dll .
After reinstallation (3.7 in admin mode) I have the same error ; I'm supposed to search this dll on the web and copy this dll manualy in KMotion directory ?
It seem strange for me to have to modify what the installer did.
Regards Pierre

Platax
Posts: 6
Joined: Thu Jul 03, 2025 11:50 am

Re: Motor don't work in Mach3

Post by Platax » Thu Jul 17, 2025 2:41 pm

Update :
After reinstalling MFC redistribuable I have no more error, I'm now trying to make it work starting from "InitStepDir3Axis.c" but only Z axis move when I jog X axis.

Post Reply