Sunday, June 11, 2017

LinuxCNC installation lessons learned

I'm posting this on the chance that somebody has similar troubles that I had this week getting LinuxCNC running again on a computer I had working before the hard drive crashed.  Hopefully someone with the same problem will find this page on Google.

It worked best for me to use the LinuxCNC 2.7 bootable DVD image and install in Failsafe mode.  Unfortunately, the defaults for "Guided partitioning" recommended for most users did not setup any partition to be "bootable".  I wasted more time than I like to remember figuring that out.  That's a problem if this is the only operating system the computer is using.  I wonder if this is some kind of inferiority complex that leads the authors of this Linux installation DVD to assume everyone who wants to use Linux still wants Windows on their computer, too.
I had to select Manual Partition instead.  I used Ext4 for Linux partition, making sure the partition was set to be "bootable". I also chose to format the partition and set mount point root "/".

The updates wouldn't install so instead I ran ...$sudo apt-get update

I have this CH352 PCI Parallel Port card:

I installed the parallel port driver from the CD that came with the card.  I created a file called parport_pc.conf in /etc/modprobe.d with one line:
install parport_pc /bin/true

When I ran ...$lspci -v
this was in the output:

00:09.0 Serial controller: Device 4348:5053 (rev 10) (prog-if 02 [16550])
 Subsystem: Device 4348:5053
 Flags: medium devsel, IRQ 17
 I/O ports at c880 [size=8]
 I/O ports at c800 [size=8]
 Kernel driver in use: serial

Even though it says serial, it's parallel.  Go figure.

To test the parallel port, I downloaded ptest.  Instructions for using it are found in the same link.
I replaced the address in ptest.hal with the second address above (0xc800) . I made sure the parallel inputs function.

Finally, I ran the stepconf Stepper configuration wizard.  I remembered some settings and had to rediscover others.  The way mine is set up, to home an axis to zero from positive positions (X & Y) I needed a negative homing velocity and then find the unlatch position in the opposite direction.  I have Z axis homing to zero from negative positions, so the homing velocity is positive.  My max velocities (0.3 inches per second) and accelerations (2 inch/s/s) are much slower than the defaults.

I am hopeful that someone finds these discoveries helpful, because it took me a week to figure this stuff out in my spare time, and I would love to save someone else some of that frustration.

No comments:

Post a Comment