. .
Page 1 of 2 12 LastLast

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by Jonathan View Post
    It would be pretty trivial to program a PIC/Arduino/pick-your-favourite-microcontroller to square the gantry and let you enter offset numbers to save very fine adjustment of limit switches, so I wouldn't pay more than a few £ more for a motion controller with this feature.
    Well how about sharing the code with us mere mortals ..Clive

  2. #2
    I would agree that programming an Arduino (just because I know that one) would be pretty easy if all I wanted to do was measure offset between a couple of not-quite-accurate home switches. I haven't thought through the details, but I suspect that that is only simplifying what is not a particularly difficult task anyway. Measuring gantry squareness seems like the biggest issue rather than tweaking switch positions and that's common to all setups. However, I'm not sure that I could use those values in any of the usual solutions, so the straight hardware-based "tweak switch until dual-homing leaves the gantry square" solution seems inevitable.

    I currently use LinuxCNC and I've had a look at that from the point of view of dual-motor homing and operation. It seems somewhat incredible that with all its users, there still seems to be no official solution to this particular problem. From what I see and read, it seems to be bound up in the internal representation of a machine which makes a generalised solution very difficult, although I did wonder if a custom job for my particular machine geometry might not be possible. Still, at the time, the latency of my garage/CNC PC was such that an external motion controller looked like a good option for my Mk2 router, despite needing a move to Mach3. Then the motherboard went pop a week or so back, and the cheap replacement is performing much better, so I'm just confused.

    Stay with LinuxCNC? That forces me to single-motor/twin belts, but I probably now have sufficiently low latency figures that I can get reasonable performance. Dual-motor? That means Mach3 (or one of the dedicated hardware/software combinations like PlanetCNC). What I don't want to do is invest in kit that limits later options, at least not unreasonably, and the CS Labs boxes seem to have a decent reputation from the point of view of reliability, etc. Hence the interest in this new IP-M development.

  3. #3
    So Neale what you do normally when you start your machine? Bump the gantry to some gantry hard stops as a dedicated Linux user?

    Its seems incredible, but its the same with Mach3. I am sure half of the motion control plugins are not capable of it or are very obscure. Mostly cause people who write them have mills and dont have a way to try it or think that all people in the world use servos with absolute encoders.

    The way i see it it is a must for steppers.

  4. #4
    No, my current machine doesn't even have home switches, so I'm not exactly pushing the limits of LinuxCNC!
    I know that LinuxCNC does not support master/slave motors; thinking about it, I've never looked at whether or not Mach3 supports this natively (via parallel port, no motion controller). Is this a capability that comes from a motion controller, not Mach3?

  5. #5
    So what you need is someone with a IP-M to test this for you.!!. . . . . Ermmm

    Well It just so happens I know a guy, who knows a guy, who's got a friend who knows a Gal, who's brothers got a couple sitting around doing nothing. .

    Ok I'll try and test how it works for you. Not got a dual axis machine in a build state to test just at minute but I'm sure I can Rig up something to test how the motors sync and home on the bench.!. . . . Leave it with me a few days(weeks,months,years!!)

    I've Nagged CSlabs brains out for this option since I started using these and it was mentioned that it couldn't be done due to hardware restrictions so I'm intrigued my self.?
    I suspect it will work just like any other mach3 motion controller in that each motor just hits the switch and backs off. The IP-S works the same with steppers, thou it can HOME using the Index signal of servo encoders or if shaft encoders are fitted, where the IP-M can't do this I believe.
    The IP-S also has an option to measure the trip error between switches and correct. This works very well because I tested it the other week using dial gauges and setting a large error. It brought it back perfectly to within 1000's/mm.

    It also the option to measure and Not correct the error just display error in the plugin.
    Know to me the this is useful but not like your probably thinking.? It's useful to me for setting the switches accurately as it works out the error between them so I could set the gantry square without twisting the gantry to make square, Which you don't want or need too ! . . Now I'm sure Golden Balls could easily do all this with the Pic up is arse.!! . . But I'm into using machines which means I want a quick way to set the machine accurately and forget not thrashing the few remaining bits of gray matter or pulling my Togger over capabilty's of Pic.!

    I'll most a Vid if I get time.
    Last edited by JAZZCNC; 29-11-2014 at 11:51 AM.

  6. #6
    Quote Originally Posted by Neale View Post
    Measuring gantry squareness seems like the biggest issue rather than tweaking switch positions and that's common to all setups. However, I'm not sure that I could use those values in any of the usual solutions, so the straight hardware-based "tweak switch until dual-homing leaves the gantry square" solution seems inevitable.
    You can measure the squareness of the gantry as follows:
    1. 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).
    2. Measure the diagonals of the square/rectangle accurately.
    3. 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.
    4. 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.

    Anyway...

    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 01:53 PM.
    Old router build log here. New router build log here. Lathe build log here.
    Electric motorbike project here.

  7. #7
    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.

    - Brian

  8. #8
    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.!!

  9. #9
    Jazz, it would be MUCH appreciated if you could spare the time and do a test for us on the IP-M slaving!

  10. Quote Originally Posted by Jonathan View Post
    ... Jazz could also use it for this.
    Gosh, I'd forgotten all about that thread...

    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.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Similar Threads

  1. ES-D1008 + CSMIO/IP-S wiring
    By Matt81 in forum CS-Lab (CSMIO)
    Replies: 3
    Last Post: 03-05-2014, 10:56 PM
  2. Home Switches & Slave Axis in Mach 3
    By Tenson in forum Artsoft Mach (3 & 4)
    Replies: 14
    Last Post: 03-03-2014, 11:43 PM
  3. CSMIO/IP-M vs Ethernet SmoothStepper (Begone foul parallel port!)
    By Greeny in forum Control Hardware & Systems
    Replies: 20
    Last Post: 14-11-2013, 11:59 PM
  4. NEW MEMBER: Goal - Enable 3-Axis CNC Bed Mill to Perform 5-Axis Milling
    By LoveLearn in forum New Member Introductions
    Replies: 2
    Last Post: 25-01-2012, 08:46 PM
  5. Precision metal processing (3 axis, 5 axis, 7 axis) OEM
    By 7AxisCNC in forum Manufacturer News
    Replies: 0
    Last Post: 17-05-2011, 02:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •