Newbie migrating a gantry from Mach3 to LinuxCNC

  • Bats
  • Bats's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
26 Oct 2019 02:30 #148809 by Bats
As background, while I'm new to LinuxCNC, I'm not entirely new to linux (having first installed slackware from floppies and misspent a fair chunk of the dot-com bubble working as a sysadmin), but I'm years out of practice, decidedly rusty, and, where possible, would be much happier with "it just works" options over "it just works after you roll your own distro, build a custom kernel, port a few drivers from BeOS, and remember to sacrifice a live goat at midnight every third Tuesday, otherwise it'll segfault on line 1300 of any even-numbered job".

I've got a small (~500x1000mm) stepper-based CNC router (basically the Openbuilds LEAD 1010 with half the X travel), being run off a Gecko G540 on a parallel port. I had been controlling it with Mach3 on an old XP box, but, after a motherboard failure & replacement, XP is refusing to reauthorize, so I'm looking at other alternatives.

Upgrading to Win 7 would be one path, but buying a new license for something two months away from EOL seems a bit silly - and trusting a cracked OS on the home network is a little sketchy for my taste. Upgrading (or "upgrading") to Win 8 wouldn't work with the parallel port, and I'm not at all sure I want to throw more money at hardware like a smoothstepper that's just going to keep me locked into that ecosystem (similarly, I'm not quite ready to lock myself into LinuxCNC with a Mesa card yet, either).

So.... since I'd always meant to give LinuxCNC a serious try and lacked only the motivation, this seemed like just the kick in the axis I was looking for. I booted the live USB, saw the latency numbers looked good (or, well, passable), and firing up the by_interface->parport->Gecko_540B3/4 sample configs let me at least jog the steppers. So far, so good... Except - of course - it didn't handle the gantry's slaved stepper.

In trying to postpone the inevitable tumble into the deep, dark, rabbithole of config files, man files, and wikis, I tried using StepConf to automagically configurate a config for me from the old Mach3 XML... But, again, it was determined to treat the gantry's second Y as a rotary A axis.

At this point, having exhausted every half-assed alternative, I would seem have no alternative left but to do things the right way - set up a full install where I can actually make (and break) config files that won't be lost (or fixed) on reboot, and start actually R'ing all T FMs... But that raises some questions of its own, which is what (much rambling later) brings me here:
  • Wheezy - as installed by the live USB - is getting on in its years (to put it gently) - enough so that an 'apt get update' chokes on a long-expired release file for debian-security. Is this the currently preferred distro, or would I be better off starting with something else?

  • Similarly, while 2.7 is the stable fork, I've seen a handful of posts suggesting 2.8/2.9 handle machines with gantries significantly better. Which would I be better off starting out with? And exactly how unstable & bleeding-edgey is the master fork?

  • While synaptic looks like it'll happily upgrade the linuxcnc and linuxcnc-doc packages to 2.9, linuxcnc-dev seemed to be broken (apparently relying on a python-serial package that doesn't exist or can't be found). I may be getting ahead of myself, on that, though - the package description isn't clear on whether I need it for tweaking UIs, or just building new front-ends from scratch.

  • On a related note (re: "UI" and "getting ahead of myself"), is PathPilot a practical option I should consider, or does my setup (either the parallel port bit, or the not-even-vaguely-resembling-a-Tormach-machine-no-matter-how-much-you-squint bit) rule it out?


There are, of course, a million smaller questions, but at this point I'm mostly looking for broad guidance on a starting point, so I don't find myself buried three weeks deep in config tweaking only to learn a different version implemented a one-click "Make It Work" button... but I'm open to any other advice or warnings that may seem appropriate.


-Bats

Please Log in or Create an account to join the conversation.

More
26 Oct 2019 05:36 #148813 by HueyHQ
Hi Bats, I'm not much use to you, but just wanted to say, I enjoyed reading your post!

I've only ever used a Mesa setup, and not parallel, and very much a noob, so I can't help in that regard.

But I can suggest, if you have not already, that you look over BigJohnT's how-to guides at gnipsel.com/linuxcnc/uspace/ for getting up and running the later builds - I managed it with very little Linux experience just following the guide for my set-up.

And that's all i got!
The following user(s) said Thank You: Bats

Please Log in or Create an account to join the conversation.

More
26 Oct 2019 12:19 #148824 by tommylight
Replied by tommylight on topic Newbie migrating a gantry from Mach3 to LinuxCNC
Refreshing, for sure, thank you.
If you just want to have the machine working, make a XYZ config and when setting the pins, set Ystep and Ydir for both drives, meaning same signal going to both drives on separate parallel port pins.
The Wheezy edition uses RTAI, that provides better latency on older systems, while Stretch uses Preempt-RT that works much better on new PC's and also provides the Ethernet connectivity for Mesa boards or Beckhof devices.
There are talks of having the 2.8 release as RTAI and Preempt-RT as that would give a choice for users even on older hardware and parallel ports.
If you do insist on having the bleeding edge with all the bells and whistles, the 2.9 version is a nice choice, and it is pretty damn stable for an unstable version. The gantry homing is a nice feature for squaring the gantry every time the machine is homed, but it does require a bit of editing, took me all of 15 minutes the first time i did it on an industrial plasma cutter.
Any way you look at it, dive in, thank us later ! :)

Please Log in or Create an account to join the conversation.

More
26 Oct 2019 17:44 #148845 by Todd Zuercher
Replied by Todd Zuercher on topic Newbie migrating a gantry from Mach3 to LinuxCNC
If you still want to have xp it is still possible to register it and use, but on line support for it ended a while ago. You can do it by phone though. I had to do it earlier this year for several industrial machines. You might find it insightful to compare with Mach3 dual booting.

Since Wheezy is eol sometimes installing software can be a real pain. Changing the debian repos to point to the archives can help.

Master is always under development but it is usually stable enough to run machines. 2.8 has been frozen pending it's imminent release. I think the main holdup is creating an iso using a current distribution.

Please Log in or Create an account to join the conversation.

  • Bats
  • Bats's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
26 Oct 2019 20:23 - 26 Oct 2019 20:24 #148849 by Bats


Refreshing, for sure, thank you.

Sounds like a new ad campaign. Try an ice cold Bats Lite - Refreshing, for sure!

Or maybe an old ad campaign.

If you just want to have the machine working, make a XYZ config and when setting the pins, set Ystep and Ydir for both drives, meaning same signal going to both drives on separate parallel port pins.

I may give that a shot, but unless I misunderstand something (which, believe me, I'm pretty good at), the problem I see in this is that I'd presumably end up having to power off the machine and manually twirl the screws to square the sides of the gantry. Much as I may be impatient to get things running again, I figure I'm better off spending the time to do it right (or, well, at least mostly right) rather than set up something I have to tear out and redo later... or do something that makes me tear out my hair every time I have to set it up.

The Wheezy edition uses RTAI, that provides better latency on older systems, while Stretch uses Preempt-RT that works much better on new PC's and also provides the Ethernet connectivity for Mesa boards or Beckhof devices.

The differences between Preempt-RT and RTAI are still a bit over my head, except that I don't recall having seen Preempt-RT mentioned in association with parallel port systems before. I'm not exactly sure whether the current PC counts as "old" or "new", either - it just recently gained a not-entirely-ancient AM3+ mobo (Gigabyte GA-78LMT-USB3 ) supporting a substantially older Phenom II X2 B59 CPU (which will likely be upgraded at some point, but it's not currently on the shopping list).

There are talks of having the 2.8 release as RTAI and Preempt-RT as that would give a choice for users even on older hardware and parallel ports.

So does this mean that parallel isn't currently an option on 2.8/2.9? Or am I misinterpreting things again?

If you do insist on having the bleeding edge with all the bells and whistles, the 2.9 version is a nice choice, and it is pretty damn stable for an unstable version. The gantry homing is a nice feature for squaring the gantry every time the machine is homed,

I'm not big on choosing my software just because it's the newest & shiniest or has more features that I'll probably never use (unless they're blinky lights - I can always use more blinky lights), but if the alternative is manually twiddling the screws and/or slamming into a hard stop to square the gantry, then, yeah, I'd probably be willing to suffer with a few extra whistles, bells, gadgets, and geegaws.

but it does require a bit of editing, took me all of 15 minutes the first time i did it on an industrial plasma cutter.

Well, there's your problem - you're using the wrong tool. Config files are easier to edit with keyboards.

Save the plasma cutter for refactoring code.


-Bats
Last edit: 26 Oct 2019 20:24 by Bats.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
26 Oct 2019 21:11 #148851 by tommylight
Replied by tommylight on topic Newbie migrating a gantry from Mach3 to LinuxCNC

I may give that a shot, but unless I misunderstand something (which, believe me, I'm pretty good at), the problem I see in this is that I'd presumably end up having to power off the machine and manually twirl the screws to square the sides of the gantry.

That is correct.

The differences between Preempt-RT and RTAI are still a bit over my head, except that I don't recall having seen Preempt-RT mentioned in association with parallel port systems before. I'm not exactly sure whether the current PC counts as "old" or "new", either - it just recently gained a not-entirely-ancient AM3+ mobo (Gigabyte GA-78LMT-USB3 ) supporting a substantially older Phenom II X2 B59 CPU (which will likely be upgraded at some point, but it's not currently on the shopping list).

Preempt-RT does work with parallel ports, albeit the latency is a bit worse, but it does and i do have machines using it daily. And that is an old PC, like 15 year old, if i remember correctly.

So does this mean that parallel isn't currently an option on 2.8/2.9? Or am I misinterpreting things again?


See above.

I'm not big on choosing my software just because it's the newest & shiniest or has more features that I'll probably never use (unless they're blinky lights - I can always use more blinky lights), but if the alternative is manually twiddling the screws and/or slamming into a hard stop to square the gantry, then, yeah, I'd probably be willing to suffer with a few extra whistles, bells, gadgets, and geegaws.

Nice choice.

Well, there's your problem - you're using the wrong tool. Config files are easier to edit with keyboards.
Save the plasma cutter for refactoring code.
-Bats

LOL.
Regards,
Tom.

Please Log in or Create an account to join the conversation.

  • Bats
  • Bats's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
26 Oct 2019 22:33 #148853 by Bats

If you still want to have xp it is still possible to register it and use, but on line support for it ended a while ago. You can do it by phone though. I had to do it earlier this year for several industrial machines. You might find it insightful to compare with Mach3 dual booting.

Dual boot would definitely be my preferred option (actually that was supposed to be somewhere on my vague "to do" list after getting the motherboard swapped out)... the problem is that I can't seem to reactivate it. I left some of the details of the MS end of the problem out of my original post.

The usual [un]friendly blue activation window that pops up & asks you to activate online or by phone is now a window that pops up and hangs on a blank white square of square blank whiteness, and I haven't had any luck figuring out what's causing the problem. Based on the fact that it chokes before asking for input rather than after submitting it, I'm assuming the problem is actually something local (although I suppose I could be wrong - I don't think I've had to reactivate a system since they finally discontinued service). Using SFC/scannow to check things out isn't an option either, since the machine doesn't have an optical drive, the CD I think I installed it from is damaged, and I have yet to find an iso that it'll accept as a substitute. If there's a method to activate it while completely bypassing the usual interface - maybe by twiddling the right bits in the registry - that would probably solve the problem (and lighten some of the time pressure for wrapping my brain around LinuxCNC), but I haven't managed to track one down.

Since Wheezy is eol sometimes installing software can be a real pain. Changing the debian repos to point to the archives can help.

So I noticed (although I was already running XP, so I suppose I can't complain too loudly about Wheezy missing some security updates) - that's one of the main reasons I was wondering if I'd be better off with one of the later distros... Although now I'm trying to sort out which my hardware is likely to be better suited to (or if there's a way to compare - or estimate - latency numbers on a Preempt-RT version before jumping through the hoops of a Wheezy->Jessie->Stretch upgrade path)

Master is always under development but it is usually stable enough to run machines. 2.8 has been frozen pending it's imminent release. I think the main holdup is creating an iso using a current distribution.

"Frozen pending release" sort of rhymes with "stable" to my ear (I blame too many years of working loud rock shows and a poor grasp of poetry), unless there are any compelling reasons to go with 2.9 - I'm still not at all clear on the differences between the two.


-Bats

Please Log in or Create an account to join the conversation.

  • Bats
  • Bats's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
26 Oct 2019 22:54 #148855 by Bats

Preempt-RT does work with parallel ports, albeit the latency is a bit worse, but it does and i do have machines using it daily. And that is an old PC, like 15 year old, if i remember correctly.

I just asked this (buried somewhere deep in another reply), but is there any reasonably painless way of estimating/testing the impact it'll make on latency, or do I have to just upgrade the OS and then the linuxcnc package & see what the numbers look like then?

And, related, is there a guide for the best path from wheezy to stretch? Trying to upgrade in place, or is there a ready-to-go stretch +Preempt-RT install image floating around somewhere? The "Updating LinuxCNC" pages (for 2.8 or devel) only seem to deal with wheezy/RTAI. (I found this image , but the "testing-" URL made me a little hesitant).


-Bats

Please Log in or Create an account to join the conversation.

More
27 Oct 2019 02:15 #148857 by phillc54
You ca make a live USB for latency testing from here www.linuxcnc.org/testing-stretch-rtpreempt/

Please Log in or Create an account to join the conversation.

  • Bats
  • Bats's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
27 Oct 2019 03:34 #148859 by Bats
Yep, that's the one I was looking at - thanks.

I've got it running on a live USB now, and the test is definitely showing more jitter - around 55k ns servo & base (that's after launching every non-CNC app in the menu, a whole batload of glxgears instances, and then rapid-resizing a handful of youtube windows until the window manager glitched and forgot where the borders belonged - it makes me feel all warm and fuzzy to see that after some 25 years since since my first X-Windows box, some things still break exactly the same way), compared to something like <10k servo & 25k base with wheezy/RTAI.

I don't have a very good sense of how the latency test numbers translate into real-world performance, though, or how my arbitrary "stress test" maps to an actual lcnc workload, or how much latency can be improved later by dropping in a new CPU vs how much is governed by the motherboard/chipset, so I'm still sort of waffling on which direction to go from here.


-Bats

Please Log in or Create an account to join the conversation.

Time to create page: 0.098 seconds
Powered by Kunena Forum