|
Post by Roger on May 4, 2018 21:37:51 GMT
After putting it off for years, I've finally downloaded and played with Mach4 with a view to using that instead of Mach3. Although Mach3 has served me well, it's getting very long in the tooth and I thought that Mach4 had been about long enough to be pretty well sorted out by now. My first impressions are that this is very far from being the case and I might have to revert back to Mach3 while the issues are resolved. A quick note on the setup that I've got.... 1) The interface is a CM106-ESS board which connects to the Windows 10 PC through a dedicated network card with a fixed IP address. This is so that I can use the main network connection for the internet and hence the cloud for distributing CAD/CAM files. 2) The drives are SureServo AC Servos using Step and Direction inputs like a Stepper Motor uses. 3) I have a Wirelss MPG like this one which works fine with Mach3 I took screen shots of the many Mach3 setup configuration screens so I could refer to those when setting up Mach4 Suprisingly there's no Wizard for importing the Mach3 setup file, you have to set it all up manually. Much of it is similar enough to do easily, but the more general purpose nature of the inputs and outputs I find confusing and there's no user guide. The only YouTube videos I found showed different layouts on the relevant pages, so they were obviously for an early version, so that's not much help. Still, with a bit of experimentation I managed to get it all to move in the right directions and distances and run the spindle. The MPG was another matter entirely. The one I have isn't supported with a driver from the manufacturer so I though that would have to be replaced. As it happens, some clever soul has written his own driver which seems to work and supports all the buttons I use. You do have to go through hoops to get the unsigned driver to install, but it is possible. To get the sort of accuracy I'm used to, I need to set up the backlash compensation, and that's where we hit the buffers. It would appear that this isn't implemented correctly and we're still waiting for an updated plugin for that. I've written a little program that moves the X-axis back and forth by 0.1mm and I'm using the clock to measure the position of the spindle compared to the table. I'm getting 80 microns instead of 100 microns, so were losing 20microns or just under a thou in old money. That's no good, it needs to be less than 5 microns really. You can go into the ESS plugin and tell it to use backlash compensation. You then put the distance against the motor in the setup page for those. You'd think that this was all you would need to do, but it's not that simple. The AC Servo is very dynamic, and there's a hammer blow each time it changes direction. Changing the Acceleration and Velocity to very low values helps, but go too far and it crashes the program. The backlash compensation then almost works. If I put in 20 microns then it overshoots and I get 110 microns travel. That doesn't really make sense. Changing it to 10 microns backlash results in it hesitating in the middle of travel and no compensation ie it's back to 80 micons as if it were turned off. So I don't know what the hell's going on, but it makes no sense and it's pretty much unusable as it is. I'd also have to say that the layout of the default screen is a total mess and it seems flaky in operation. I think that all needs to go in the bin and for me to design a really clean and simple interface without all the junk they've filled it with. So overall I'm not that impressed since this have been released for around 4 years. I'm really surprised that these issues haven't been resolved since it's pretty fundamental stuff.
|
|
uuu
Elder Statesman
your message here...
Posts: 2,856
|
Post by uuu on May 5, 2018 6:40:25 GMT
That's really disappointing. I'm on Mach3, using parallel printer ports, so am one step behind you. Sooner or later I'll need to go to USB or ESS, so upgrading the software at the same time would be logical. Mach3 is a sweet program. Although untrained, I write software as my day job, and it reminds me of some of my early efforts, and gives me a smile. But it has bugs, and is long overdue for overhaul. Wilf
|
|
|
Post by Roger on May 5, 2018 7:33:18 GMT
That's really disappointing. I'm on Mach3, using parallel printer ports, so am one step behind you. Sooner or later I'll need to go to USB or ESS, so upgrading the software at the same time would be logical. Mach3 is a sweet program. Although untrained, I write software as my day job, and it reminds me of some of my early efforts, and gives me a smile. But it has bugs, and is long overdue for overhaul. Wilf Hi Wilf, I agree with your thoughts on Mach3. I think they just kept nailing on new features in an attempt to please everyone and it's become a monster full of holes. I was disappointed that they didn't pare it right back to basics for an initial solid Mach4 release and then rationalise the rest but it would appear that they went straight in and ported the whole lot onto a different platform. Doubtless it's mostly new code, but I doubt if it's any more robust as a result. Time will tell. On the positive side, you can now design your own screens thank goodness, so I can bin 90% of the functions and hopefully make it more robust in the process. I haven't tried to run from part way through a program yet, I can only hope that they started from scratch with that, it's positively dangerous on Mach3.
|
|
uuu
Elder Statesman
your message here...
Posts: 2,856
|
Post by uuu on May 5, 2018 9:52:32 GMT
I've got on quite well with the screen designer in Mach3 - it's horrible, becuase it has a graphical image background, which you have to design first, then overlay with the screen components, but you can get there in the end. I'll send you the .set file I use, and John the Pump's
Wilf
|
|
|
Post by joanlluch on May 5, 2018 10:04:33 GMT
Wilf and Roger, I've been writing complex software too as a full time job and the opening post from Roger made me take a look at the Newfangled Solutions site, which I understand are the developers of the software you are describing. The shocking thing that I found on the site is "Mach4 is completely new software with less than 1% of the programming code in common with Mach3". Well, that says it all. They implicitly acknowledge that the code of the previous/current version is unusable, possibly a complete mess. I mean, properly made commercial software is supposed to be fully planned before even the first line of code is written, and then coded in reusable and scalable ways as well as fully documented. There should never be a reason to start it over and write it again from the ground up, unless there's nobody that actually understands the existing code or it has become a complete mess due to lack of planning or proper documentation, or it was simply made by someone with little coding experience and must be trashed. What is worse is that based on Roger's comments, the new Match4 version does not look to be any better from the Software quality point of view. In view of that, if it wasn't because I'm currently on other subjects and suffer from some health issues, we could even consider starting a small business to create an alternative software that would start with the basics and make everybody happy. I may be omitting something fundamental but I don't think that a first version aimed at CNC hobbits would take more than 6 or 9 months of full time work to be completed by a team of at least one experienced real time programmer and one CNC guru. It's a pity that we need to wait that long for something that is not even basically functional.
Joan
|
|
|
Post by Roger on May 9, 2018 9:07:25 GMT
I've just downloaded the V219 ESS driver that was supposed to fix the Backlash Compensation issue, and it's even worse than it was with V216. So I've fed back the results to the Forum in the hope that they will sort it out.
It did make me think about checking the settings I've been using on Mach3 and I've improved that by 14 microns in the X, 24 microns in the Y, and 24 microns in the Z axis. I'm surprised it was that far out, but then it's done a lot of miles since it was originally set up, and I didn't have such an accurate way to doing it as I'm using now.
To set this up, all I do is set the Backlash Compensation to zero and then run a program back and forth 100 microns, measuring the actual travel using the 2micron clock which equates to half a turn. The compensation required in the software is the difference between the actual travel and 0.1mm. It's simple and quick to do, and if it's right, the compensation will bring it exactly to 100 microns. I reckon they all repeat to about 2 microns now.
So for the time being, I've switched back to Mach3, Mach4 is unusable in its current state.
One other thing to note is that the Device Driver for the MPG pendant has to be completely uninstalled from the Device Manager else the driver won't release the pendant for use in Mach3
|
|
|
Post by Roger on May 17, 2018 11:41:33 GMT
A bit more progress on this today because they've issued a new ESS driver build 220 which finally appears to do the backlash compensation correctly. All axes now move back and forth 0.1mm when the program runs to those measurements.
However, using the MPG is a bit of an adventure since the driver doesn't work properly. The default initial step is taken from whatever the first increment in the config table is, say 1, and that's taken to be inches, so it moves 25.4mm! Yikes! If you change the increment by pressing the button on the MPG then it does cycle between three values, ignoring what's in the table. The values aren't correctly registered on the MPG, they're shown as 10x too small, but I could live with that.
The screen layout is frankly a joke in my opinion, and that's going to get a radical pruning job. Things don't work like they did in Mach3, the spindle doesn't stop at the end of the job and I can't see a control to make it do that! The MID is now a list of commands that you have to then press Cycle Start to make run. Again, it's too complicated and just gets in the way of what you're trying to do. Just a single line with Enter to execute it is all that's required. The way it is, you have to be careful to clear the box else it does all the previous commands too!
Single stepping now appears to require a Stop before you can run continuously too, I have no idea why.
Anyway, I've gingerly done my first job with it, and I'll persist and beat it into some kind of usable shape where it does what its told. It's all unnecessarily painful. In my opinion, they should have kept it much simpler and hence more predictable and reliable.
|
|
|
Post by Roger on May 20, 2018 19:19:28 GMT
I've been trying to get the MPG to behave and given up on that for the time being. It's just not safe as it is because you can't be certain about what it's supposed to do.
The latest version of Mach4 now includes a stupidly named "Zero Brane" editor that lets you edit and debug scripts if you know what you're doing. I've had a play with it after watching their new video on YouTube which is very helpful. Getting my head round how the system hangs together, where the functions and scripts are saved and what you can and can't do with each is not easy. I'm on information overload at the moment but making progress if a little slowly.
I'm getting the hang of the screen editor and have made quite a few changes to make it less cluttered and safer. I don't need to have reference buttons near the DRO zero buttons!
Fortunately there's a forum for Mach and some kind souls are trying to help me out. When I know a bit more about it, I'll post some useful nuggets that others might find useful if they go down this route.
|
|
|
Post by Roger on May 24, 2018 15:12:18 GMT
I've managed to do a few jobs with Mach4 now, but I'm still a bit unsure as to the reliability of the ESS plugin that handles all the motion control. I noticed some clunks in the motion so decided to customise the backlash compensation acceleration value, but made a mess of that by not realising I'd set it way too small. The result was some sluggish behaviour and pauses that made me think the buffer was running out of data.
Anyway, that now spotted, I've changed the velocity of the backlash compensation to 300mm/min (the default is 3000mm/min ie the max traverse rate of my machine) and the acceleration to 10mm/S^2 (the default is 1000mm/S^2) I ran the table back and forth at various speeds, watching the dial clock move to see if the backlash and motion looked about right. Then the speed was increased as was the distance to see how it felt.
With all that seeming to be ok, I then ran the finishing 3D pass I had for the tool holders, knowing that the Z-axis would be given a hard time and it has the most backlash. It sounded pretty good, and much softer than running with the default backlash compensation values.
So I'm ready to use it a bit more now and see if I can customise it better to my needs.
There are a few problems with Mach4 in my opinion as supplied with the MachMill profile as follows...
1) It's not been given a thorough testing in my opinion, things sometimes don't happen when I think they should. The screen doesn't update when you change the DRO value for example. 2) The design is dangerous in my opinion. The MDI shares the same CycleStart button with the G-Code, so it's easy to think you're going to just run the program, only to find that you've left the MDI tab active, and it does whatever is in there instead! Yes, that's my fault, but it's an accident waiting to happen. That's going to get changed. 3) The MDI is now a multi line affair, where pressing Enter doesn't execute the command as before in Mach3. That's a real pain, it just throws a new line. Executing the command with the CycleStart runs all the lines in the MDI and leaves them there, ready to catch you out. I'm going to change the behaviour of this to delete after execution and see if I can make it work like Mach3. Single line commands are used all the time. Multi line commands can be programs. I really don't know why they changed it. 4) The graphic display performance is dire. That doesn't matter for small programs, but for one of my long 3D ones, it took three minutes to display the tool path. Mach3 does it in about 10-15 seconds. 5) The default jogging screen is as unnecessarily complex and confusing as the Mach3 one and needs changing. I've created new buttons to set the jog increment explicitly to 1mm, 0.1mm, 0.01mm and 0.001mm, setting the mode to Incremental. There's now also a button to set the increment to 1mm and to continuous for rapid jogging. I'm just figuring out how to make those buttons highlight like Radio Buttons so I can see which one is active. 6) The Feed Rate percentage value flickers and doesn't display a readable value. The same goes for the Spindle speed. This is pretty fundamental stuff, and that's why I don't think it's seen much testing. Both need fixing, and that takes understanding what underlies the displays. It all takes time, and it all should just work straight out of the box in my opinion. 7) The Single Step is tucked away in a tab rather than always being on hand, just as the Rewind button is. This needs some radical pruning and rearrangement to make it more sensible. 8) There's a major bug in that if you modify any of the configurations, unless you explicitly exit Mach4 and restart it, the Jog increments change to Inches, so 1mm becomes 25.4mm! 9) The MPG I have doesn't work any more, and there only appears to be one Pendant that's supported at the time of writing. I'm not about to spend out on another one, I'll manage without until such times as a proper driver is written for mine.
So upgrading is far from just downloading Mach4, putting in your settings from Mach3 and getting running. That's just not the way it is. There's no Wizard for reading the old Mach3 .ini file create a new one for Mach4, and that's a pain. I've taken screen shots of both Mach3 and Mach4 setup pages now and saved them for future reference. Mach4 is again installed straight off the C: drive which is stupid in my opinion. They give dire warnings for installing it elsewhere, even though that option is offered. It means that I can't put this in Dropbox so that the settings are automatically backed up. I've done that manually, but it's easy to forget to do that when you're gradually adjusting the settings while you've bedding the system in.
So, I'll run it some more, do more customisation and see how I get on. Watch this space.
|
|
|
Post by Roger on May 26, 2018 20:40:44 GMT
Just a few things learned about Mach4 that I can now share. There's a lot of documentation, but it's full on and in your face all at once, and it's hard to get a feel for how it's all put together under the skin.
Anyway, broadly speaking, this is how it works.
Mach4 is written using the lua programming language, one I've never heard of before. Like any other programming language, the syntax is confusing to start with and you have no idea about how the particular application is put together and what functions and system variables are available for your to customise.
Basically, the whole screen you're presented with when you run your screen profile, is one large file called ScreenScript.lua which you can view but never edit. This script is compiled when you edit the screen profile using Operator->Edit Screen then save the changes.
There are several types of scripts mentioned in the Scripting Manual.pdf document, but that doesn't tell you where they all are and how to edit them. When you edit the screen, there's a Screen Tree Manager on the left. This shows you everything that's on the screen. If you add a new button for example, it will appear in the tree. You have to take care to make sure it goes where you want it.
Button Scripts etc - If you click on a button for example on the screen that's being edited, you'll see that it appears in the Properties pane on the left. You can change the position, colour etc there. There's also a second tab with a lightning strike symbol on it, and that shows the events that happen when you do something like press the button down. You can select certain pre-programmed functions, but you can also click on the ... elipses at the Down script option for example, and that opens up an editor where you can insert whatever script you want. That's a whole subject on its own, and not what this is explaining. Those scripts aren't named or saved by you, they remain attached to the button and are compiled into the ScreenScript.lua where the compiler applies the appropriate name from the button and what the event is.
Screen load Script – I couldn't find this one. It's actually accessed by clicking on the very top item ie the name of the Screen in the Screen Tree Manager. It runs on initialisation to set up the screen and provide functions that can be accessed by all of the screen controls. You can double click on the script to see the sort of things that are in there. One is the combined G-Code and MDI Cycle Start button that's going to get chopped.
PLC Script – Again this is accessed in the same way as the Screen load script. There's an event called PLC script. These funcitons run every 50mS in the background to update things like DROs. Basically anything that needs to keep things on the screen in sync with what's changing in the variable.
Signal Script – Again accessed the same way as the above. It handles events that are caused from a variety of sources. In the default MachMill screen set Signals are defined in the Screen Load Script to control the behaviour of the Jog Mode. It's used to change the text in the Jog Mode button too. Search the Screen Load Script for the word 'Jog' to see what they've done. It can also possibly be used this to interface external hardware.
Anyway, these things all inhabit different environments, so you can't assume that you can access from one to the other. There are ways around this, but you have to read the manuals to find all that stuff.
The point is, that all of these things are compiled when you exit from editing the screen and they are compiled into that big script. I didn't think this was at all obvious and it doesn't seem to be explained clearly, if at all, in any of the manuals. Maybe I missed it. Anyway, the kind folk on the forum have furnished me with enough information for me to probably go ahead and make the necessary changes to the screen to get it to work how I want. I don't want to be an expert, life's too short, I just want to know enough to do what I want for the time being.
If you're interested in any of this, I would suggest that you download Mach4Hobby demo which is fully featured and will let you play and explore all this stuff. The documentation is in the installed files.
|
|
|
Post by Roger on May 28, 2018 20:29:53 GMT
Ok, it turns out that there's a bug in the Mach4 core which means that when you set the Jog Increment, it doesn't update the variable that you can access to see what the current increment is! I'm told that this will be remedied in the next release. I think there are a couple of other bugs too, so I've asked that they look at those at the same time.
So after much heartache and a mighty steep learning curve, I now have something that's beginning to take shape as a custom screen more suited to the way I need to use the machine. There are a few fundamental things that you need to get your head around, but once that's been done, I think that most modifications can be figured out with a little thought, help from the Forum and reading the scripts that are already there for inspiration.
|
|
|
Post by Roger on May 29, 2018 22:32:19 GMT
Ok, another day and another Mach4 bug. This is the one that scuppered using the MPG because I found that sometimes the machine would job 1" instead of 1mm, even though the machine is explicitly set to Metric and I never change it.
Having pressed a Mach developer on this, it turns out that whenever you change the Mach4 Config in any way, when you exit, the Jog mode defaults back to Inches, regardless of what the Machine units are set to be. If you press the Reset button, this seems to set everything back as it should be, but it's frankly dangerous.
So after much thought, I've now managed to add a script to the Enable button that forces Mach4 to use the Machine Inch/Metric choice so that I never get caught out. You have to disable Mach4 to be able to enter the Config pages, so you have to press the Enable button before you do anything else.
If you look into this issue, it's been highlighted in the Forum over many years. I suppose most people aren't as dogged as I am in insisting that these things work as they should rather than just accepting that sometimes it magically switches to Imperial units.
Another big step forward is a piece of code kindly donated by 'Daz the Gas'. He's shown how to create a single line MDI along the lines of Mach3, one that executes when you hit Enter. This is great, but it doesn't clear the text afterwards. Still, it's a big improvement. I've left the original multi-line MDI in place, but added a dedicated button to execute that. I'm just trying to figure out how to implement a Clear button to delete the text.
Anyway, it's all useful stuff and I'm making good progress towards making this work how I want.
|
|
|
Post by GWR 101 on May 30, 2018 15:14:13 GMT
Roger, that seems quite alarming, I wonder if they know something we don't and are just preparing for a return to Imperial units! . I will get my coat and exit stage left or should that be right. Paul
|
|
|
Post by Roger on May 30, 2018 15:37:51 GMT
Roger, that seems quite alarming, I wonder if they know something we don't and are just preparing for a return to Imperial units! . I will get my coat and exit stage left or should that be right. Paul Hi Paul, It's nothing sinister (God forbid we should ever be saddled by that obsolete system of units), it's just an oversight that they've not really engaged with. I think the majority of users are in the USA or use Inch units so they never see the issue. Most people are used to just pressing the Reset button as a precaution because of the way they use the machine, and that does set the units back to what the user has set as defaults. The developer seemed bemused at the idea that someone wouldn't press reset, but Mach 3 didn't even have one! Unless you edit the Config and then proceed without a reset, you'll never see the problem, and that's probably why it's been laying there dormant with only the odd occasion where users have reported the issue. They've never been pursued to explain why this happens, that is until I wouldn't let go of the issue and finally got an answer and an admission that it's a bug. They probably think I'm a pain in the arse, but that's two bugs that I've highlighted already that they didn't grasp were issues. These things are dead easy to fix, so it's good that they are finally being addressed.
|
|
|
Post by GWR 101 on May 30, 2018 17:04:02 GMT
Hi Roger,
Glad you are on the case, it just seemed alarming that if a quantity was entered in what the operator expected to be millimetres and the action was in inches then a movement X25 might have interesting results. I must get myself up to speed on this CNC machining as it seems to be a valuable asset. Regards Paul
|
|
|
Post by Roger on May 30, 2018 22:33:43 GMT
Hi Roger, Glad you are on the case, it just seemed alarming that if a quantity was entered in what the operator expected to be millimetres and the action was in inches then a movement X25 might have interesting results. I must get myself up to speed on this CNC machining as it seems to be a valuable asset. Regards Paul Hi Paul, It most certainly is alarming, that's a big move when you only expected a small one, and you wonder if it's ever going to stop. You just can't have unexpected movements like that, it's going to cause a big accident sooner or later. At least I know why now, so I've got a bullet proof fix so it can never happen. I've also now got a one line MDI input with <cr> to action it like Mach3 had. That's dead handy to say set a spindle speed or do a movement. You just enter the G-Code and hit enter and it executes that command. I use it all the time, and the multi line offering of Mach4 is hopeless in my opinion. CNC isn't for everyone, and it can be expensive too. I'm locked into Alibre and Mecsoft for the CAM now I have so many programs, and I'm just upgrading again because they're changing the licensing system. That's cost me over £1000. I'd certainly use Fusion360 instead if that was a viable option for me, but it isn't. At least I can justify it for commercial jobs, but it still hurts. I upgrade as infrequently as I can get away with, but I reckon my setup costs me about £500/year on average over time. In reality I do get my money's worth though, and software takes an awful lot of time and energy to develop and support.
|
|
|
Post by GWR 101 on May 30, 2018 22:43:31 GMT
It sounds like a must have these days particularly in a commercial environment. Unfortunately I left mainstream sub contract machining before CNC was adopted, so never had the opportunity to be directly involved. I have just a few live projects to finish off so hopefully I will make this my next project. Regards Paul.
|
|
|
Post by Roger on May 31, 2018 7:22:28 GMT
Hi Paul, If CNC interests you from the point of view of the machine itself, not just for what it can do, then that would be a great project. Personally I find them fascinating, it breathes sophistication and life into what are otherwise crude and limited machines. Fortunately, most of the hard work has been done by other people, so you can pretty much buy everything you need and know it's going to work.
Mach4 is still pretty new in development terms, because I believe it's the product of one individual. So although it's been around for quite a while, there aren't that many users yet and there are still some issues that need addressing like the ones I've discovered. Having said that, it's not the bag of nails that was Mach3, it's a properly put together piece of software that thankfully you can now have a realistic chance of customising when you don't like something. I'd be surprised if anyone would be happy with it straight out of the box.
Anyway, there's no magic to it, just basic Engineering to convert a machine to Servos and recirculating ball leadscrews. The electrical side is simple enough and there's a lot of support out there if you get stuck.
I look forward to seeing what you end up doing.
|
|
|
Post by GWR 101 on Jun 1, 2018 10:57:06 GMT
Roger, many thanks for inspiring me to take this on board as my next project. As I stated previously I have a few odds and ends to tidy up first, one being to fit an electric 130 psi pump into my drivers truck. I know this is frowned upon by some but as there is already a 12 volt supply for the "braking by wire system" and the club is fitting them to 2 of its loco's I thought I would follow suit. I will make an initial start by resurrecting a PC from storage in the loft and see what I can do with it. Regards Paul
|
|
|
Post by Roger on Nov 30, 2018 22:12:05 GMT
A bit of an update with regard to Mach4 and backlash compensation. So far, this hasn't worked and the lost counts have resulted in a lot of issues and damage to my machine vice.
However, I managed to isolate one glitch into a very short program and I've been discussing this with the software engineers who are developing the software for the ESS (Ethernet Smooth Stepper) board. This is a product that's not part of Mach4 but an add-on that works with a software plugin supported by Mach.
The good news is that they have now replicated the fault and they know why it's happening. Better than that, they are confident that they have a solution which I'll be testing shortly.
The backlash compensation was almost good enough, it was only this bug and a shortcoming the the strategy of applying the compensation in some unusual circumstances that was a problem.
Hopefully this will be resolved soon and then Mach4 will do what I need it to do.
|
|