Hello Guest it is March 28, 2024, 07:56:28 AM

Author Topic: MPG Setup ????  (Read 4978 times)

0 Members and 1 Guest are viewing this topic.

MPG Setup ????
« on: May 15, 2015, 09:25:56 AM »
I have an MPG that I want to work with Mach 4.  I am using an Ethernet Smooth Stepper (ESS).  Under the ESS I/O configuration, I have my 2 input pins set to MPG/Enc 0-A and MPG/Enc 0-B.  From there I do not know what I need to do to get axis movement.  Eventually I will have a pendant for the machine so I can set up in the PLC script the inputs for axis selection and jogging speed/mode.  But for now I need to know just how to get movement via MPG wheel.  
-Chad
« Last Edit: May 15, 2015, 09:28:17 AM by Cbyrdtopper »
Chad Byrd

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: MPG Setup ????
« Reply #1 on: May 15, 2015, 10:16:33 AM »
I know Greg had plans for adding MPG support to the ESS but I am not sure if he has yet. You may want to ask him.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: MPG Setup ????
« Reply #2 on: May 15, 2015, 11:01:00 AM »
In Mach 4 configuration do I need to do anything to setup the MPG?  That's more along the lines of what I was asking, sorry.  I haven't seen anything in Mach 4 that does anything to do with reading inputs from the MPG.
-Chad
Chad Byrd

Offline TimGS

*
  •  108 108
    • View Profile
Re: MPG Setup ????
« Reply #3 on: May 28, 2015, 02:04:11 PM »
I have the MPG wheel working with the ESS...

Just trying to get some feedback from Brian B before I post it to the forum.
Re: MPG Setup ????
« Reply #4 on: May 29, 2015, 08:28:17 AM »
Awesome TimGS! 
Chad Byrd

Offline TimGS

*
  •  108 108
    • View Profile
Re: MPG Setup ????
« Reply #5 on: May 29, 2015, 09:01:41 AM »
Look at this post...Jogging/Pendant Interface-What is the best way? Ramblings ... I put some code there.  You can get an MPG working.
Re: MPG Setup ????
« Reply #6 on: May 29, 2015, 12:44:09 PM »
Thanks TimGS!  I'll give it a look.  I'll be able to do some testing when I'm finished with a machine I'm working on.  I really want to get Mach 4 put on it.  Still have a little ways to go to get an understanding of Mach 4 and especially Lua.
Chad Byrd

Offline TimGS

*
  •  108 108
    • View Profile
Re: MPG Setup ????
« Reply #7 on: May 29, 2015, 12:59:33 PM »
Yes it does....Lua is kind of nice loose language.  If you know c/c++ you will be able to figure it out.  There is also a lot of online Lua manuals...just Google Lua.

One other note:  Don't forget to configure the MPG connections to the ESS within the Plugin ESS configuration inputs.  The names are predefined by the ESS Plugin; you will find them in the pulldown.  You only need to use the MPG part of the script code that I wrote.  You can use the <Jog Cycle Inc> button on the screen to control the MPG increment.  You might have to change the MPG Counts per increment in the script; mine was equal to 4.  Look under the defaults in the beginning part of the script.