587,482 active members*
3,511 visitors online*
Register for free
Login
Results 1 to 11 of 11
  1. #1
    Join Date
    Jun 2007
    Posts
    3891

    nm200 under emc2

    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.

  2. #2
    Join Date
    May 2007
    Posts
    53
    Good day,

    I would be very interested in knowing how to setup EMC on the NM200.

    Keep us posted.

  3. #3
    Join Date
    Aug 2004
    Posts
    203
    Quote Originally Posted by ihavenofish View Post
    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.
    On the s2 the oil lines under the table are ran in a less than ideal way, which limits travel. Rerouting them so they don't get pinched or snapped at extremes will yield several inches in X. I believe I wrote something about that here before.

    So be careful that you don't snap a line.

    EMC has the benefit of rigid tapping support, given an appropriate spindle upgrade.

  4. #4
    Join Date
    Jun 2007
    Posts
    3891
    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.

  5. #5
    Join Date
    Jun 2007
    Posts
    3891
    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.

  6. #6
    Join Date
    Aug 2004
    Posts
    203
    Quote Originally Posted by ihavenofish View Post
    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.
    The same theing happened to me (snapping, I mean). The problem was that the oil lines jammed on the non-motor side, as you described. Here's a pic of how they're laid out:




    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.

  7. #7
    Join Date
    Jun 2007
    Posts
    3891
    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.
    Attached Thumbnails Attached Thumbnails broken.jpg  

  8. #8
    Join Date
    Aug 2004
    Posts
    203
    So are you still using emc2 with your nm-200? If so, how are you finding it?

  9. #9
    Join Date
    Jun 2007
    Posts
    3891
    Quote Originally Posted by JoeBean View Post
    So are you still using emc2 with your nm-200? If so, how are you finding it?
    couldnt get the step/direction spindle running, gave up. more importantly, the owner of said machine has returned, and im looking for a new shop space. so ill be trying emc on the nm145 at a later date.

  10. #10
    Join Date
    Aug 2004
    Posts
    203
    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:
    0xEC00
    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:
    Pin/Description/Inverted?
    1/coolant/no
    2/xstep/no
    3/xdir/no
    4/ystep/no
    5/ydir/no
    6/zstep/no
    7/zdir/no
    8/astep/no
    9/adir/no
    10/estop/YES
    11/xhome/YES
    12/yhome/YES
    13/zhome/YES
    14/spindlepwm/YES
    16/spindlecw/no
    17/chargepump/YES

    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!

  11. #11
    Join Date
    Sep 2007
    Posts
    359
    JoeBean thanks that is an excellent post.

    Phil

    Sent from my HTC Desire using Tapatalk

Similar Threads

  1. fresh off the nm200
    By ihavenofish in forum Novakon
    Replies: 7
    Last Post: 07-13-2010, 06:31 PM
  2. NM200 V2 soon to ship
    By newton009 in forum Novakon
    Replies: 5
    Last Post: 07-09-2010, 06:06 PM
  3. Rapids on NM200
    By g29cc in forum Novakon
    Replies: 14
    Last Post: 07-09-2010, 12:24 PM
  4. Novakon NM200 and experienced machinist/owners.
    By newton009 in forum Novakon
    Replies: 16
    Last Post: 05-23-2010, 10:52 PM
  5. NM200 Coming 4-19 04 4-20 !
    By g29cc in forum Novakon
    Replies: 14
    Last Post: 04-22-2010, 02:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •