m5i20 (hostmot2) basic setup

More
31 Oct 2009 06:54 - 31 Oct 2009 06:55 #1064 by pdv
Hi everybody,

I'm trying to help my brother setup a machine with EMC2 and an m5i20 board. He has 4 machines and we are trying to implement this. He is a machine-guy and I'm a Linux admin. He handles the electronic and mechanical side and I'm helping him with the IT side.

I would like to confirm the basic steps of setting up his servo Lathe:

1. I loaded the hostmot2 driver by editing the m5i20_io.hal file (seems to work ok - dmesg looks good).

For the pin configuration, do I now need to edit the .hal file or the .PIN (firmware) file? Do I need to create a symbolic link for this file in /lib/firmware/hm2-<myedited>?

Do I need to change anything for the Watchdog? This was an EMC2 installation (off the CD).

How do we test it? Do we just wire the lathe or can we use an electronic meter or something to test whether output is happening?

If I know which files to edit, I'm sure we're 99% there.

Thanks,
Peet
Last edit: 31 Oct 2009 06:55 by pdv.

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

More
01 Nov 2009 13:07 #1066 by BigJohnT
Hi Peet,

I would not use m5i20. EMC 2.4 includes the HostMot2 driver for the Mesa Anything I/O cards and is much better. You can get 2.4 now as a dev version. It is in use by a lot of folks right now.

wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Installing_EMC2

I use a run in place version of 2.4 for my plasma cutter with a 5i20. When 2.4 comes out in the spring I'll do a switch to the installed version which will be on Ubuntu 10.04 I think.

John

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

More
02 Nov 2009 13:45 #1077 by pdv
Replied by pdv on topic Re:m5i20 (hostmot2) basic setup
Thanks John,

As far as I know, we are using the hostmot2 driver (loadrt hostmot2).

I'm more concerned with how to add pin configurations. My brother wants to have EMC2 control the spindle of the lathe, which involves a clutch and other things. So we need to know in which file to edit/add the pin assignments.

Regards,
Peet

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

More
02 Nov 2009 21:44 #1078 by BigJohnT
Peet,

Sorry I misread your question... To change the components used you edit the ini file line:

loadrt hm2_pci config="firmware=hm2/5i20/SVST8_4.BIT num_encoders=3 num_pwmgens=3 num_stepgens=1"

When you remove unneeded compontents you get the GPIO back that the component was using.

www.linuxcnc.org/docview/devel/html//drivers_hostmot2.html#r1_4

These can be used as desired. Now you mention a clutch and I assume you need to change gears. There is a gear change component and I'm not to familar with but it is here.

www.linuxcnc.org/docview/devel/html//man/man9/gearchange.9.html

As for making the connections with pins and components you do that in the yourconfigname.hal or custom.hal or postgui.hal. If you copied a standard config and are working with that then make your changes in yourconfigname.hal. If your working with a PNCConf generated file and want to go back to PNCConf to make changes then use the custom.hal for your additionl connections. If you need to wait for the GUI to load before creating pins use the postgui.hal file as it is loaded after the GUI.

Some good reading material on the above.

www.linuxcnc.org/docview/devel/html//hal_basic_hal.html
www.linuxcnc.org/docview/devel/html//drivers_hostmot2.html
www.linuxcnc.org/docview/devel/html//examples_spindle.html

and all the man pages are at the bottom of this link (I know you know what they are but without a list to look at you have no idea what might be out there) for Commands and userspace components and Realtime components and kernel modules.

www.linuxcnc.org/docview/devel/html/

Regards
John

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

More
03 Nov 2009 06:08 #1081 by pdv
Replied by pdv on topic Re:m5i20 (hostmot2) basic setup
Hi John,

Thank you very much for taking the time to explain. This is exactly what I was looking for. Now we can get to work. Sometimes a few pointers make all the difference.

Regards,
Peet

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

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