Dear all,
ModBus communication using ARDUINO UNO and mach3 CNC Analyzer.
For this we used simple ModBus slave library. Here are the screenshots for easy
understanding and configuration of mach3.
Download and install the mach 3 CNC Analyzer.
Open your session profile in mach3mill.
Open the ports and pins window by clicking on the config tab on the left top corner of the
mach3 window. In this select the port enable, modBus input output support and
also the ModBus plug-in support after that click on the OK tab.
After this select setup serial modBus in the cofig’s function next to config tab. Here enable the config tab
by clicking on it and give the names as shown in the below figure. PORT number is the one which your Arduino
is connected, address modBus is the address
of the variable which you are going to read, direction input output is the IO for modBus, ensure that you have
mentioned the correct baud rate and 8-2-N: 1 start bit, 8 data bits, 2 stop
bits.
Now click on the test modBus
tab on the right top corner of the window. You can see another window.
Give the correct slave id(other than zero), starting address, total number of register you need to access from the Arduino and click on the open port now it will display no error message in the status bar. Click on the read tab to read the register values.
Now open the brain editor window in the operator tab. A new window will open when you click on the + tab. In this select the modBus and configure the parameters as shown in the below image. Similarly add other input, save the file with extension of .brn and close the window
In a dialogue box it will ask whether you want to terminate the label or not.
Open the brain control window in the operator tab
Click on all brains tab it will display the previously
saved files and enable the correct file by selecting on it. Finally click on
the view brain tab.
hi sir
ReplyDeletei have a arduino uno board and compile whit
when i want use this by Macht3 Application i cant config modbus
my com port option is 8-1-n
please help me to configure true this option on mach3
thank u