GUIDE FOR SETTING UP MPG2/3/4 OVER MODBUS USING MACH3

For this example we will use an M1-Modbus Serial Server with an M13 Modbus Expansion Board which comes with a DB25 connector that receives the pendant.  Any other Modbus I/O device can be used but it must be able to read encoder count, a timer tick would be good to have for smoother jogging, but it is not required.

This setup and brains is for an MPG4, but can be used for for an MPG2 or MPG3.  The only difference between MPG2/3 and MPG3 is that MPG3 has more wires and connections for 5th and 6th axis.

The I/Os and addresses used for the example are the following:

MPG2***

WIRE COLOR

CONNECTION

I/O

Modbus Reg*

FUNCTION

1

Red

USB +5V

 

 

Encoder +5vdc

2

Black

USB GND

 

 

Encoder GND

3

Green

DB25-2

I

2000**

MPG CH A

4

Purple

DB25-3

I

2001**

MPG CH B

5

Green/Black

DB25-1

O

1000

Jog “ON” LED +5vdc

6

White/Black

GND

 

 

Jog “ON” LED GND

7

Yellow

DB25-4

I

2018

Select Axis X

8

Yellow/Black

DB25-5

I

2017

Select Axis Y

9

Brown

DB25-6

I

2016

Select Axis Z

10

Brown/Black

DB25-7

I

2015

Select Axis 4

11

Gray

DB25-8

I

2014

X1

12

Gray/Black

DB25-9

I

2013

X10

13

DB25-10

DB25-10

I

2012

X100

14

Orange

+5vdc

 

 

COM for Selector switches.

15

Light Blue

DB25-15

I

2023

E-Stop

16

Light Blue/Black

+5vdc

 

 

COM for E-Stop.

17 Black/Red Not Used      
18 Pink DB25-12 I 2022 Select Axis 5
19 Pink/Black DB25-13 I 2021 Select Axis 6

* These are the I/O functions selected for the Sample XML and Brain files.  Users can reassign this depending on the address of the Modbus I/O device used.

** The M1 core allows input for up to 6 encoders.  These encoders are connected where inputs for address 2000 to 2011 would go.  The output address for the encoders starts at 5000, where 5000 is a 2 mS timer tick and encoders 1 would be 5001.  So for this example we are going to use address 5000 fro the timer tick and 5001 for MPG1 encoder count.

*** Each wire is connected to each pin of the Pendant's DB25 connector, that is, wire 1 is connected to pin1, wire 2 to pin2, and so on.

Steps for configuring Mach3:

1. Under Config / Ports & Pins Enable Serial Modbus and select to use the Modbus Plug in.

2. Under Function Cfg's / Setup Serial Modbus Control.

3. Download the Brain files "MPG4_M13Brains.zip", expand them and copy them into: "C:\Mach3\Brains".  Then enable the new brains.  The compressed file contains a total of 5 Brains:

I. M13_Axis_JogRes_Selector.brn: Handles Axis selection and Jog resolution.  It also enables/disables JOG option no axis is or is not selected.

II. M13_Enable-Disable.brn: It handles the enable/disable button.

III. M13_E-Stop_W_AutoReset.brn:  It handles E-STOP.  This brain will automatically reset mach3 when the e-stop button is pulled out.

IV. M13_E-Stop_WO_AutoReset.brn: This Brain handles E-Stop.  It requires that the user press the "RESET" button in the screen in order to reset mach3.

V. M13_JogWheel.brn: It handles the Jog wheel.

Each brain can be enables and run independently.  For example the can select which E-STOP brain to use according the what the user prefers to use.  Many users prefer not to use the enable button, so they do not need to enable this brain.  Having each brain run independently also eases customizing the brains by the users.  A sample XML file is also provided.

6. Configure the increment to be used under: Config / General Configuration.

Brains that allow for using axis 5 and 6 for adjusting Feedrate Override and Spindle Speed can be found HERE *:  With this brains the pendant will handle axis 1-4 as the other brains, but when axis 5 or 6 are selected, jog will be disabled and the hand wheel will adjust feedrate or spindle speed override.