Hello Guest it is March 28, 2024, 08:34:56 PM

Author Topic: Mach4 and Integra 7766 Multiple MPG help please  (Read 871 times)

0 Members and 1 Guest are viewing this topic.

Mach4 and Integra 7766 Multiple MPG help please
« on: July 05, 2020, 02:23:16 PM »
I need help

Mach4 and Integra 7766 controller

I want to use multiple handwheel MPGs to jog my machine.

I want one handwheel on each axis X, Y and Z.

right now I have handwheels connected to Encoders 7 and 8. I am able to see the values change in the Integra diagnostic screen.

If I enable two MPGs in the MPG tab of Mach4 they both only jog the X axis.

Am I trying to do the impossible?

Any help is appreciated.

Thanks in advance,
L
Re: Mach4 and Integra 7766 Multiple MPG help please
« Reply #1 on: July 09, 2020, 04:52:07 AM »
It's possible I've done it before. Maybe Mach4 just doesn't know which axis is selected.

You can use the Hicon plugin to define IO for MPG's 0-2.

Use that to define an input for the axis selection for whatever MPG encoder you want for what axis.

So if you want Mach4 MPG0 to control the x-axis then define an input for that axis in the HiCON plugin config.

OR

If you are comfortable with LUA scripting then open the screen load function in the editor and you can hard code the axes for the MPG in there if you don't want to use an input to control the axis selection.

Code: [Select]
-- the input to the mcMpgSetAxis func is: inst, mpg encoder#, axis#
mc.mcMpgSetAxis(inst, 0, 0) -- this sets MPG 0 to axis 0
mc.mcMpgSetAxis(inst, 1, 2) -- this sets MPG 1 to axis 2
mc.mcMpgSetAxis(inst, 2, 1) -- this sets MPG 2 to axis 1
Re: Mach4 and Integra 7766 Multiple MPG help please
« Reply #2 on: July 09, 2020, 07:28:45 AM »
Thank you for your reply.

You are correct that Mach4 didn't understand which axis was what input. I got 3 handwheel MPG's connected to three axis.

Now, I wonder if I can add a forth MPG and axis.

I'm just getting started looking into Lua. I suspect I should be able to read a 4th handwheel with a script or module and change the A axis but I'm not sure.

Thanks again