Mesa 7i76e - adding MPG for lathe

More
03 Dec 2017 22:13 #102628 by andypugh
The MPGs will exist if you set the 7i76 smart-serial mode to one that includes MPG encoders.
(Mode 2, according to page 22 of www.mesanet.com/pdf/parallel/7i76eman.pdf )

As far as I can see there is no way to set the sserial mode in PnCConf, so it appears that you will have to manually edit the INI file.
In the HAL file, near the top you probably have something like
loadrt hm2_eth board_ip="192.168.1.121" config="firmware=hm2/7i76/7i76e.BIT num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=00xxxx"

You need to edit the "sserial_port_0="part to be 02xxxxxx, ie
loadrt hm2_eth board_ip="192.168.1.121" config="num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=02xxxx"

(You don't _have_ to delete the firmware reference, but neither is there any point in it being there with a 7i76E)

You will then need to further edit the HAL file to use the encoders, but before you do that you can check that they work with Halmeter (machine->halmeter in the Axis GUI). You should be able to find some "hm2_7i76.0....enc0" type pins to watch.

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

More
03 Dec 2017 22:22 #102630 by rodw

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


Daniel,

2 posts on this page of my build
forum.linuxcnc.org/show-your-stuff/32029...utter-build?start=20

Covers everything you need to know about how to add an encoder for a single axis (eg with no axis select switch
forum.linuxcnc.org/show-your-stuff/32029...utter-build?start=20

Andy's example should work but it is only enabling one encoder with
num_encoders=1

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

More
03 Dec 2017 22:45 #102634 by andypugh
num_encoders has no influence on the mpg encoders (which are smart-serial devices)

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

More
05 Dec 2017 21:09 #102704 by Gommiswald
Hi Rod
Thank you very much. I'll try it next friday and then I can give you a feedback.
Daniel

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

More
17 Dec 2017 19:31 #103235 by Gommiswald
Hi andypugh
Thank for your answer. I edited the hal file and now in the halmeter I get correct signals. Now the question is: how can I assign the mpg in the hal file to the axes? Maybe you have an example. That would be great. And thank you very much for your effort!
Daniel

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

More
17 Dec 2017 21:03 #103243 by rodw
Now you just need to follow my example I posted earlier.

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

More
17 Dec 2017 21:09 #103244 by andypugh
This is what I have in my Lathe HAL file.
net selected-jog-incr    <=   touchy.jog.wheel.increment
net selected-jog-incr joint.0.jog-scale axis.x.jog-scale joint.1.jog-scale axis.z.jog-scale
net jog-x-counts joint.0.jog-counts axis.x.jog-counts <= hm2_7i73.0092.enc2.count
net jog-z-counts joint.1.jog-counts axis.z.jog-counts <= hm2_7i73.0092.enc3.count
setp axis.x.jog-enable 1
setp axis.z.jog-enable 1

You would need to change the "7i73" part, obviously. And your jog-inrement source is probably not Touchy?

Because i have a separate wheel for X and Z the "enable"s are set to 1. If you have a selector switch then that would have to be set to choose the axis to jog.

Note also that I am using LinuxCNC v2.8 so I need to hook up both the axis.X and the joint.0

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

More
19 Dec 2017 21:29 #103362 by Gommiswald
Hi Rod
Thank you and I have seen your postings. Very helpful and I think that I will succeed.
Do you have an idea on how to implement a feed override with the 7i76e. I think it should work with an 10k Poti on input 00. But it is always the same: How to configure the HAL?
Daniel

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

More
19 Dec 2017 22:12 #103367 by rodw
I think I answered your question elsewhere.
It is a very good idea. with say a 0-24v analog input divide the analog value by 12 to give a 0-200% range. You can use mult2 to do this using 1/12.

Then scale and offset the result with the scale component. I am sure if you can do this, you will be considered a HAL expert!

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

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