I would be very interested in knowing how to setup EMC on the NM200.
Keep us posted.
so i set my router up to run under emc2. it solved an issue in mach3 that would cause it to stall in high speed contouring.
since im using the same pc to run the nm200, i figured id try emc on that too. i got it working briefly and then screwed up the settings somehow. i should have it back working today. for the moment it was running, it was doing 180ipm smoothly in all axes, so it looks promising for getting more reliable performance out of the mill than mach was doing.
i also noticed something about my machine. i dont use the limit swirches, so i took the Y axis switch and rail off. end to end the machine now has 27.875" travel in the X axis. y axis travel is 15.125" as its always been. not too shabby given the machine is advertised as 22x12 or some such. having nearly 28" in the x opens up some new possiblilities though.
once i get emc working again ill post the settings for configuring it if anyone else wants to try. it takes all of 1/2 an hour to set up.
the same settings should work on the nm145 as well, but as thats using its own pc and i havent had issues so far, im not going to be setting mine up on emc for now.
I would be very interested in knowing how to setup EMC on the NM200.
Keep us posted.
So be careful that you don't snap a line.
EMC has the benefit of rigid tapping support, given an appropriate spindle upgrade.
the oil lines arent in the way. i vaguely remember forcing them out of the way early on at the non motor side of the table. they tuck away to the side of the motor on the other side so its safe generally. one of the lines is actually snapped though, i dont know how that happened, its been like that since for a long long time. one day i need to do a complete overhaul of this thing.
so the cnc4pc card in the novakon control seems to be a bit finicky with the charge pump signal. i gave up trying to find just the right setting and disabled the charge pump with a jumper on the card. the axis move now just fine. i tuned it to 150ipm and it seems reliable.
i need to configure the spindle now, which is a little more involved because its step and direction and not pwm.
This is how they look looking in from the front (motor @ right). At the left you see that little T. As the table moves R the bearing block at the L end comes very close to the central block with the ballnut. The solution was to remove the table (I used t slot nuts and bolts connected to chain with a hoist hooked to rafters above, which I installed for the purpose of moving heavy loads onto/off of the table, but a crane works great too), then invert the T and relocate it closer to the middle oil nozzle. In my case the leftmost line had been cut right next to the T, so swapping some lines around allowed me to fix it without replacing oil lines. The line size is metric IIRC so you'll need to find some if you go to replace it.
thanks for that picture. it clearly tells me whats come loose on mine. ive drawn it on your picture. explains why im getting no oil to the table. it seems to have come off as a result of someone yanking on it. thats gonna need fixing sooner than later.
So are you still using emc2 with your nm-200? If so, how are you finding it?
Well, I don't like hijacking threads, but hopefully nobody will mind as it's on-topic, and I figured that posting a different thread on the same topic could get confusing...
I decided to go play with emc today as I had nothing better to do, and I figured I'd give a bit of a walkthru on setting it up for those not familiar with Linux.
First off, note that I didn't have any problems with the chargepump or spindle, so I'm guessing my setup may be a bit different. Or it could be one of the gazillion poorly documented quirks of emc2 that I ran in to - seriously, they need to get someone to put full documentation in one place & maintain it!
[One thing to note before we go on re: the charge pump signal, it's apparently related to the max jitter values received in the test mentioned below, as that affects the base thread freq and the charge pump signal is output at 1/2 base thread freq. So someone reported that changing that value fixed their charge pump issues, YMMV]
Let's get down to business:
If you're impatient and figure you've probably got a machine similar to mine you can download the configuration files linked to below and save them in your emc2 folder, then launch it to try it out.
First off, I didn't want to screw around installing it on the NM-200s2 controller's hard drive. So this was running on a USB pendrive since there's no CD-ROM on the mill. I didn't bother setting up a persistent install so you'll need to save your config files somewhere where you can access them at next bootup (or they'll be deleted). Alternatively you could use the USB drive to install emc2 to your hard drive.
A 1GB USB drive is minimum, but a 2GB would give you room to have an extra 1GB FAT partition to share your files between windows & linux.
To create the bootable drive: Ubuntu have instructions for various operating systems here. I'd suggest using the Windows instructions as they're simplest. Here's the basic procedure:
- Download the emc2 iso here
- Download the Universal Linux USB Installer here
- Rename the iso you downloaded so that it's ubuntu-10.04-desktop-i386.iso This is required so that the USB installer will recognize the file.
- Insert your USB drive in your computer (& format it if necessary), run the USB Installer, choose Ubuntu 10.04 Desktop, select the iso file you just downloaded, select the appropriate USB drive, LEAVE THE PERSISTENT FILE SIZE TO 0 OR IT WON'T BOOT, and click Create.
Once that's done you have your bootable emc2 USB drive.
In the meantime, you need to gather some info from Mach3 (assuming you've got it configured correctly) to speed up configuring emc2. Here's what you need, along with my values (NOTE: Mach3 was originally configured for me with inches as the machine units, so my values reflect that instead of the more sane metric values, which would relate better to the metric leadscrew pitch of 5mm)
Under ports&pins you first want to record what parallel port you're using. In my case it was:
Next, you need the pin #s for various outputs & inputs, as well as whether they're active-low [NOTE: active-low = inverted in emc2]. Here was mine:
You also need the spindle pwm base frequency, under the spindle tab. In my case it was 1000.
As well, if you want to match the performance of your steppers you'll need acceleration & velocity in the motor tuning setting. NOTE: velocity in mach3 is in units/MINUTE, whereas it's units/SECOND in emc2, so divide mach3's value by 60.
Finally, you need to know the number of steps and microsteps for your stepper. In my case it was 200 steps (yours almost definitely will be the same) and 10 microsteps (YMMV).
Time to start emc2! Restart your computer once the USB installer finishes and press F8 at boot to access the boot options menu (typical - some PCs use other keys). Choose to boot from the USB drive. When it comes up with the Ubuntu logo choose to start the LiveCD ("Start or Install Ubuntu" IIRC). In a minute or two you'll be logged in.
From the Applications menu in the top left corner choose CNC, Latency Test. It's very important to run this for at least 15 minutes. If you're planning on keeping EMC2 as your primary controller software you'll want to run it for as long as possible - 24-48 hours was suggested in one place. While it's running you'll want to do whatever you can to bog the computer down. You can surf the web, run various programs (NOT EMC2 THOUGH!), etc. You're basically wanting to find the worst case scenario. FWIW one suggestion is to run glxgears, which can be done by opening a terminal (under Applications) and typing glxgears
Once you're satisfied you've ran it long enough you'll want to go to the Latency Test screen and write down the largest bold value (max jitter). Different USB drives will give you different values due to their access speed. I have one that could keep under 10,000 and another that was around 25,000. Lower is better. For the purpose of being more universally usable the config files I've linked to below assumed the higher (25,000) value.
Next we run the configuration wizard. Go to Applications, CNC, EMC2 Stepconf Wizard. Note that you can run this wizard again later to reconfigure the settings as need be by selecting your file. But in this case you'll want to create a new profile.
The screens are well laid out and fairly straight-forward, but here's a rundown of what you want:
In the first screen select the setup of your mill (usually XYZ unless you've got a 4th axis), choose machine units (as mentioned before I used Inch despite mm making more sense), select G203V for your driver (assuming yours is using the Gecko G203V, which according to Novakon's comparison sheet is still standard), enter the max jitter value you recorded in your Latency Test for the Base Period Maximum Jitter, and enter your port address.
In the next screen you need to set up your pins according to what you recorded before. Don't forget to invert where needed. Also, for some reason I had to invert X direction in order to get it to travel the right way. If yours is going the wrong way go back in here and change this value as necessary.
The next several screens are for setting up the individual axes. As I mentioned earlier for mine steps are 200, microsteps are 10. Pulley teeth ratio is going to be 1:1 as we have no gearing/pulleys between the motor & leadscrew.
As it describes on the screen, leadscrew pitch is the number of turns required for 1 inch travel. Since my machine has what we'd normally call 5mm pitch leadscrew (ie. 5mm travel per rotation) the total number of turns for 1" travel = 25.4/5 = 5.08.
Max velocity, as mentioned before, will appear lower than in mach3 since they're using units/second and mach is using units/min. My sample configuration uses 1.5 in/s, which is 90 in/min.
Home location will be 0, table travel is for soft limits and tells how far you want the table to be able to move, and so depends on axis (eg. 0 to 24 for x). Home switch location will be 0. NOTE: Home search velocity for X & Y had to be negative. The sign (+/-) tells which way the axis will travel to reach home. If left positive the axis will travel AWAY from the home/limit switch and never reach zero. Z is ok because it's travel is in negative values with respect to zero.
The next screen configures the spindle. PWM is the frequency value you recorded, in my case 1000. emc2 simply interpolates a linear relationship between speeds, so the next 4 boxes just give you a couple speeds and their corresponding PWM values. In order to configure this accurately it's suggested you set the values as 0/0 and 6000/1 (for max speed), compare speeds that it gives you vs. what you read with a gauge, and adjust from there. At any rate, 0/0 and 6000/1 was pretty close for me so I left it.
Skip the next advanced pages. Once done you'll get a new file on your desktop that's simply a link to your configuration file that's in your home directory (under ~/emc2). Before you can use it, though, you need to manually modify a file. There's a problem where the Stepconf wizard is linking the chargepump to the e-stop and it won't work. There's a writeup on it on the zone here.
Here's a fairly simple way to modify it:
Open terminal from Applications
type sudo nano ~/emc2/configs/[YOUR_CONFIG_NAME]/[YOUR_CONFIG_NAME].hal
(Obviously replace [YOUR_CONFIG_NAME] with whatever your config name was, like nm200)
Then type ctrl-w, search for estop-out charge and remove charge-pump.enable from that line. Write out (ctrl-o) and exit (ctrl-x).
Obviously you could use a different text editor to do the same thing. Also note that going into Stepconf wizard to modify your settings will require you to re-edit this file as Stepconf Wizard insistantly overwrites the change.
Finally, one more step: To be able to just double click the desktop icon and have emc2 launch you need to right-click the icon, go to properties, permissions, and check Allow Executing...
That's it! Double-clicking should launch it. Remember to press F1 then F2 to start using it (you need to set off any e-stop and then "start" the mill). Everything else is fairly straight-forward.
As for the files, they're here. Note that you'll need to copy them to ~/emc2
Hope this helps someone out!
Last edited by JoeBean; 02-21-2011 at 02:16 PM.
JoeBean thanks that is an excellent post.
Sent from my HTC Desire using Tapatalk