MechMate CNC Router Forum

Go Back   MechMate CNC Router Forum > Computing, Software & Programming > CNC motion control software
Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old Sun 16 November 2008, 18:35
servant74
Just call me: Jack
 
Nashville (Tennessee)
United States of America
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.
Reply With Quote
  #2  
Old Mon 17 November 2008, 06:35
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
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.
Reply With Quote
  #3  
Old Tue 18 November 2008, 08:07
servant74
Just call me: Jack
 
Nashville (Tennessee)
United States of America
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.
Reply With Quote
  #4  
Old Sat 22 November 2008, 21:31
sprayhead
Just call me: Francis
 
sydney
Australia
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 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.

Just kidding, they might be of great help actually.

I'm excited to hear about the results
Francis
Reply With Quote
  #5  
Old Fri 28 November 2008, 18:26
YRD
Just call me: Yuri #17
 
Brasilia - DF
Brazil
Setting up EMC2

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 . But he is wrong: I do not know almost nothing of Linux .

If I can set up EMC2, you can too .

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

Reply With Quote
  #6  
Old Fri 28 November 2008, 20:00
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
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!
Reply With Quote
  #7  
Old Fri 28 November 2008, 23:47
sprayhead
Just call me: Francis
 
sydney
Australia
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
Reply With Quote
  #8  
Old Sat 29 November 2008, 07:41
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
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.
Reply With Quote
  #9  
Old Sat 29 November 2008, 08:19
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
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?
Reply With Quote
  #10  
Old Sat 29 November 2008, 08:33
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
The file that one has to download is 695MB My PC has downloaded 2.73MB so far and tells me that it has 7 hours to go!
Reply With Quote
  #11  
Old Sat 29 November 2008, 08:36
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Stopped that download and went to the EU mirror instead. Now downloading from Romania at about 60% faster - only 4 hours to go!
Reply With Quote
  #12  
Old Sat 29 November 2008, 09:48
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
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.
Reply With Quote
  #13  
Old Sat 29 November 2008, 09:52
servant74
Just call me: Jack
 
Nashville (Tennessee)
United States of America
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

Last edited by servant74; Sat 29 November 2008 at 09:53.. Reason: add salutations
Reply With Quote
  #14  
Old Sat 29 November 2008, 09:54
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
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.
Reply With Quote
  #15  
Old Sat 29 November 2008, 10:00
YRD
Just call me: Yuri #17
 
Brasilia - DF
Brazil
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)
Reply With Quote
  #16  
Old Thu 18 December 2008, 15:33
YRD
Just call me: Yuri #17
 
Brasilia - DF
Brazil
Gerald,

Tested the EMC2?
What is your opinion about the system?
Advantages and disadvantages?
Reply With Quote
  #17  
Old Thu 18 December 2008, 19:22
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
No, havn't played with EMC2 yet.
Reply With Quote
  #18  
Old Sat 26 December 2009, 22:44
orotemo
Just call me: orotemo
 
Warburg
Israel
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?
Reply With Quote
  #19  
Old Sun 27 December 2009, 06:16
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
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.
Reply With Quote
  #20  
Old Sun 27 December 2009, 07:09
YRD
Just call me: Yuri #17
 
Brasilia - DF
Brazil
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.

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.
Reply With Quote
  #21  
Old Sun 27 December 2009, 10:48
orotemo
Just call me: orotemo
 
Warburg
Israel
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 . 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.
Reply With Quote
  #22  
Old Sun 27 December 2009, 13:34
Sherman McCoy
Just call me: "Krasch"
 
Portland,OR
United States of America
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?
Reply With Quote
  #23  
Old Tue 29 December 2009, 08:02
orotemo
Just call me: orotemo
 
Warburg
Israel
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?

Reply With Quote
  #24  
Old Tue 29 December 2009, 11:23
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
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).
Reply With Quote
  #25  
Old Thu 31 December 2009, 09:05
orotemo
Just call me: orotemo
 
Warburg
Israel
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.

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... ). At any rate, I wish you all good health.
Reply With Quote
  #26  
Old Mon 02 October 2017, 18:26
lonestaral
Just call me: Al #114
 
Isarn
Thailand
Send a message via Skype™ to lonestaral
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
Reply With Quote
  #27  
Old Tue 03 October 2017, 12:59
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
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.
Reply With Quote
  #28  
Old Tue 03 October 2017, 17:46
lonestaral
Just call me: Al #114
 
Isarn
Thailand
Send a message via Skype™ to lonestaral
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.
Reply With Quote
  #29  
Old Sun 08 October 2017, 00:25
lonestaral
Just call me: Al #114
 
Isarn
Thailand
Send a message via Skype™ to lonestaral
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 ?
Reply With Quote
  #30  
Old Mon 09 October 2017, 04:41
lonestaral
Just call me: Al #114
 
Isarn
Thailand
Send a message via Skype™ to lonestaral
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.
Reply With Quote
Reply

Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 14:29.


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