Hello Guest it is June 14, 2025, 07:31:01 PM

Author Topic: Modbus for beginner ???  (Read 2004 times)

0 Members and 1 Guest are viewing this topic.

Modbus for beginner ???
« on: April 15, 2025, 12:47:37 PM »
Hi,sorry for my bad english...
im want solve my problem with mach3 to arduino via Modbus from usb port....
Im want use for send a istruction for use an port pwm....
im not undestand how config mach3 to output a code,variable,data or other function

the mission is use this system(Modbus) for comand a additional spindle :
when on my gcode im write  S3000M103 ,arduino output at 50% and rotation Cw
when on my gcode im write  S6000M103 ,arduino output at 100% and rotation Cw

when on my gcode im write  S3000M103 ,arduino output at 50% and rotation CCw
when on my gcode im write  S6000M103 ,arduino output at 100% and rotation CCw
when on my gcode im write  M105 ,arduino stop a motor


im know if im make a macro (M103) inside this are a istruction for modbus to send at arduino S3000 and another istruction for M103...
if the system read on Gcode S3000 M103  >> macro M103 >> data Modbus to arduino on variable 3000 and variable 103....>> when arduino "read" 3000 and 103 ,the arduino code make the "action" programmed for run the additional spindle at 3000 rpm...
This im think if the system work,but im not very sure of that...is possible help me ??

Re: Modbus for beginner ???
« Reply #1 on: April 15, 2025, 04:31:37 PM »
Hi,
Have a look at this article and see if it helps and answers your questions.

https://www.homanndesigns.com/pdfs/Using_Modbus_with_Mach3.pdf

Cheers
Peter
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com