- Use the machine to drill 4 holes at the corners of a square (or rectangle), e.g at (x,y)=(0,0);(0,100),(100,100),(100,0).
- Measure the diagonals of the square/rectangle accurately.
- If the diagonals aren't equal, your machine isn't square, so either draw the actual dimensions in a CAD program to find how far from perpendicular your axes are, or just calculate it.
- Offset, and try again... repeat until you deem it square enough.
I find that drilling 4mm holes in a piece of MDF, then pushing 4mm drills into the holes and measuring the center distance with a digital caliper works well and is repeatable. Since I don't have limit switches (a case of a few years ago 'oh it works, time to use the machine now not carry on with wiring'), I just make marks on each rotating nut which align with a mark on the housing when the gantry is square. Then I check that the marks are aligned when I switch the machine on - I can see if the marks are out by about 1/4 of a step, so it's accurate. The machine stays square when switched off unless accidentally knocked...which is fair enough really. If I crash it then I do the above squaring procedure and I do it every 6 months or so just to make sure.
The principle with Arduino's is they provide you with an extensive library of functions that make it very easy to code things as it adds an abstraction layer between the user and setting the microcontroller registers. For that reason I tend to dislike Arduino's because the built in functions limit what you can do to fairly simple stuff, so you end up having to program the microcontroller directly and therefore might as well do that from the start. However in this instance I think it's simple enough for the Arduino language to do what we need. Also, you don't need a programmer (Pickit or whatever) as they program via USB.
The way I envision is for the Arduino to send the step and direction signals to the two X motors and read the limit switch signals, so it takes control of the machine to make it square, then leave the X axis in the home position. The normal machine controller can then take over. We could add potentiometers to set the feedrate and acceleration for homing, or just leave it in software. One extra input for e-stop I guess...
So I think it's worth me acquiring an Arduino and trying it, then I'll post the code and wiring diagram here. Not sure how long it'll be until I have chance to do it, but if someone who already has home switches is willing I'll happily help them wire it up and program it over Skype. One of these should suffice. Jazz could also use it for this.
Last edited by Jonathan; 29-11-2014 at 12:53 PM.
I know that these kinds of threads drift around and about the topic sometimes, but for me it often helps to air issues and aspects that I haven't really thought about. So...
The name of the game is to get the gantry square, and keep it there while the machine is working. To do this, we need a way to measure gantry squareness, at least as a one-off operation (and assuming that we don't crash it into anything). Jonathan's method sounds simple although I'm sure that other people have their own favourite techniques. OK, so we have set the gantry square, maybe by manually turning the leadscrews. Now we need to be able to rehome to that position. Jonathan's manual method, again, sounds simple and appeals to an engineering mind - why do it a complicated way when an easy and cheap way exists? I'm sure that marking a pulley for a rotating screw system would work equally well. But if we have home switches, then it sounds nice if we could just press a button and get the homing done automatically. That means setting the gantry square, and either moving the home switches or their actuating targets so that both switches fire at once, or use some method to measure the home switch offset and calibrate that out in the software/config parameters. The separate "homing and measuring by Arduino" could do that - although it means swapping driver inputs or finding some other way to combine drive signals? - or use something like the IP-S which does it in firmware. I suspect that this is the bit that is missing from the IP-M - it can drive two motors simultaneously to home master and slave, detecting separate home switch activations, etc, but cannot do the measuring or do the offset in firmware. So, it will need mechanical home switch adjustment. Don't know how difficult this is in practice?
Then, we come down to operation. That means pulsing two drivers in synchronism. You shouldn't just wire two controllers in parallel and drive them from the same BOB output; in theory it might work but I can see that if the driver inputs are opto-isolated, there could be issues. So, ideally, you need a way to generate synchronised drive pulses on master and slave axes. That could be via Mach3 (can it do that internally?) or LinuxCNC (same question), or something like the cheap BOB I use which can copy one input axis into two output axes, or a motion controller that knows what to do. That's something that the IP-M could not do in the past but I guess can now do. However, unless we have a system (which probably means external motion controller) that can automate dual-motor homing, we must use a manual homing mechanism as described by Jonathan - which doesn't sound like too big a deal.
Anyway, I don't think that I've said anything new here, but thinking out loud does help clarify my own thoughts! Probably bores the pants off the rest of the world, though...
Jazz - if you get a chance to test the IP-M, I'd be very interested in the results, if only to find out what functionality is in there, but I realise that you have plenty of other things on the go and I don't need to make a decision for a while anyway.
Jonathan - I tend to prefer thinking in Arduino terms only because I have one in my 3D printer and started there. I've done a bit of work with them since and found out that it's pretty easy to burn firmware into them as needed for dedicated jobs which has been useful, but I've no particular axe to grind one way or the other.
To me the goal is to use the machine and it be accurate. If I have to start programming Adhoc micro processors to do what is in affect a simple operation then i'm not interested and neither should I have to be.! . . . . . If your prepared go to the bother of programing hardware then why bother buying any controller or drives and just build your own.??? . . . Why not because it aint worth the trouble trying to re-invent the wheel.
Most people with steppers don't buy the IP-S because it can do slaved motors or calculate switch error (they are daft if they do or have too much money.!) They buy it because it's quality unit which is very powerful, versatile which offers industry standard I/O with an easy upgrade path to using high count servo's and getting the full potential from them at a later date if required.
Yes other controllers like the ESS can do this but they don't have the quality or smoothness like the Cslabs products and not until you have experienced both or several manufactures controllers do you know this.! . . . . I've yet to use anything in the same price bracket that comes near the Cslabs stuff.!! . . . If I had I'd be shouting about it.!!
Jazz, it would be MUCH appreciated if you could spare the time and do a test for us on the IP-M slaving!
It's amazing how cheap Arduino's have become, but I'm starting to like them over a raw PIC just for the ease of programming and deploying them - writing a sketch is very quick in the IDE on the PC then testing it is arguably much easier, IMHO, than doing the same with a PIC and the PICKit or writing some code on a Raspberry Pi.
Just had a reply from CS Labs:
"CSMIO/IP-S controller thanks to the slave axis function uses two limit switches placed on both sides of a gantry.
With the an advanced algorithm it homes both motors simultaneously and after that it performs gantry geometry correction.
CSMIO/IP-M controller uses one homing switch mounted on one side of a gantry.
Slave axis function in CSMIO/IP-M controller works the same like you would connect two drives to one step/dir output. "
So, no decent homing/squaring function on the dual-motor axis. It just copies master step/dir signals to a second slave output. A bit disappointing. I had hoped that they had copied at least some of the IP-S firmware to the IP-M but apparently not. Still, we've already discussed "manual" homing techniques, so maybe it's still worth going IP-M for build quality/performance, etc.
Last edited by Neale; 01-12-2014 at 02:59 PM.
Once the Arduino has set the gantry square, you can safely send the same signals to both drivers and leave the Arduino idle, or even use it for some sort of fault protection to monitor both motors and detect loss of synchronization.
Originally Posted by Irving
It's occurred to me that one could quite easily program LinuxCNC to set the gantry square by making a profile that defines the X axes motors as separate axes. You then run some G-code (or something more sophisticated, who cares) to set the gantry square, then load the normal profile to run the machine.
Last edited by Jonathan; 01-12-2014 at 04:53 PM.
Well Neale, that's not all bad news and I'm seriously considering the IP-M for my build. Like you say its probably worth it to have a reliable controller even if the x squaring would be manual on a slave setup.
I mention my view on this this in the video so I won't repeat my self.! . . . . Watch the video.
Edit: Also don't be put off by Nah sayers who have no experience of using these controllers.! . . . . They wouldn't be so Negative if they'd used one. This exactly why I try different controllers or products and make my own mind up rather than listening to others because there are too many people too quick to knock or recommend products they've never experienced.
Last edited by JAZZCNC; 01-12-2014 at 08:32 PM.
The Following User Says Thank You to JAZZCNC For This Useful Post:
Thanks Jazz its great to actually see this controller in action. Just made up my mind, I want one of these IP-M's for my machine.
By Matt81 in forum Motor Drivers & ControllersReplies: 3Last Post: 03-05-2014, 09:56 PM
By Tenson in forum Artsoft MachReplies: 14Last Post: 03-03-2014, 10:43 PM
By Greeny in forum Marketplace DiscussionReplies: 20Last Post: 14-11-2013, 10:59 PM
By LoveLearn in forum New Member IntroductionsReplies: 2Last Post: 25-01-2012, 07:46 PM
By 7AxisCNC in forum Manufacturer NewsReplies: 0Last Post: 17-05-2011, 01:04 PM