

– In Serial Port Monitor you will see a lot of Mach3 requests and Arduino replies. – Arduino TX and RX LEDs will blink very fast. – Mach3 in “ModBus InputOutput support” will show ‘No error’ in this example we only read, don't check anything Serial.begin(9600) // Init serial communicationĭigitalWrite(pin, HIGH) // Turn on pullup resistor Please use this code only for test because no have any safeguard! Upload this simple code who emulate ModBus slave to Arduino. If you don’t see exactly this go back and try to find problem.Īnd don’t continue until this step no work correctly! Any error bring no working project.ġ. – RX LED Arduino must blink too any half second. Don’t try now understand what this mean in a moment. Because default timeout settings is 500ms you will see that any half second Mach3 send to Arduino this request “01 04 00 00 00 01 31 CA”. – Minimize Mach3 and go to Serial Port Monitor. Arduino no programmed to receive command and reply.


– Mach3 in ModBus status show ‘Receive timeout’. Now time for first checking break you to sure that all until now is correct. – Go to Setup Serial ModBus control and set parameters exactly thereby: Mach3 ModBus and Arduino Run Mach3, go to Config, Ports&Pins and mark “ModBus InputOutput support”. Here you will see ModBus communication!ģ. Run Serial Port Monitor, go to New Session > Serial Port Monitor > Choose COM port(COM5), mark Request View and click “OK”ĭon’t close Serial Port Monitor. My Arduino using COM5 so recommend change your to using the same COM Port.Ģ. Connect Arduino to PC and upload any blank sketch or Blink Led example. Part I: “Hello Word” or “Running Cycle Start button from Arduino Input pin”.ġ. PC with Windows XP and Mach3 because software who I using for monitoring ModBus communication no support new versions Windows. Arduino board (I using Arduino Duemilanove but you can use any other Arduino board)Ģ. PLEASE DON’T TEST USING MACH3 CONNECTED TO WORKING MACHINE!ġ. So I try share here step by step all my experiments when learn Mach3 ModBus and because don’t know well Mach3 will thankful all who join and test.

Zafarsalam too have good tutorial who I read carefully. Is very well documented, work but is too complicated for me in a moment. For that last several days I read many posts about this. My project is add some external Inputs and Outputs to Mach3 using Arduino. My experiments with Mach3 ModBus and Arduino
