Please Help - How to Configure a 5 Axis Head-Head

More
13 Jul 2023 23:08 #275379 by rodw

Rodw
Thank you! That link worked, I was able to get it downloaded that way. There are some things that I am familiar with on here and some things that I am not. I am still messing around with it.  I haven't found where to where to pull up a machine simulation yet or to see where the various kinematic models are, do you happen to know where to look for those? My machine isn't that unusual of a configuration so hopefully there is something preconfigured that will work, even if I need to change the orientation around (which is a good idea).
 

In the drop down menu, there will be a CNC menu and there you can find various Linuxcnc programs including LInuxcnc itself (which is little more than a shell or launcher where you can select the configuration or simulation you want to run. There are a lot of options there...
The following user(s) said Thank You: IronManDylan

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

More
13 Jul 2023 23:56 - 14 Jul 2023 00:11 #275386 by IronManDylan
tommy

So what is the 7i84 doing exactly? It is essentially just a breakout board, it can take the inputs from the ethernet and output to the steppers? 

The only thing that I am running off the machine is 6 stepper drivers and output for spindle speed control. the stepper drivers are just normal old stepper drivers.  3 of them are from steppermotor online and 3 of them are some other company that I don't know the name of. I currently have 4 inputs going into each driver (DIR+, DIR-, PUL+, PUL-) I believe that the PUL pin is also called the step pin on some drivers. So 24 output pins minimum I guess. Though I know that these can sometimes run off of 1 step and 1 dir pin too. I may want to add an output to control a solenoid at some point so 25.  None of my motors or spindle have encoder feedback.

Then I have homing switches on each axis. 2 of them are your old school limit switches. I believe those are just wired to 5 volts and then have their input going to the board. So 2 inputs there. I have a probe that is just a simple switch. So 3 now. Then I have 4 hall effect endstop sensors.  Those have 3 cables, but I believe only one output pin that goes high when is in proximity to metal.  So 7 inputs total.  Lastly, I wouldn't mind adding a handwheel at some point, but that isn't pressing or necessary.  Idk, how many inputs they require. 

Looks like the 7i96S is just 5 axis, and I will have 6 in total. So I am looking for another mesa board but there are like a million of them.  Is it better to find a board that has step & dir in the name? 


Spumco

Just to be clear the main reason I am worrying about post processing is that that is the main reason I can't seem to use my current Mach4 board.  I cannot find a post processor that will output gcode to handle all the kinematics of my machine (even though it can do the simulation of the machine in fusion 360 just fine).  Perhaps I could do more research on post processors and find or modify something that could get that Mach4 stuff running? But, having a controller that cannot handle TPC is obviously not ideal since I cannot really probe in my tool heights effectively. And my spindle simply has a an er collet, so repeat precise location of each tool really presents a challenge.  I'm sure I could figure something out but.. Anyway, I just want to make sure there is a clear path to success here, since not being thorough last time cost me a bunch of money and time. 

But, can you elaborate on making sure my laptop is stable? That is concerning.  I have a Debian Bookworm running right now on my lenovo thinkpad T440 and was able to get LCNC 2.9.0 loaded and opened.  But do I need to do some stress testing to make sure that it is stable? Can you recommend how to do this? 

Do you happen to have a link to the LCNC manual? I am not seeing anything that is clearly a manual when I do a search for it. I will definitely read it if you do. 

I don't know how to modify the GUI right now, do you have any information on where I should start on this?  If axis is the default, yes it is pretty damn rough looking, but I care much much more that it works than if looks good.  I don't know how to get vismach opened up in the GUI though.  I would like to look at a machine simulation and see what 5 axis machine setups are available. 

I added all the I/Os up above where I was responding to tommy.  Would love to hear if you have any suggestions on a board that would accommodate everything that I have listed.

Your last sentence, by control panel are you talking about the GUI? 


One other general question.  Does LinuxCNC have backlash adjustment? I figure it does but wanted to make sure.  I made the gear reductions for my rotary axis, they are not back drivable, but do have a little backlash. 
Last edit: 14 Jul 2023 00:11 by IronManDylan.

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

More
14 Jul 2023 00:01 - 14 Jul 2023 00:05 #275387 by IronManDylan

In the drop down menu, there will be a CNC menu and there you can find various Linuxcnc programs including LInuxcnc itself (which is little more than a shell or launcher where you can select the configuration or simulation you want to run. There are a lot of options there...
 
 

So I have found that, I have not found vismach or a machine simulator or see much of what is already set up for 5 axis kinematics?
Last edit: 14 Jul 2023 00:05 by IronManDylan.

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

More
14 Jul 2023 00:19 #275388 by tommylight
Mesa 7i84 does only inputs and outputs, nothing else, and although it uses an RJ45 connector, it is not an Ethernet card, it is a Smart Serial card. Can not be used alone.
-
Mesa 7i92 can do 10 stepper drives and still have some inputs and outputs left, but it is harder to wire and very sensitive to miss-wiring, total of 34 pins.
Mesa 7i96S does 5 steppers and has headers for easy wiring and a spindle analog output. It also has an IDC26 header that can do up to 5 more steppers or other stuff, again wiring does require a bit of care.
-
Also, 2 parallel ports can work, but will limit the speed of steppers, depending on microstepping might not limit it much or limit it way to much. Cheap and useful for testing and getting stuff going, you can upgrade later.
Friendly warning, everyone everywhere will advise on using BOB (break out boards), i resorted to never using them, ever, cheap and cause more trouble, but offer a bit of protection (some none, some quite good).
And if you do go the parallel port route, upgrading to Mesa 7i92 is very easy as there are ready made cables for it, even if you use BOB's.
The following user(s) said Thank You: IronManDylan

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

More
14 Jul 2023 03:33 #275393 by spumco
  • Yes, LCNC can do backlash compensation
  • No.  Physical control panel, like on a commercial CNC machine
    • Most GUI's provide the ability to fully control (jog, run programs, edit gcode, activate accessories) a CNC machine from various on-screen buttons, sliders, and similar virtual controls.  You don't need anything besides a keyboard & mouse (or a touchscreen) to use LCNC
    • However, I suspect most users want at least a couple physical buttons
    • Physical control panel can be as simple or as complex as you'd like
      • Could be a single estop button and a cycle-start & feed-hold buttons
      • Could be dozens of buttons, dials, selector switches, handwheel for jogging, and blinky LED lights.
    • I mentioned it because if you want physical controls you'll need to plan for that as those controls require some sort of connection to LCNC
  • LCNC manual
    • top of this forum page
    • click 'www.linuxcnc.org'.
    • click "documents" at top of page
    • click "2.9 pre-development" and try out the HTML version.
  • GUI modifications
    • Most of what you need is in the manual/user guide.  Some of it won't make sense; don't worry.  GUI editing is another rabbit hole you don't need to go too deep in just yet.  Just know that you can modify GUI's, and some are easier to modify than others.
  • Laptop
    • Read the manual section on 'latency' and you'll get a rough idea on how to test your laptop.
    • In addition to latency, some hardware/linux combos have problems with network/ethernet cards not playing well together.  Suggest reading the sub-forum "Computers & OS's" and get a feel for some of the various challenges folks have dealt with.
  • Your hardware
    • We (I) generally don't count drive outputs as "IO." In your case you need:
    • 6 stepgens (step & direction outputs) for 6 drives/motors
      • In LCNC world, there are 'joints' and there are 'axes/axis'.
      • A joint is a motor - your Z-motor or your A-motor for example
      • An axis a single freedom-of-movement, can use multiple motors.  Your Y-axis is just one axis, but uses two motors.
      • So you need to control 6 joints, but only 5 axes.  Make sense?
      • When you read the specs for a Mesa board (7i96s for example), it'll have "5 step & direction outputs".  That will control 5 independent drive/motors - no need to count up the individual step+/step- pins.
    • Spindle  - you mentioned 'speed control'.  Do you have a VFD driving the spindle, and using a 0-10v analog for speed, and perhaps 1 or 2 "FWD" and "REV" outputs?
    • 6/ea digital inputs (on/off, not analog) for homing switches
      • With LCNC, you don't need endstop sensors/switches at both ends of a joints limits.  Just a single home switch per joint, then LCNC has 'softlimits' to stop you from driving in to a hard axis limit.
      • Some people prefer (or need) to have sensors at both ends of a joints travel limits for an extra measure of safety.
  • Mesa stuff
    • Is very confusing for the newcomer, yes.  The Mesa manuals & descriptions are excellent, but assume a certain level of familiarity with technical terms and the whole LCNC ecosystem that is gibberish to novices.
    • I'm probably going to get something wrong here, but here goes:
      • There are different 'types' of boards.  One type is what I'll call a "master" board.  Other types are 'daughter' boards.  This is really oversimplifying, but think of this as the Cliff's Notes explanation.
      • A master board has an FPGA chip on it and is connected via ethernet to your PC.  This board receives all commands from LCNC, and sends all info back to LCNC from sensors/drives/etc.  It's the 'hub'.
        • Some are built with step/dir outputs for drives
        • some are built with analog outputs for analog drives
        • Some have lots of features and built-in IO (for components other than drives) and some dont have much.
      • A daughter board is connected to the master board and provides additional capabilities, like more step/dir outputs, more analog drive outputs, or additional IO points.
        • Daughter boards can connect to the master in a couple of ways, and that connection type makes a huge difference in what the daughter board is capable of.
        • "Smart serial" daughter boards connect via a serial connection that looks like the ethernet cable - but isn't ethernet.  That cable connector is just for ease of wiring.
          • Sserial boards are comparatively slow (still fast!), so are used for IO (limit switches, probes, drive enable, etc.)  They aren't used for step/dir outputs because those need to be extremely fast (Mhz speeds in some cases)
        • DB25 and other non-sserial daughterboards can be much faster depending on the features of a particular board.  They connect to the master using a DB25 cable, or an IDC cable.
          • Look at the picture of the 7i96s.  See the IDC socket (expansion port 1)?  That's where you plug a DB25 daughterboard in.
        • Some DB25 (and anything IO) daughterboards can also act as expansion boards... so you can plug even more daughterboards in.
    • Here's an example
      • 7i96s
        • 5 step/dir outputs
        • 11 inputs, 6 outputs
        • 1 analog output (for spindle)
        • 1 expansion port
        • 1 sserial connection (can add 1 sserial daughterboard)
      • 7i85s
        • 4 step/dir outputs
        • 4 high-speed encoder inputs (linear axis scales or rotary encoders for dual-feedback to LCNC
        • 1 sserial connection (can add another sserial daughterboard
      • Just those two boards will control all the hardware you've mentioned.
        • If you want additional IO, you can purchase a sserial daughterboard (or two) and plug it in to either the 7i96s or the 7i85s.
I'll try to address your TCP/5-axis concerns shortly.
The following user(s) said Thank You: tommylight, Halbear, IronManDylan

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

More
14 Jul 2023 04:17 #275397 by spumco
Ok TCP & 5-axis time....

I'm not an expert, haven't used either TCP or a 5-axis machine.  But from what I gather the magic isn't in the post processor, it's in the control (i.e. LCNC).  If I'm horribly wrong here, hopefully someone will provide a correction.

Take Fusion 360 for example.  When you create a machining setup on a machine F360 knows nothing about whether you have TCP or not.  You select some point in space in the model (on the part, on a fixture, or wherever) as your origin and F360 calculates all movements from that location.

The post processor then outputs code in a dialect that your machine can understand.  But the post processor isn't (probably) 'aware' of the exact kinematics of your machine.  It doesn't know if the A-axis center of rotation is exactly 2.3451" offset in Y+ from your B-axis CoR.

So what you do is define the origin as the CoR for all your rotary axes in F360, and then when you touch off (set work offset origin) on the machine you set the A0/B0/C0 to the actual CoR for those joints/axes.

Assuming you touched off exactly at the CoR, everything goes as planned.  Except the problem is when the tool tilts and not just two platters on a 4th/5th table-mounted axis.

F360 and the post don't know you need the X&Y-axes to move along with the A&B to keep the tool tip in the right location.  But how to get everything sorted out?

Enter "switchable kinematics."  LCNC has this capability, and Mach4 doesn't.

The user manual has a much better description of what's going on behind the curtain than I can provide, but basically this lets you define the origin anywhere you want in CAM and LCNC will translate that location to make all the tool movements appropriately.

You tell LCNC that going from A0 to A45 requires not only 45 degrees of A-tilt, but also N inches (or mm) of Y-axis movement as well as N inches of Z-movement to keep the tool tip in the same location in space.

With LCNC's TCP off, if you command "A45", just the A-axis will rotate.  With TCP on, "A45" will result in A rotation, plus Y movement, plus Z movement - and the amount of Y/Z travel is dependent on the tool length.

This is why I mentioned in the last post why some folks NEED limit switches at both ends of each axis.  With TCP on, and a long tool in a tilting head machine, you can run out of X/Y/Z travel as LCNC tries to tip the tool over by moving every axis a huge amount.

Read the "5-Axis Kinematics" section in the manual and watch a few youtube vids of folks using TCP on LCNC - should give you a better idea of what's going on.
The following user(s) said Thank You: tommylight, Mr. Mass, IronManDylan

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

More
14 Jul 2023 17:37 #275424 by IronManDylan
tommy

Is the 7i92 a parent card? Then you would plug in a daughter card with the required step/dirs? I don't see much output on that card so I am assuming that is the case.

It seems like you and spumco are recommending the 7i96 and then plugging something into this to get the last axis sorted?  I talk about this below some more. 


spumco

Very thorough response thank you very much. 

I am running 6 axis and 6 joints.  There is only one motor driving Y, and it uses an interesting anti-racking cable that millrightCNC came up with to accomplish this (I am using that machine as the base for my 5 axis conversion).  I say 5 axis because I only plan to use 5 axis at any one time.  I'll have one LCNC setup for running head-head. And then I have another, essentially 4th axis that sits on the table (the reason for this is that I can spin a workpiece a full 360) and will use that in combination with the B axis of the head for a head-table design (head A axis will stay locked at 0 in this configuration) and another LCNC set up for that.  The 4th axis is removable from the table. 

I can probably manually change the input via my aircraft connectors on my box from the head joint to the table joint when I need that configuration.  There is probably enough stiffness in my gear system that this alone would work, but I can probably find a way to send a little amperage to the inactive head joint to keep it from moving (I do have 6 drivers so).  My concern with having 6 axes set up in LCNC is that LCNC is probably not set up for this type of machine and may get confused about what is going on.  But ideally I would just have all my axes plugged in and can decide which one to talk to based on the LCNC setup. Curious what your thoughts are. 

But it sounds like we could get a parent board with x number of step/dir and plug a daughter board in via a DB25/IDC to get up to the full 6 required step/dirs. The 7i96 and some other daughter card? Or is there a better choice? 

Spindle. I'll provide a picture of the VFD I have. My manual says that it can take either a 1-10v input or a 4-20ma input for speed control, and I believe a pin for reverse, then the grounds are wired together.  I think forward is default but I can check on this. 

As far as control panel goes, I can get by with bare bones, I built a lottt of stuff on the base machine when it was just a 3 axis, and that was running grbl and I had a touch pad and the keyboard lol.  But like I said, maybe I could add a hand wheel at some point that would be nice. Do you know if those hand wheels plug into the computer? 

That is my understanding of what is going on with TCP as well.  I was looking into the gcode and it seems like more of the post processors are posting at the center of rotation as best I can tell.  But there was one other that was posting somewhere else (I suspect at the spindle mount position).  None of them were outputting at the tool end point or were taking into account differences in tool lengths. 


I am going to go check out the manual and the Computers & OS's sub-forum and will get back to you all on that. 
Attachments:

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

More
14 Jul 2023 18:29 - 14 Jul 2023 19:15 #275428 by IronManDylan
I ran a latency test, the max jitter i am getting is all the way up to 140us. That is at a base thread speed of 50us and 25us. :/

According to this it mean it is not a good candidate for software stepping. When using the mesa board, what is generating the steps, the mesa or the computer? 

edit: was doing some looking around and it looks like the mesa does hardware stepping, and therefore the servo jitter is more important? My servo numbers are a little better than my base numbers, except for one weird thing where when I click on the desk top the servo jitter number spikes.  Like up to 1000us in some cases. But I was trying to replicate that and now I can't sooo. 

tommy, I read on another thread that you said that 500us is about 2000 pulses per second, I checked my microstepping settings, they are set to 1000 pulses per rev. So that should be 2 revs/s or 120 rpm? Doesn't seem terrible since I am usually getting jitter that is lower than 100us on the servo thread mosttt of the time. 
Last edit: 14 Jul 2023 19:15 by IronManDylan.

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

More
15 Jul 2023 05:31 #275485 by spumco
Thanks for the clarification on your number of joints/axes.  A pic or two of your motion hardware would be helpful (beyond just the head)

Regarding your number of joints:  You might get confused, and your CAD/CAM might get confused... but LCNC wont.

Mesa board selection: The example I gave will get you everything you need, is currently available (Mesa is having the same supply chain issues as the rest of the world), and is easily expandable.  You may get suggestions from other folks here and there's nothing wrong with a different setup.

If you go with the 7i96s and 7i85s combo you won't need to plug/unplug your table-mounted rotary axis.  You'll have 9 step/dir outputs and can leave it plugged in permanently.  However, if you plan to unplug it at a bulkhead connector (maybe to take it off the table) you'll probably want to have a separate relay or contactor to remove bus power from that motor's drive.  Stepper drives don't like to be energized with no motor connected.

It wouldn't be too difficult to use a 6-pin panel connector for that motor.  Four would be the standard stepper A+/A-, B+/B-... and the last two would be used to signal LCNC that the motor is unplugged.  If LCNC see the motor is unplugged, it won't energize that drive - and maybe signal you through the GUI that LCNC knows the axis is unavailable.

VFD: you have two options to (easily) control that VFD.  0-10v (plus FWD/REV signals) and Modbus.
  • Some people on the forum aren't too keen on using modbus for spindle control, and others love it.
  • Modbus can have some latency which isn't good for tight spindle control (rigid tapping).
  • However, it saves a bit on wiring, and you can use modbus data from the VFD back to LCNC for spindle speed, spindle load, temp, etc.
  • As usual, read the manual - there's a modbus driver specifically for that brand VFD.
  • If you don't know what modbus is, search the forum and user manual.  There are also some good YT vids on LCNC and modbus for VFD's.
Your PC: aside from the spike, your latency numbers look ok for use with a Mesa board setup.  Read the forum latency threads, and see if there are some PC/bios settings you can edit to get rid of that spike.  Worst case you pick up another USFF PC and use that instead of a laptop.

On my mill, I've got an Odroid H2+, and it gave me fits for a while due to network instability and some self-inflicted installation troubles.  Sorted out now.

On my current (in-progress) project I'm running an ebay HP EliteDesk 800 G2 mini I got for very little money and it's rock solid.  Add a 15 or 17" touchscreen and good to go.  Not as tiny as the Odroid, but it's got a fan, was cheap, and zero hardware-related headaches.

Handwheel: some handwheels are USB-based, and some are 'hardware' based - those connect directly to IO ports on a Mesa board (or Pico, or parallel port).  Certain Mesa boards have some inputs specifically designed to use handwheel (MPG) encoders.  Hardware versions are more fiddly to wire up than USB but not too bad.

Keyboards aside, I am not a fan of USB-based anything on CNC controls.  I have a VistaCNC MPG and while it works exactly as designed, I found that the latency inherent to USB is unacceptable.  I got used to 'industrial' CNC controls - they are instant when you push a button or move a handwheel.
The following user(s) said Thank You: tommylight, IronManDylan

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

More
15 Jul 2023 11:50 #275503 by tommylight
Do a test with no base period
latency-histogram --nobase --sbinsize 1000 -- show
While this is running, press on glxgears button several times, then maximise one of the glxgears window several times.
Base period is used only with parallel port, and depenfing on the PC and kernel, it can do 1000 to 20000 pulses per second.
Beware that the upper limit has become increasingly harder to reach due to PC's using all kinds of power saving features, and some are utterly useless.
The following user(s) said Thank You: IronManDylan

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

Time to create page: 0.458 seconds
Powered by Kunena Forum