. .

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Is it 'auto-squaring', 'auto-racking' or 'auto-un-racking'? Anyway the 'master' version 2.8 of LinuxCNC has a lot of differences under the bonnet compared to the current stable 2.7. The reason I wanted to upgrade is the ability to separately, but simultaneously, home the two motors running the X axis leadscrews on my gantry type CNC router. By allowing the two motors to stop independently, each on it's own limit switch, it is possible to fine tune the squareness between the X and Y axes. Obviously all other movements of the two motors must be synchronised to avoid a nasty mess!

    Unless you are a Linux whiz, quite a lot of the LinuxCNC website and forum seems a bit daunting but I gritted my teeth and decided to have a go. It actually turned out to be much easier than I'd expected. I'm not going into full details, the relevant links are at the bottom of this post but these notes may be of help to non-expert Linux users like me.

    My machine uses a cheap Chinese breakout board with outputs and inputs for 4 motors and 4 limit switches labelled XYZA. There are two microswitches on each axis configured as both limit and homing switches. Each pair is connected in series and use the inputs in 'Normally Closed' operation. This is much safer than having them in parallel using 'Normally Open' as a broken wire will show up immediately as a limit switch error instead of waiting quietly to laugh at you when your machine crashes through the offending switch.

    1) Clone your hard drive! Put the original in a safe place and work with the clone. That way you can always revert to the unmolested version of your machine if it all goes pear shaped. It could all end in tears if you don't bother with this step. Alternatively install a new HDD in your machine and start from scratch by installing the current stable release version 2.7.

    2) Whether you have your existing install or a new one you now have to upgrade to v2.8. For us non-expert Linux users the method is unfamiliar. The idea is that you change where Linux goes looking for sources of upgrades to it's installed software. This is done by opening the Synaptic Package Manager found in the Application Manager under the System option and viewing the list of repositories (Linuxspeak for online software sources) that Linux can look at. By unchecking the repositories shown for v2.7 and checking the ones for v2.8, refreshing the list of packages and selecting LinuxCNC for upgrade (all done within Synaptic) you will upgrade from v 2.7 to v2.8. Only select LinuxCNC for upgrade as you don't want to upgrade the whole operating system.

    3) When you next start LinuxCNC it will ask if you want it to update your configuration files to the new version or, for a clean install, just start up looking much as it always does. Just check the version really is 2.8 so you know the upgrade has gone ahead. Your existing configuration files, created when you last ran the Stepconf Wizard, will be updated and your machine will likely work the same as ever. Otherwise run Stepconf and set up your machine from scratch. It helps to have a fully working machine setup at this stage so you know that any problems are due to your later work on the .hal and .ini files and not a fault with the basic setup.

    4) If you only have 3 sets of homing switches, one for each axis, you will now need to install a fourth set to give separate inputs for the two sides of your relevant axis (X in my case).

    5) When you run the CNC Stepconf Wizard you save the setup with a specific name and can create several different setups for the same machine if you wish. Starting LinuxCNC actually involves selecting which of these files you run by selecting the relevant desktop icon. Normally you would only have one of these.
    The relevant files are stored in a directory with the name you used for saving the configuration which will be inside a directory called 'configs'. For me the full path is kit/linuxcnc/configs/kit-cnc You will now edit the files equivalent to 'kit-cnc.ini' and 'kit-cnc.hal' in that directory.

    These files are created by the Stepconf Wizard and once you have edited them manually it is my understanding that you must not run the stepconf wizard again to make any other adjustments (to acceleration rates or soft limits for example) or you will overwrite your manual changes. Stepconf has not been updated to cope with all the niceties of v2.8 yet so any future changes to your machine config will have to be done by further manual editing of the .hal and .ini files. This is one of the reasons for making sure you have your machine working as you want it before starting this process.

    My linuxCNC computer has no chair next to it so I copied the relevant files onto a USB thumb drive and took them off to my Windows PC and edited them using Notepad++. I made sure to keep copies of the original versions of the files and the edited ones on the thumb drive. You can edit the files in any simple text editor but NOT a word processor which will add a thousand tons of additional formatting data to the file.

    6) The scary bit! If you already have homing set up and working then after you have carefully followed the instructions it should still work. Some people have made up test rigs with motors, cams and microswitches to confirm the motors do as they should before testing 'live'. I removed my motors, sat them on the bed of the machine and manually tweaked the microswitches to see if things happened in roughly the right order before taking the plunge. I know from it's earliest days that my machine will stall it's motors before throwing itself apart so I wasn't too worried. You must do as you think fit. For me it worked perfectly first time.

    One of my X axis microswitches is operated by a finely adjustable end stop. OK, it's an M6 bolt through a threaded hole in a piece of aly angle with a locknut. Measure the squareness of the gantry, adjust the nut, home the axis, repeat as required. Simple!

    The detailed instructions for editting the files can be found from this links to the LinuxCNC forum:

    https://forum.linuxcnc.org/49-basic-...cnc-2-8-master

    Note that there is one addendum: Near the start of the .hal file is the line:
    loadrt stepgen step_type=0,0,0
    Change this as shown below to take account of having 4 joints instead of 3:
    loadrt stepgen step_type=0,0,0,0

    Example edited files are here:

    https://forum.linuxcnc.org/49-basic-...l-motor-gantry

    Good luck!

    Kit
    Last edited by Kitwn; 09-04-2019 at 04:50 AM.

  2. The Following 6 Users Say Thank You to Kitwn For This Useful Post:


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Why is Y axis "squaring" necessary only with twin motors?
    By MartinS in forum Linear & Rotary Motion
    Replies: 10
    Last Post: 09-08-2017, 10:10 PM
  2. What do I need to run LinuxCNC???
    By gatesy in forum LinuxCNC (EMC)
    Replies: 22
    Last Post: 02-12-2015, 07:42 PM
  3. Setup for squaring twin X-axis gantry
    By routercnc in forum Gantry/Router Machines & Building
    Replies: 20
    Last Post: 26-03-2014, 11:13 PM
  4. Seeking some practical squaring advice.
    By Wal in forum Gantry/Router Machines & Building
    Replies: 12
    Last Post: 09-01-2014, 12:04 AM
  5. How many LinuxCNC/EMC users do we have?
    By birchy in forum LinuxCNC (EMC)
    Replies: 16
    Last Post: 30-12-2012, 08:08 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
  •