I can now run EMC2 and it kind of "works"

formatting link
After wiring garage with Ethernet last night I moved on a bit. Worked until 2am.

I have configured my mill PC to run EMC2 with "ppmc" configuration.

I tried to do a good job, so that all configs are in my CVS source tree, there are shell aliases for everything, etc. The idea is that I want everything to be based on computer settings, so that one computer could possibly run several CNC devices and that I could run EMC2 on several computers. I do not want to hard code everything so that the only thing I run is my Bridgeport Interact from that PC.

Any of my Linux computers for which CNC_ROLE is set via host settings, loads these shell aliases and requires a default machine to be specified.

Just a little planning for the future, so to speak.

Anyway, I created a setup based on 'ppmc', and, lo and behold, it talks to Jon's PPMC board and displays positions. I also wired the speed command of the drive to PPMC's analog output for Y, so that PPMC could drive the Y axis. I verified that it is able to do so, using ppmcdiags program. Based on voltage that I specify, the servo motor spins just fine.

Right now, the only axis able to move and equipped with encoder is Y, and even on it, I have disconnected the timing belt. So it is just a servo motor spinning back and forth. Nothing could possibly crash into anything or pinch any fingers and other body parts. Very safe environment to work on software and on estops and things like that.

Because this is all Linux and X11 based, I can do fun things like ssh to the CNC computer, run EMC2 from ssh, etc. So, I can work on setting this up, without even being in the garage.

The first task of the day, is to disable all estop functionality that is in the default configs, so that I could get the servo motor to move.

I will, of course, re-enable estop when I have that stuff wired properly.

i
Reply to
Ignoramus2398
Loading thread data ...

formatting link

PCs are cheaper than dirt, and Linux and EMC2 are free. There is no point in trying to have one PC control multiple machines *unless* you are also multitasking the drives and I/O boards between the machines. I do this with one PC and set of drives controlling either CNC plasma or CNC mini mill. If you aren't sharing the drives and I/O boards, it makes little sense to try to share a lousy $99 PC.

Reply to
Pete C.

formatting link
>

Maybe, but doing things in a configurable way like this, makes for clean, understandable computer settings. I could run two devices off of one PC if I wanted to. I am not saying I should. What I did is I avoided hard coding anything.

i
Reply to
Ignoramus2398

formatting link
?FixingSMIIssues You can improve reliability and response on your EMC2 system by decreasing hardware latency caused by the System Management Interrupt.

I ran Neils Jalling's hack on my EMC2 system and it decreased jitter by ~ 5% and caused the dreaded "following error" to disappear.

The thermal control hardware continued to work properly on my system after the hack but there are rumored to be systems that will overheat because of thermal routines handled by the SMI.

--Winston

Reply to
Winston

Thanks. I did not think about it. This is an older PC "designed for Windows 2000" and thus is unlikely to be exposed.

In addition, I close the velocity loop with tachometers (changed my mind again and I am using tachs as of now), so that alone could help with jitter. Even if the CPU is taking a millisecond nap, the servo drives maintain velocity.

If/when I get my mill to work, I want to buy a mini-ITX case with a new mobo, SSD etc and will put it inside the control cabinet. When I look for hardware, I will double check the SMI issue. Maybe I will get AMD hardware.

i
Reply to
Ignoramus2398

If you want to go compact and in the control cab, look at PC104 form factor systems and some of the other industrial PC variants many of which are not expensive and are specifically designed to run Linux. Try the advertiser index on circuitcellar.com if you need a starting point.

Reply to
Pete C.

Well, I picked a few newegg items, if all goes well, I will buy them:

formatting link
?Item=N82E16813121381
formatting link
?Item=N82E16820145184
formatting link
?Item=N82E16820167025 I asked my friend, who is a computer build expert, if they will fit together, but I think that they will.

i
Reply to
Ignoramus2398

SMI has been on Intel processors since < Feb. of 1992.

It couldn't hurt to check. See Message 3 under:

formatting link

--Winston

Reply to
Winston

(...)

AMD began supporting SMI before Intel.

__________________________________________________________

Beware! I have not been able to get Linux or EMC2 to run on SATA drives, just PATA. I understand that some folks *have* been able to do this by patching the OS, however.

--Winston

Reply to
Winston

That is the weirdest thing I heard this week. I do not know what to make of this.

i
Reply to
Ignoramus2398

Another minor bit of progress: I was able to set up the Y axis parameters enough, so that when I turn "machine on", it holds position and when I press up and down arrows (which control Y axis in EMC), the position changes and is then held.

I was doing this from away from home, so I am not totally sure that it worked right, but it looks to me like it did.

The only problem is that the position that is held, is not very stable, and changes from, say, 0.2345 to 0.2344 to 0.2346 and so on. I think that it is because I have not yet done PID tuning, have not adjusted gains and Test/Offset on the drives etc. I am not losing sleep over it, because I am supposed to fix it once I hook up the servos to ballscrews.

I think that the next thing I should do is wire limit switches and estops and test all that with the servo motor disconnected from the leadscrew.

Things are progressing much faster right now than I expected 2 days ago.

i
Reply to
Ignoramus2398

Try entering some G code commands in MDI mode, something like G01 Y10 F25 or G01 Y0 F10. It's more fun to watch it do a move on it's own than to just jog it with the keyboard.

Reply to
Pete C.

My takeaway: Run the latency test before buying your mobo, if possible. Some configurations just aren't compatible without significant blood sweat and tears.

formatting link

--Winston

Reply to
Winston

I think that it cannot do it until I home it. It says "Cannot issue MDI commands until homed". And I cannot yet home this mill.

i
Reply to
Ignoramus2398

You should be able to manually home it, i.e. tell it "this is home".

Reply to
Pete C.

I do not know how to do that -- no one I know has a Mini-ITX motherboard.

I will ask on the EMC2 forum.

i
Reply to
Ignoramus2398

Which one do you have? I have several different Mini-ITX boards at work.

Reply to
Jim Stewart

Ubuntu runs just fine on a Mini-ITX EPIA-CN with SATA drives.

Reply to
Jim Stewart

With EMC2 running properly? I think the issue here is not Linux running on it, it is EMC2 running under Linux on it without timing issues that screw up the servo loop.

Reply to
Pete C.

(...)

From a booted, idle screen,

Press F1 (Which turns off eStop) then, F2 ("Toggle Machine Power") then F3 (Manual Control).

Locate the Home key on your keyboard and press it once. Select the next axis (Y) and press the Home key once more. Select the final axis (Z) and press the home key again.

Continue selecting and Homing until you run out of axis'.

Welcome Home.

:)

--Winston

Reply to
Winston

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.