equipment:cnc:mill:maintenance

CNC Mill - ICP 4030 Maintenance

This page is for detailed maintenance information that most users won't need to know.

The 7C81 MESA card uses the default 7c81_5abobx3d pin configuration. The configuration pinout is copied here for reference:

IO Connections for P1+Serial
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 0      0   IOPort       PWM              0        PWM             (Out)
 0      1   IOPort       None           
 0      2   IOPort       StepGen          0        Step/Table1     (Out)
 0      3   IOPort       None           
 0      4   IOPort       StepGen          0        Dir/Table2      (Out)
 0      5   IOPort       None           
 0      6   IOPort       StepGen          1        Step/Table1     (Out)
 0      7   IOPort       None           
 0      8   IOPort       StepGen          1        Dir/Table2      (Out)
 0      9   IOPort       StepGen          2        Step/Table1     (Out)
 0     10   IOPort       StepGen          2        Dir/Table2      (Out)
 0     11   IOPort       StepGen          3        Step/Table1     (Out)
 0     12   IOPort       StepGen          3        Dir/Table2      (Out)
 0     13   IOPort       None           
 0     14   IOPort       QCount           0        Quad-A          (In)
 0     15   IOPort       QCount           0        Quad-B          (In)
 0     16   IOPort       QCount           0        Quad-IDX        (In)
 0     17   IOPort       None           
 0     18   IOPort       None           

IO Connections for P2+Serial
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 0     19   IOPort       PWM              1        PWM             (Out)
 0     20   IOPort       None           
 0     21   IOPort       StepGen          4        Step/Table1     (Out)
 0     22   IOPort       None           
 0     23   IOPort       StepGen          4        Dir/Table2      (Out)
 0     24   IOPort       None           
 0     25   IOPort       StepGen          5        Step/Table1     (Out)
 0     26   IOPort       None           
 0     27   IOPort       StepGen          5        Dir/Table2      (Out)
 0     28   IOPort       StepGen          6        Step/Table1     (Out)
 0     29   IOPort       StepGen          6        Dir/Table2      (Out)
 0     30   IOPort       StepGen          7        Step/Table1     (Out)
 0     31   IOPort       StepGen          7        Dir/Table2      (Out)
 0     32   IOPort       None           
 0     33   IOPort       QCount           1        Quad-A          (In)
 0     34   IOPort       QCount           1        Quad-B          (In)
 0     35   IOPort       QCount           1        Quad-IDX        (In)
 0     36   IOPort       None           
 0     37   IOPort       None           

IO Connections for P7+Serial
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 0     38   IOPort       PWM              2        PWM             (Out)
 0     39   IOPort       None           
 0     40   IOPort       StepGen          8        Step/Table1     (Out)
 0     41   IOPort       None           
 0     42   IOPort       StepGen          8        Dir/Table2      (Out)
 0     43   IOPort       None           
 0     44   IOPort       StepGen          9        Step/Table1     (Out)
 0     45   IOPort       None           
 0     46   IOPort       StepGen          9        Dir/Table2      (Out)
 0     47   IOPort       StepGen         10        Step/Table1     (Out)
 0     48   IOPort       StepGen         10        Dir/Table2      (Out)
 0     49   IOPort       StepGen         11        Step/Table1     (Out)
 0     50   IOPort       StepGen         11        Dir/Table2      (Out)
 0     51   IOPort       None           
 0     52   IOPort       QCount           2        Quad-A          (In)
 0     53   IOPort       QCount           2        Quad-B          (In)
 0     54   IOPort       QCount           2        Quad-IDX        (In)
 0     55   IOPort       None           
 0     56   IOPort       None           

The MESA pins (as viewed from the top of the card) are assigned to LinuxCNC nets according to the following diagram:

equipment:cnc:mill:mesa-pinout.png

The VFD has both software and hardware controls. From a hardware perspective the spindle is controlled from the spindle-enable and spindle-ccw pins. The door switch also inhibits a signal to (TODO find VFD signal name).

The VFD signals are also used in combination with the door switch to inhibit motion. The HAL configuration corresponds to the following logic diagram:

equipment:cnc:mill:spindle-inhibit.png

Opening the door will always inhibit motion as this is connected to the reset pin of the flipflop. In order for motion to continue one of two things is required: the spindle to be disabled, or the spindle to be at speed. The spindle-at-speed signal ensures that LinuxCNC waits until the spindle has fully spun up before continuing after an interruption.

The touch probe signal probe-hw is connected to motion.probe-input through a oneshot pulse generator. This effectively pulse stretches the incoming signal to ensure a clean trigger.

The emergency stop system is split into a hardware e-stop circuit and a software stop.

The hardware e-stop circuit runs at 240V and provides power to the VFD contactor and 48V stepper power supply. This circuit is fed from the following chain:

  1. Main power NVR switch.
  2. E-stop button.

The software e-stop has a few different sources:

  • GPIO from the e-stop button (estop-button-fault).
  • LinuxCNC internal faults.

While the MESA card is configured with an estop-relay output that would link the software e-stop to the hardware, we have decided not to connect it. The main reason is to allow the VFD active braking to work correctly during a soft e-stop. We may revisit this later, perhaps with a time delay before cutting the relay.

Info

This is the desired configuration, not the current configuration. Remove this notice once fixed.

See LinuxCNC's Homing Configuration page for an understanding of homing and limits. Remember that CNC coordinates are referring to tool motion relative to the workpiece. That can be confusing when the workpiece moves instead of the tool (as is the case for the Y axis). In our case the coordinates result in the following motions:

  • X axis origin is with the spindle to the left. Coordinates become more positive with the spindle moving right.
  • Y axis origin is with the table at the back. Coordinates become more positive with the table moving forward.
  • Z axis origin is with the spindle at the top. Coordinates become more negavive with the spindle moving down.

Each axis of the CNC mill has a pair of limit switches. Each pair is wired to a single input. The soft limits in the image below (B/C) are configured to be a small distance away from the hard limits (A/D). For X and Y the machine origin is set at negative soft limit (B) such that all coordinates are positive. For Z the machine origin is set at the positive soft limit (C) such that all coordinates are negative.

For each joint we can home on the negative or positive limit switch, and this can be different to the machine origin. For convenience we have chosen the following homing directions:

  • X axis home towards negative limit. The spindle moves to the left.
  • Y axis home towards positive limit. The table moves to the front.
  • Z axis home towards positive limit. The spindle moves up.

Note that the Y axis homes at the front despite the origin being at the back. This is to make the table easy to reach once homing has completed.

For convenience let's define some new parameters:

  1. travel_n = Dn-An. Full travel between limit switches.
  2. margin = B-A = D-C. Margin between limit switch and soft limit.

For each joint the ini settings should be configured like so:

[JOINT_0]
# X axis
HOME_OFFSET = -margin
MIN_LIMIT = 0
MAX_LIMIT = travel_x - (margin*2)
HOME = MIN_LIMIT + 20

[JOINT_1]
# Y axis
HOME_OFFSET = travel_y - margin
MIN_LIMIT = 0
MAX_LIMIT = travel_y - (margin*2)
HOME = MAX_LIMIT - 20

[JOINT_2]
# Z axis
HOME_OFFSET = -margin
MIN_LIMIT = -(travel_z - (margin*2))
MAX_LIMIT = 0
HOME = MAX_LIMIT - 5
  • equipment/cnc/mill/maintenance.txt
  • Last modified: 2024/11/19 21:42
  • (external edit)