Hello Guest it is November 19, 2019, 03:29:17 AM

Author Topic: MODBUS and Mach3 Signals  (Read 855 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

Online ZASto

*
  •  185 185
    • View Profile
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
My wife left with my best friend...
     and I miss him!
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
My wife left with my best friend...
     and I miss him!

Offline Tweakie.CNC

*
  • *
  •  8,002 8,002
  • Super Kitty
    • View Profile
    • Tweakie.CNC
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  ;)
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
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

*
  • *
  •  8,002 8,002
  • Super Kitty
    • View Profile
    • Tweakie.CNC
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.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
Re: MODBUS and Mach3 Signals
« Reply #9 on: April 26, 2019, 07:05:11 AM »
The reason is on the grounds that Mach does not send step/dir heartbeats to a USB board, it sends P(osition)V(elocity) over T(ime)

information from its direction organizer. That is it sends a surge of numeric information and the USB CONVERTS that numeric information

to PULSE STREAMS which it presents to the outside world in PARALLEL. That makes the USB gadget an outside movement

controller.

You could make an Arduino into an outer movement controller, however it would challenge. Right off the bat the Arduino is way

excessively little and ailing in power. Most outside controllers have a mid-level FPGA as well as a 32bit microcontroller either

or on the other hand the two of which make an Arduino resemble a minnow.