Mesa 7i76e - adding MPG for lathe

More
16 Jul 2017 18:54 #95855 by JackBerkhout
Hi,
I'm using a Mesa 7i76e and LinuxCNC to convert a Emco Compact 5 CNC lathe.

In a test, a connected stepper works just fine.

I'm still new to LinuxCNC, but the next step would be to test if I can use an MPG, and use it to jog the X axis or Z axis.
So I do need to use two buttons to select which axis I want to jog with the MPG, and a few to select the step size for each 'click' of the MPG.
How could I do such a thing?
I wired the A and B of the MPG to TB5 pins 1 and 2.
And then I tried this example to start with:
gnipsel.com/linuxcnc/hardware/mpg.html

But I used hm2_7i76e.0.7i76.0.0.enc0.count

However the debug information then shows
Pin 'hm2_7i76e.0.7i76.0.0.enc0.count' does not exist.

How can I properly setup one MPG and select it for x or z axis?

Kind regards,
Jack.

Please Log in or Create an account to join the conversation.

More
16 Jul 2017 19:15 #95856 by PCW

Pin 'hm2_7i76e.0.7i76.0.0.enc0.count' does not exist.


Likely means that you don't have field power (orange connector)
and/or the the sserial mode is not set to 2 (sserial_port_0=20xx in driver config string)

Please Log in or Create an account to join the conversation.

More
16 Jul 2017 19:39 - 16 Jul 2017 20:45 #95859 by JackBerkhout
I now supplied 12V on the orange filed power connector:
pin 8 GROUND (top) GND
pin 5 VIN to + 12V

The error is gone! I tested it, I need both the field power and the sserial change like what you said!

Hal meter now shows it too, but first the value did stay at value 0, when turning the MPG.
Then connecting the two grounds like here helped:
forum.linuxcnc.org/27-driver-boards/2703...g-encoder-connection
So I did not have a common ground between the MPG and the Field Power at first, what caused the counter not to change when turning the MPG.

It counts now, when I turn the MPG, but the motor doesn't turn.

This is what was in the example code:
jog.hal (called from the ini file)
net jog-count <= hm2_7i76e.0.7i76.0.0.enc0.count
net jog-count => axis.0.jog-counts
net jog-count => axis.1.jog-counts
net jog-count => axis.2.jog-counts

I can see jog-count changing when turning the MPG and also pins axis.0.jog-counts, axis.1.jog-counts, and axis.2.jog-counts.
So the above code seems to work.
The motor turns if I run the gcode, but not if I turn the MPG. Strange, what could be the problem?
Last edit: 16 Jul 2017 20:45 by JackBerkhout.

Please Log in or Create an account to join the conversation.

More
16 Jul 2017 21:06 #95864 by rodw
If you have a look in my hal file I posted on another one of your threads, There is a complete example of a multi axis single encoder setup.
Also on my "Rods Spaceship Plasma" thread, (search for it) there is a worked example of using an encoder with just one axis with the 7i76e. the 7i76e has two encoder inputs so it would be ideal for a lathe.

Glad you are making progress

Please Log in or Create an account to join the conversation.

More
17 Jul 2017 15:49 #95908 by andypugh

So I do need to use two buttons to select which axis I want to jog with the MPG, and a few to select the step size for each 'click' of the MPG.


Consider having two MPGs, one for each axis. It's a lot more convenient on a lathe than switching between them.
(I mounted both of mine on the saddle apron, but I suspect that would not be room on a Compact 5)

Please Log in or Create an account to join the conversation.

More
17 Jul 2017 16:05 #95914 by JackBerkhout
Hi Rod, Andy,
thank you very much for the advice!
Now I ordered one extra MPG (aliexpress).
Tonight, I will try to find the examples of Rod.
I will let you know how that worked...
Regards,
Jack.

Please Log in or Create an account to join the conversation.

More
17 Jul 2017 16:55 #95926 by JackBerkhout
Hi Rod,
wow, quickly I went through your "Rods Spaceship Plasma" thread.
You did an amazing job! You must be an expert now.
Lots to study and learn from you.
BTW, how was your finger "repaired" finally? Hope all is fine by now...
Kind regards,
Jack.

Please Log in or Create an account to join the conversation.

More
17 Jul 2017 17:07 #95930 by JackBerkhout
Hi Rod,
I'm afraid I can't find my thread where you posted your hal file, where is a complete example of a multi axis single encoder setup. :-(
OK, first dinner, I'm very hungry, that doesn't help searching... :-)
BRB
Regards,
Jack.

Please Log in or Create an account to join the conversation.

More
17 Jul 2017 20:22 #95939 by rodw

Hi Rod,
wow, quickly I went through your "Rods Spaceship Plasma" thread.
You did an amazing job! You must be an expert now.
Lots to study and learn from you.
BTW, how was your finger "repaired" finally? Hope all is fine by now...
Kind regards,
Jack.


Jack, thanks its almost ready to cut something but I broke it on the weekend tidying up the wiring. Yes my finger is 100% now

This page on my build has a worked example for a single axis MPG. Good luck!
forum.linuxcnc.org/show-your-stuff/32029...utter-build?start=20

Here is my hal file. Around line 198 is the multi axis version for a single MPG but you can use Mux4 not mux8. This is for my wireless pendant.

File Attachment:

File Name: Spaceship_...17-2.hal
File Size:21 KB
Attachments:
The following user(s) said Thank You: JackBerkhout

Please Log in or Create an account to join the conversation.

More
03 Dec 2017 20:34 #102626 by Gommiswald
Hi Rod
I have seen you worked a lot on this 7i76e MESA card. I'm going to use this MESA card for a lathe and I want to add 2 MPG. But now - how to change the configuration? In den PNCCONF it is not possible to add these 2 MPG to an input as proposed in the wiring diagram here on the forum. Of course - it is necessary to use the spindle encoder part for lathe spindle and that works fine. But I don't get to realise the configuration for the MPG's. I installed the MPG's on TB5 1-4. - Have I to change the .hal file manually (that would not be a nice work, because I have no experience in doing that)?
An idea? Thanks a lot and regards from Switzerland!
DAniel

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.109 seconds
Powered by Kunena Forum