MechMate CNC Router Forum

MechMate CNC Router Forum (http://www.mechmate.com/forums/index.php)
-   CNC motion control software (http://www.mechmate.com/forums/forumdisplay.php?f=21)
-   -   Setting up EMC2 (http://www.mechmate.com/forums/showthread.php?t=1167)

servant74 Sun 16 November 2008 18:35

The "official" install instructions are at:
http://www.linuxcnc.org/content/view/21/4/lang,en/

What follows below are our layman's interpretation - copied from another thread:

If you use EMC2, DO NOT UPGRADE Linux past 8.04. I also suggest getting their downloadable live CD, and booting it. It works well, then will install. Unlike much software, EMC / linuxcnc project has decided to ONLY support the Long Term Support versions of Ubuntu. Version 6.06 and 8.04 are the current versions.

If you do a 'fresh install' of 8.04, and do not have emc2, their instructions on running the 'emc2-install.sh' script works. It basically updates apt, and adds the emc2 repository to your sources file, then issues 'apt-get install emc2'.

EMC2 is NOT in the standard distribution sources from Ubuntu, so it needs to be added to be able to get updates.

EMC2 configuration can be a little more challenging than Mach3. I would suggest staying with Mach if that is where you are now. If you are into learning or doing a DIY (or have really strange things you want to do ;) then EMC2 can be your toy.

bradm Mon 17 November 2008 06:35

If anyone wants help with EMC2, just give me a shout. I'm running it on my MechMate, on my benchtop mill, and I've been working with Linux systems since 1992 or so.

servant74 Tue 18 November 2008 08:07

Want to try or run EMC2?

For anyone that is interested, EMC2 is available on a 'LiveCD' so you can 'try before you buy' (or install in this case ;) )

www.linuxcnc.org is the site

In the left hand column, there is a 'Live-CD' link. It will download a file that is a .iso file. Use Nero or similar to write a bootable disk image to a CD.

Boot the CD and it is running. If you decide to install it on your computer (It will wipe out windows if that is already there), there is an icon on the desk top to do it for you. An internet connection is useful to put on updates.

If you want, email me privately and I will mail you a tested bootable CD for $1US (in the US) to cover postage (I am out of work now, so even little things help! - I will mail to others but again I need to cover costs). PayPal is preferred. -- this is just a service.

If you have a machine you want to install it on your machine in full to start with, you can download and install Ubuntu 8.04LTS (8.10 is the current and not supported by EMC2. EMC2 is currently only supported on the LTS or Long Term Support versions of Ubuntu). Then download the emc2-install.sh shell script and run it. It will download and install EMC2 on top of your 'fresh' Ubuntu 8.04LTS install. An internet connection is required for this install method.

I hope that helps someone.

sprayhead Sat 22 November 2008 21:31

These boys at www.guiacnc.com.br are very much experts on EMC2:

Fabio Guilli
Sir Jorge
Yuri

I believe it will be a great solution for the MM.

A bit of mimics:D and screen captures should help with the language barrier. They do speak English.

They'll be able to say: E-N-G-L-I-S-H and also T-H-E B-O-O-K I-S O-N T-H-E T-A-B-L-E.:D

Just kidding, they might be of great help actually.

I'm excited to hear about the results
Francis

YRD Fri 28 November 2008 18:26

Setting up EMC2
 
13 Attachment(s)
Gerald I will try to show how to configure EMC2 (more details here - Portuguese forum, needs registration before reading)

Please correct my English, please.

Francis (Brazilian who lives in Australia) is right: my English is very poor :o. But he is wrong: I do not know almost nothing of Linux :D.

If I can set up EMC2, you can too :cool: :eek:.

First, use Linux 8.04 and record EMC2 on DVD - .ISO

On a computer with WinXP use the LiveCD and test of Latency in Terminal (portuguese Portugal - Consolas).


The ideal is to be around 15.000. My PC is 1.000.000 (this occurs with some Intel, does not occur with AMD) and the PC (theoretically) does not serve. Not tested yet because my MM is not ready ;).


Before installing the Linux and definitively whether your PC is appropriate. Linux is more selective that the WinXP. If everything is OK, he repartition your hard drive. Use for Linux 8 GB.

In picture 1 is the Setup screen.


Here's the bottom line and enter the test result of latency (this is very important).

In picture 2 is where many errors occur. Leave for now the options on the right side disabled.


In pictures 4, 5 and 6 are the screens of settings of the axes X, Y and Z.


See that the pattern is different from standard MM:
X is Y
Y is X


Important: Use symbols for testing positive and negative the size of the table.

Image 11 is the screen where you "invoke" the previous settings, to use the program EMC2.


Picture 12 is the program EMC2. Congratulations if you come up here. To start, press the red X.


Picture 13: press the orange and enable the motors/driver.



Picture 14: press the blue button and start the machining. Congratulations. The quality of the cut is better (curves) and faster


Gerald D Fri 28 November 2008 20:00

Thank you very much Yuri!

Have made a thread for it, and moved your pictures in between the words.

This is going to be very helpful!

sprayhead Fri 28 November 2008 23:47

Awesome stuff Yuri. Thanks!

first questions now..


- To run EMC2 do you always put the Linux CD in the CD/DVD drive? or after you run the CD once it installs Linux on your HD and somehow you can choose between Linux and Windows when the computer Boots?

I really want to have a better look at the EMC2 program but I cannot get rid of windows. In the future I imagine that a dedicated PC to EMC2 is the best way to go.

PT(Voce roda o EMC2 sempre apartir do CD ou o Linux instala no HD junto com o Windows? Tem alguma tela de boot que voce escolhe se quer carregar Windows ou Linux? eu nao posso tirar windows do meu laptop, talvez no futuro um novo computador so com o Ubuntu e EMC seria o ideal.)


- So, at picture #13 there is a button that turns on the Drives/motors... does that mean that until you turn on the drives via EMC2 the Parallel port will not emit little voltages that can make your machine move unwanted?


PT( Na foto 13 tem um botao que liga os drives/motores... isso quer dizer que voce pode fazer o boot do linux/emc com a maquina ligada, sem perigo de que os motores se movam??)


- Can you tell us better what happens with Intel x AMD processors? I didn't quite understand, do you think Intel or AMD is more reliable??

PT(Intel ou AMD?)

Francis

bradm Sat 29 November 2008 07:41

The initial step is to boot the linux CD. There is then an option to install it to your hard drive. During that process, you can choose to set up your system as a dual boot setup, where you chose windows or linux each time you start.

There is some variation from system to system in the options you'll be presented during the process, as in some cases the linux installer has to change the way your disk is partitioned to create space. A normal windows install (or any other OS) allocates all the space on the disk to itself.

There are clear warnings and options to stop before taking actions that change your system, however it's always wise to have a backup of anything important before beginning such a process.

I suspect that given the relatively inexpensive cost of a PC compared to other items on the MechMate, that you'll eventually migrate towards a
dedicated machine. The type of setup that you do for a MechMate operating in a dusty shop environment doesn't necessarily lend itself to other types of computer work.

EMC features something called the "HAL" - Hardware Abstraction Layer, which allows you to map functions to pins on the parallel port. Incidentally, the HAL allows you to do lots of other interesting things in a ladder-logic type of fashion, such as mapping virtual motors and sensors for testing purposes. The two user interface functions of "Power On" and "Emergency stop" can be mapped to pins on the serial port.

For my MechMate, I have the 'power on' mapped to enable the Pin 16 watchdog charge pump for my G540, which means that until that button gets hit on the screen, the motor outputs are all disabled, and the machine cannot move.

I intend to eventually make my EStop circuit interface to an input pin so that pressing the physical EStop buttons on the machine will also cause an EStop in EMC, but at moment, my physical buttons are on a 120V loop that hold my main contactor in the on position. So the virtual EStop will cause EMC to halt all motion, and the physical EStop will power down everything, but the two are not linked. I'll likely add a relay at some point so that the physical EStops run on low voltage (12v since that's what I've got for my proxy sensors), link with the PC, and hold the relay which holds the contactor.

Either AMD or Intel are reliable, but other design factors of the motherboard of a given PC can affect the realtime latency that the machine is capable of. For example, some motherboard designs share RAM (memory) between the build in display card and the CPU (mostly Intel designs), and the slight contention for memory access can make these machines less responsive to real time events, even though the system itself has lots of CPU power. Other types of I/O devices, like soundcards, network ports, and the like can have a similar detrimental effect. This latency will control the maximum pulse rate the PC can reliably produce, and thus the ultimate maximum speed of the MechMate.

With that said, most modern PCs have way more than enough horsepower to drive a MechMate to reasonable cutting speeds. If you are obsessive about hitting very high *JOG* speeds, you make care more about locating a low latency PC.

I use EMC on my mini-mill for metal work, and that's on a 350Mhz ten year old Pentium III based system, which comfortably produces pulses for 60 IPM. On my MechMate I have about a 1Ghz system from about five years ago, and it will run my mechmate to 600+ IPM, which is useful really only for jogging. It's also pretty scary to see that sucker coming at you at a
foot a second in two dimensions with a spinning bit.

Gerald D Sat 29 November 2008 08:19

This talk of the "Linux CD" is unclear to me. It that a CD with the Linux Operating System? (I think not - ie. it is not the equivalent of a Win98 CD).

I guess that is the CD one makes from EMC2's site?

It is the Linux CD and Live-CD are one and the same?

Gerald D Sat 29 November 2008 08:33

The file that one has to download is 695MB :eek: My PC has downloaded 2.73MB so far and tells me that it has 7 hours to go! :eek::eek:

Gerald D Sat 29 November 2008 08:36

Stopped that download and went to the EU mirror instead. Now downloading from Romania at about 60% faster - only 4 hours to go!

bradm Sat 29 November 2008 09:48

As Gerald discovered, the EMC / Ubuntu CD can be found at:
http://www.linuxcnc.org/content/view/21/4/lang,en/

Most variants / derivatives of Ubuntu come in a live CD version that can be booted and run, or used to install.

The difference between the Linuxcnc version and the base version of Ubuntu is that it's been modified to have a realtime kernel to support emc, and it's preconfigured to point to the linuxcnc software repositories to download (and update) the EMC software.

You could also take any Ubuntu family release and manually add the linuxcnc repositories, get a new kernel, and install EMC, but using the preconfigured disk is easier for a dedicated PC. If you wanted a general purpose Linux PC, you might use this alternate approach.

servant74 Sat 29 November 2008 09:52

Quote:
Originally Posted by Gerald D View Post
This talk of the "Linux CD" is unclear to me. It that a CD with the Linux Operating System? (I think not - ie. it is not the equivalent of a Win98 CD).

I guess that is the CD one makes from EMC2's site?

It is the Linux CD and Live-CD are one and the same?
Gerald,

There are two different ways to do the EMC install. One is to get the 'LiveCD' from the EMC2 web site (http://www.linuxcnc.org). If you do this you will already have BOTH Linux and EMC2 available to install at one time.

The second way is to get the UBUNTU 8.04 LTS (Long Term Support) version install disk (http://www.ubuntu.com/getubuntu). Install it on your machine, with updates. But DO NOT UPGRADE to any newer version (8.10 is available currently). Then, go to

http://wiki.linuxcnc.org/cgi-bin/emc..._EMC2_packages

and follow the directions on installing EMC2. Basically download

http://linuxcnc.org/hardy/emc2-install.sh

to your desktop or somewhere you can find it.

Then run it from your command prompt in a command or terminal window (not as root).

This script will then install EMC2 for you. Then you still need to configure it using the information from a previous post.

I hope this helps a little! ... Jack

Gerald D Sat 29 November 2008 09:54

Okay, so we are talking of one CD that contains the Linux/Ubuntu/EMC2 . . . that's a bit simpler than I first thought.

Before I dedicate a machine solely to a new OS, I would like to experiment with both Windoze and Linux together on a machine. This is the area that has me the most nervous now.

YRD Sat 29 November 2008 10:00

I use WinXP and Linux in DualBoot.

As for the latency test:
Abuse of the machine, opening multiple files.
Get Tested for more than 10 minutes.
During the test does not run EMC2 (important)

YRD Thu 18 December 2008 15:33

Gerald,

Tested the EMC2?
What is your opinion about the system?
Advantages and disadvantages?

Gerald D Thu 18 December 2008 19:22

No, havn't played with EMC2 yet.

orotemo Sat 26 December 2009 22:44

EMC slave axis
 
Hello everybody, and merry Christmas.

I guess this question goes to Yuri, but if anyone knows....

Running a wide gantry is done here with two motors on the X (mach users use a as the slaved axis) as you all know. Trying to switch to EMC from mach, I ran into trouble finding the right way to achieve this.

I totally understand I can 'wire up' the X signals to the A axis pins, and this can work great on the EMC. one problem though, I must be able to home them separately, or my gantry won't be perfectly square.
Mach gracefully handles that, it moves both motors to the switched, circuit brakes, backtracks both, then only moves A, circuit break, and backtrack A. I would like to exactly mimic this behavior on EMC.

Can anyone help here?

bradm Sun 27 December 2009 06:16

Note: I use EMC2, with a single limit switch on one of the two gantry motors. In practice, the only time it gets out of square is if there is a crash, in which case I use the hard stops to realign.

I don't think that the structure of EMC2's code will allow you to exactly mimic the Mach3 algorithm unless you write a fair amount of extra code; it treats "joints" as separate entities at a low level. I do think you can get it to simultaneously and independently home the two motors. You might look at the sample configs for "Stepper-gantry" as a starting point.

YRD Sun 27 December 2009 07:09

Orotemo,

What driver are you using?

I use "Smile" :) (http://www.lolata.com.br/Smile/) and there are 04 boards to control each of the motors. In the X1 motor connection is correct but the engine X2 is the inversion of two wires allowing turning around.

As I did not understand correctly your question, I have helped. :o

I still do not use keys to limit, although I believe is important.

My MM is only with the E-Stop set - 03 in the machine and 01 on the board of control.

orotemo Sun 27 December 2009 10:48

EMC slaving
 
Brad: Thank you for the tip, that is exactly where I am. I've made the motors move, not yet slaved them, using the stepper gantry as a starting point.

Yuri: Man, that is fine you didn't get my question, because I definitely didn't get the answer :):D. what I try to achieve, is have my two X motors act as one axis for all purposes, and have them home separately so I know the machine is a perfect square.

I use PMDX-122 break out board, Gecko G203V driver, oriental motor 296(I think A1A) SG7.2.

I read somewhere that U is a parallel axis to X, not really sure if that is my solution, hopefully tomorrow I'll find out. if I'll make it - it will definitely be posted.

Thanks for your efforts guys.

Sherman McCoy Sun 27 December 2009 13:34

Interfacing CAD with EMC2
 
Yuri -
Great thread, I'm glad you started it. I've got Ubuntu/EMC 8.04 installed in my box, and have enough prior experience with Linux to appreciate how challenging using it can be without guidance from an expert- user friendly it is not. I'll soon be using this thread to set up my machine.

I want to use open source software as a complete CAD/CAM solution. I found dxf2gcode as a rudimentary 2D CAD package, and hear Google Sketchup can be converted to gcode. I'm interested in knowing what you are using for design purposes?

orotemo Tue 29 December 2009 08:02

EMC homing
 
Brad, this one is for you:

I use the pmdx 122, how do I make the homing work when all I have is onee pin for all limit switches and home?

11 - start
12 - pause
13 - touchoff plate (auto Z zero)
15 - all limit switches chained

the only workable configuration until now is when you have one loop for homing and another for limit switches, won't take all home + limits no way.

Advice?

:confused:

bradm Tue 29 December 2009 11:23

Orotemo, you may have stumped me. You could try the #emc irc channel (on freenode.net).

However, if you have separate home and limits, you could consider placing all the homes together with pin #13 for the Z zero. (The limit switches are chained, the homing switches are in parallel).

orotemo Thu 31 December 2009 09:05

EMC limits and homing
 
Thanks Brad, that was a brilliant idea. geniusity at its best :). really, it didn't occur to me I can do that, but it works great - hardware-wise, the NC connections of my relays function as the home switch, and the NO act as the limit switch chain.

One problem though, after checking the IRC #emc, they say that HOME_IGNORE_LIMITS works only for the axis you currently home, so if you have the limits chained - you simply can't do that.

I'll try and investigate the ladder - maybe my salvage is there.:o

If anyone has tips/ideas - welcome.

HAPPY NEW YEAR EVERYBODY!!! may your mechmate bring you happiness, work and wealth (although my grandfather always told me, that those who work, have not time to make money... :D). At any rate, I wish you all good health.

lonestaral Mon 02 October 2017 18:26

I am thinking about installing Linux.
As this is an old thread, is there any up to date advise,
recommendations or warnings ?

I have looked on the website and viewed You Tube.
Just a bit daunted by the task:eek:

bradm Tue 03 October 2017 12:59

Not much has changed. However, this is really a low risk operation, if you get the bootable image and fire it up. No commitment required, just a one time boot and play.

I've been spending more time looking at alternatives based on embedded computers lately; I've tried the BeagleBoneBlack ( do not recommend ), and I'm currently looking at solutions based on TinyG2 I'll report back if I find something I like.

lonestaral Tue 03 October 2017 17:46

Thanks Brad.
Yes I made a bootable usb with the image
and had a look.
All a bit strange, so different to Mach 3.
Lets see what happens today.
Good luck with your investigations.

lonestaral Sun 08 October 2017 00:25

Computer set up as a dual boot.
Linux installed.
Found a pp with a .ngc extension.

I have a few no pressure days next week,
so I will try it out.

Can you run tool height offset and work coordinate setting
scripts with Linux and if so how do I go about setting them up ?

lonestaral Mon 09 October 2017 04:41

I got the motors and axis set up and moving.

I could not get it to reference.
Persistent positive and negative soft limit alarm.
Many threads on this so it is a common problem for some reason.
I will try again tomorrow.

If no joy, then I have to decide whether to go back to Mach 3 or use it without
homing switches.

Yes, you can use Linux and Mach 3 without homing but
power cuts are common here, so it is good to be able to reference and not have to find your datum from scratch.


All times are GMT -6. The time now is 10:28.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.