Hello Guest it is December 05, 2024, 11:28:02 AM

Author Topic: MODBUS and Mach3 Signals  (Read 8557 times)

0 Members and 1 Guest are viewing this topic.

MODBUS and Mach3 Signals
« on: March 11, 2019, 02:48:48 PM »
Hi everyone,

I am trying to connect an Arduino Uno with CNC Shield with Mach3 through usb.
I can't find how can I transmit signals for step/dir from Mach3 to Arduino.
How can I find a way to do this?

I have also an Arduino Mega 2560 if needed.

Thank you in advance

Offline ZASto

*
  •  426 426
Re: MODBUS and Mach3 Signals
« Reply #1 on: March 11, 2019, 04:13:02 PM »
You can not send step/dir through MODBUS.
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.
Re: MODBUS and Mach3 Signals
« Reply #2 on: March 11, 2019, 04:52:09 PM »
I am using modbus slave not grbl upload. I want to know how/ where I can find those signals in Mach3.
Re: MODBUS and Mach3 Signals
« Reply #3 on: March 12, 2019, 01:36:49 AM »
Hi,

Quote
I can't find how can I transmit signals for step/dir from Mach3 to Arduino.

That is not possible. USB is a serial communication protocol and so any timing of step/dir signals gets hoelessly
screwed up.

You might ask 'well how do others do it, I've seen USB connected devices producing step/dir pulses?'

The reason is because Mach does not send step/dir pulses to a USB board, it sends  P(osition)V(elocity) over T(ime)
data from its trajectory planner. That is it sends a stream of numeric data and the USB CONVERTS that numeric data
to PULSE STREAMS which it presents to the outside world in PARALLEL. That makes the USB device an external motion
controller.

You could make an Arduino into an external motion controller, but it would be challenging. Firstly the Arduino is way
too small and lacking in power. Most external controllers have a mid-level FPGA and/or a 32bit microcontroller either
or both of which make an Arduino look like  a minnow.
You would have to code a plugin (that lives on the PC) in C++ to drive the Arduino (or other control device).
If you were going to all that trouble you wouldn't bother with Mach3, its pretty old and is now unsupported. You would
have to use a really old and creaky version of Visual Studio. You would in preference use Mach4 which is at least current
and has a well developed SDK. You would need to sign a N(on)D(isclosure)A(rgeement) with NFS but then you would
get all the inside info you need.

Why don't you use an external motion controller like an Ethernet SmoothStepper directly? Note Mach3 and Mach4 have MODBUS
plugins, but the Mach4 plugin IS SO MUCH EASIER TO USE AND UNDERSTAND. It still wont communicate step/dir
in realtime but it is a dream to program and use.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: MODBUS and Mach3 Signals
« Reply #4 on: March 12, 2019, 06:31:59 AM »
Why do you say that Mach3is old? Just because the developer doesn't work to upgrade Mach3 and passed on Mach5 is not a reason for me to left aside this"old and deprecated" soft. Maybe I can't afford to buy Mach4 and I own Mach3. So it is a big mistake to try something new on old soft? I don't need "big force", I just want to try something new, something which can make me proud of myself.
If Arduino works with Grbl and other software, why do you want to make me to abort what am I going to do?
No disrespect, but it is a offense to ask something what I don't know?
I just wanted to know how Mach3 send axe's impulses for moving. I will use Mach3 more, even if you say that is old. Not saying that Mach4 is not good, I just can't afford it.
Until now I have done many fine things with "old Mac3".... And I will keep doing...

All respect for you and all Mach(3-4) user's....
Greetings from Romania.
Re: MODBUS and Mach3 Signals
« Reply #5 on: March 12, 2019, 06:49:59 AM »
Hi,

Quote
If Arduino works with Grbl and other software, why do you want to make me to abort what am I going to do?

You're right....go for your life. Good luck.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Tweakie.CNC

*
  • *
  •  9,263 9,263
  • Super Kitty
Re: MODBUS and Mach3 Signals
« Reply #6 on: March 12, 2019, 07:16:35 AM »
Quote
Until now I have done many fine things with "old Mac3".... And I will keep doing...

Excellent  ;)
PEACE
Re: MODBUS and Mach3 Signals
« Reply #7 on: March 12, 2019, 07:19:54 AM »
Now I realize that no one will help me with my "problem". Thanks....

Offline Tweakie.CNC

*
  • *
  •  9,263 9,263
  • Super Kitty
Re: MODBUS and Mach3 Signals
« Reply #8 on: March 12, 2019, 08:36:12 AM »
Now I realize that no one will help me with my "problem". Thanks....

That is just not true.
There are many here that are willing to help - it is just that you are asking for something that is just not practical.

Tweakie.
PEACE