Newbie migrating a gantry from Mach3 to LinuxCNC
- Bats
- Topic Author
- Offline
- Senior Member
- Posts: 55
- Thank you received: 7
So if my math is right (it's usually not), that 10kHz comes out to around 95ipm? (200 step motors, 10 microsteps on the gecko, 4-start 2mm pitch leadscrews)... That's not terrible, although I was reliably getting 150ipm rapids out of Mach3 on a slower CPU and considerably older & less capable motherboard.55k latency means that software stepping will only really be good to 10kHz.
But 10kHz spins a stepper fairly fast.
Of course, that was tuned empirically based on when I started losing steps (and factoring in some sort of safety margin) and, as I mentioned before, I really have no idea how much resemblance my rather awkward, arbitrary, and anything-but-repeatable "stress test" bears to linuxcnc's actual real-world load profile - so I assume there's probably still room for similar tweaking once things are up and running.
I think I've got the stretch image installed on a spare drive, but haven't updated LCNC yet. I let myself waste too much of the day on a prior install puzzling over why Gecko_G540B4 would work with axis, but immediately crash if I used stepconf to switch it to gmoccapy.I think I would suggest installing from the stretch / preempt live image, then using the buildbot to get 2.8.
I couldn't find anything that looked particularly gantryish (or slaveish, or XYYZish, or otherwise promising-ish) in stepconf on a short-lived wheezy/2.9 install, so unless I'm looking for the wrong thing, I'm going to hazard a guess I probably won't find it in 2.8 either.Then see if stepconf understands gantries in 2.8. (If it doesn't then the config changes are not that hard if the files are in 2.8 format.)
I haven't really dug into any of the config files yet, so I guess that'll be my next stop. I assume joel0407's walkthrough is still relevant?
-Bats
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23178
- Thank you received: 4862
I haven't really dug into any of the config files yet, so I guess that'll be my next stop. I assume joel0407's walkthrough is still relevant?s
I don't see anything very wrong in that, no. It is fairly old, but was written after the joints-axes changes had settled out.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
- Posts: 10820
- Thank you received: 3566
I couldn't find anything that looked particularly gantryish (or slaveish, or XYYZish, or otherwise promising-ish) in stepconf on a short-lived wheezy/2.9 install, so unless I'm looking for the wrong thing, I'm going to hazard a guess I probably won't find it in 2.8 either.
-Bats
I'm not sure if so called joint axis gantry machines introduced in V2.8 made it into stepconf (which I've never used) , but they certainly did for pncconf, the Mesa equivalent.
The original workaround which is not too hard is to configure a XYZA machine and edit the hal and ini files by hand to make it an XYZY machine. the big difference from V2.7 to V2.8 is that a clear distinction was made from Joints (or motors) and axes. V2.7 hardcoded joint mapping to axes via XYZA etc to joints 0,1,2,3....9 when in V2.8/V2.9 we can map these joint however we want (eg to XYYZ or in my case due to historical stuffups a YYXZ machine).
Whether you use 2.8 or 2.9 is not really an issue in my view. I started with V2.8 to get the joint axis features just after it was released and have not often been stuck with a bug. When they occurred, they got fixed quickly. Once you had a working config, there was no need to upgrade... unless it was to fix an issue that affected you.
Please Log in or Create an account to join the conversation.
- Bats
- Topic Author
- Offline
- Senior Member
- Posts: 55
- Thank you received: 7
Sadly, it looks like pncconf didn't want to its toys with stepconf. Or I'm still looking for the wrong thing.I'm not sure if so called joint axis gantry machines introduced in V2.8 made it into stepconf (which I've never used) , but they certainly did for pncconf, the Mesa equivalent.
It looked like stepconf may still be stuck in that sort of mindset. Even in 2.9 it only offers a handful of preset axis configurations (XYZ, XYZA, XZ, XYUV, and XY, I think?), and XYZA (the only option that allows four axes to be configured) insists on treating XYZ as in/rev & in/sec and A as deg/rev & deg/sec. XYZ didn't seem to have any options that screamed "Hey, man - wannaV2.7 hardcoded joint mapping to axes via XYZA etc to joints 0,1,2,3....9 when in V2.8/V2.9 we can map these joint however we want
Ok, this suggests there's something I'm fundamentally misunderstanding about joint nomenclature. How would XYYZ differ from YYXZ or YXZY (we'll leave XYZZY for another adventure)?(eg to XYYZ or in my case due to historical stuffups a YYXZ machine).
That's comforting to know, since it was easy to switch from 2.7 to 2.9, but going to 2.8 was proving to be rather more complicated. So, at least for the moment, I'm on 2.9.Whether you use 2.8 or 2.9 is not really an issue in my view. I started with V2.8 to get the joint axis features just after it was released and have not often been stuck with a bug. When they occurred, they got fixed quickly. Once you had a working config, there was no need to upgrade...
About that... It looks like a Gecko_G540B4 config - which works with axis - crashes immediately after the splash screen when set (in stepconf) to gmoccapy, while Gecko_G540B3 seems to behave as expected with both screens. Although it's far too early to know whether that'll even make a difference to me (never mind digging into the... err... extremely robust error message) - just an observation.unless it was to fix an issue that affected you.
-Bats
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23178
- Thank you received: 4862
You could make an YXZ.....Y if you really wanted.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
- Posts: 10820
- Thank you received: 3566
Ok, this suggests there's something I'm fundamentally misunderstanding about joint nomenclature. How would XYYZ differ from YYXZ or YXZY (we'll leave XYZZY for another adventure)?
It makes more sense on a Mesa 7176e card where the stepgens on the boards are numbered 0,1,2,3,4 (these coincide with joint numbers). I'm not sure how its done on a parallel port.
The problem is that the Linuxcnc core has been updated but Stepconf hasn't. I've long maintained that stepconf and pncconf should be updated to speak joints and just have a field where you key in the string XYYZ or whatever you want. But this breaks decades of behaviour and would involve an awful lot of work rewriting the config tools and nobody hears me. But people like you and I have only ever used the joint model.....
Whether an axis is linear or rotary is controlled by a setting in the ini file so it sounds like you are about to throw out stepconf and learn to edit hal and ini files from this point on.
About that... It looks like a Gecko_G540B4 config - which works with axis - crashes immediately after the splash screen when set (in stepconf) to gmoccapy, while Gecko_G540B3 seems to behave as expected with both screens. Although it's far too early to know whether that'll even make a difference to me (never mind digging into the... err... extremely robust error message) - just an observation.
-Bats
It is much better to open a terminal window and run linuxcnc from the command line (just type linuxcnc). Then the errors will be displayed on the console so debugging is much easier. The error is there, sometimes its cryptic to understand at the beginning but you will get better. Copy and paste the errors to a text file and upload it here and someone will help. Also post your ini files and hal files
Please Log in or Create an account to join the conversation.
- Bats
- Topic Author
- Offline
- Senior Member
- Posts: 55
- Thank you received: 7
I think that gets to the heart of it - and it's sort of inherent in the open source model. Nothing ever gets done until it annoys (or interests) someone enough to figure out how to do it & put in the "awful lot of work" for everyone else. Of course, from an enduser (rather than developer/contributer) perspective, that tends to get interpreted as either "learn to code" or "pester coders until you become the thing that's so annoying it needs to be fixed", either of which can be a little offputting (and I say that having spent time on all three sides of the problem).The problem is that the Linuxcnc core has been updated but Stepconf hasn't. I've long maintained that stepconf and pncconf should be updated to speak joints and just have a field where you key in the string XYYZ or whatever you want. But this breaks decades of behaviour and would involve an awful lot of work rewriting the config tools and nobody hears me.
That, and rewriting old broken stuff with decades of accumulated cruft isn't nearly as much fun as working on new stuff. Especially when you know you'll inevitably catch flack for breaking something else that happens to depend on the broken cruft staying broken.
Of course, another option might be to just pile on a bit more cruft - leave stepconf more or less as-is and toss together a module/hack at the end (or even an independent script) that just automates the manual edits on the stepconf-created config files. It's a bit of a bandaid, horribly inelegant, and I don't know whether it would be practical for arrangements more complicated than XYYZ, but it could at least smooth out some of the bumps in the setup process for gantry users.
(And now's the point where I start feeling reeeally awkward because I just suggested an "easy" way to improve a process I have yet to even get working, on a system I have a demonstratedly poor understanding of, and requiring "simple" skills that I'm not at all sure I still possess. Maybe everyone's better off if I just try whining until someone decides to "fix" me )
I have to admit, I was actually a little shocked by the process to set up a gantry system - not because the config files are particularly obtuse in themselves (although I won't pretend to understand most of what the .hal file is doing), but just because such a prevalent class of machines essentially require hand-tweaked setups on a devel branch of the software. I guess I expected it to be long-settled territory by now.But people like you and I have only ever used the joint model.....
Yup - and that's what I've been doing. I'd just started out looking at it in hopes that starting with XYZA might offer some buried options to change it to XYZ[n]. So far it's going at least moderately well.Whether an axis is linear or rotary is controlled by a setting in the ini file so it sounds like you are about to throw out stepconf and learn to edit hal and ini files from this point on.[
I got the ini & hal files edited to add the fourth joint, and eventually got it running (after discovering the howto had left out a key edit). It pops an "Unexpected realtime delay on task 0" error, but does let me jog the X, Y, and Z on the machine. The only problem (aside from the latency error, which can wait until the fundamentals are working) is that the fourth axis - set up as a second X for my convenience, due to machine orientation - doesn't move, or show any activity on the step or dir lines.
Thanks for the tip. The trick was finding the error in the first place, in the 1200 or so lines the crash dialog helpfully provides. The command line had a significantly more concise output.It is much better to open a terminal window and run linuxcnc from the command line (just type linuxcnc). Then the errors will be displayed on the console so debugging is much easier. The error is there, sometimes its cryptic to understand at the beginning but you will get better.
If someone's really bored and trying to hunt down the bug I could probably write up a quick repro (since it came from working entirely with unedited stock configs), but otherwise it's not really relevant - it was a result of doing things that didn't need to be done using a config file I shouldn't have been using in the first place - but I'm attaching the ini & hal files. I've still got more fiddling left to do on my end before giving up, but someone else may well spot a glaring error that I'm still days away from actually understanding.Copy and paste the errors to a text file and upload it here and someone will help. Also post your ini files and hal files
-Bats
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
- Posts: 10820
- Thank you received: 3566
I suspect that most gantries today are set up with Mesa hardware because the parallel port is pretty much obsolete on PC's today and therefore there is a reluctance to add features to stepconf to support such obsolete hardware.
The mesa tools handle what you want.
Please Log in or Create an account to join the conversation.
- Bats
- Topic Author
- Offline
- Senior Member
- Posts: 55
- Thank you received: 7
If said someone is actually interested, I have no aversion to helping troubleshoot - I just didn't want anyone to waste their time thinking it was anything I needed a solution for. Although it looks like the significantly more concise output in this case is significantly less concise than on my other crashes - gmoccapy wanted to make a bit of noise on stdout, too.That significantly more concise output from the command line would be very helpful for somebody who is not really bored, does not have time to speculate on what might be wrong in your config files but still wants to help to zero in on the fault.
I've attached the full report, but it looks like this is the meat of the problem:
Note: Using POSIX realtime
/usr/bin/gmoccapy:325: GtkWarning: Invalid icon size 48
self.widgets.window1.show()
(gmoccapy:3683): GtkSourceView-CRITICAL **: gtk_source_language_manager_set_search_path: assertion 'lm->priv->ids == NULL' failed
pyvcp_options.hal:8: Pin 'pyvcp.spindle-speed' does not exist
Note: Using POSIX realtime
I suppose I've always had something of a weak spot for the obsolete - I think the first open source project I ever contributed to was lynx, while everyone else wanted to play with bright shiny Mosaic. Or maybe the obsolete just sort of magnetically accumulates around me - it's hard to tell, sometimes.I suspect that most gantries today are set up with Mesa hardware because the parallel port is pretty much obsolete on PC's today and therefore there is a reluctance to add features to stepconf to support such obsolete hardware.
Unless what I want is to connect via a parallel port. Point taken, though.The mesa tools handle what you want.
In my case, I definitely haven't ruled out going the Mesa route, but, like with the Smoothstepper and Mach3, I didn't like the idea of investing in a hardware interface that would lock me into one particular software package - especially without some time actually running LinuxCNC first.
-Bats
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
- Posts: 10820
- Thank you received: 3566
www.forum.linuxcnc.org/gmoccapy/32186-mo...e-side-panel-problem
this is a bit different but I suspect its a load order thing. I would post in the gmocappy forum and I think Norbert the gmoccappy author will be along to help.
Please Log in or Create an account to join the conversation.