lpglogo1.jpgGlaister Consulting Servicescanadianflag.jpg

Parallel Port I/O as used by EMC

The IBM-PC's Parallel Printer Port has a total of 12 digital outputs and 5 digital inputs accessed via 3 consecutive 8-bit ports in the processor's I/O space. 8 output pins accessed via the DATA Port 5 input pins (one inverted, indicated by line over number) accessed via the STATUS Port 4 output pins (three inverted, indicated by line over number) accessed via the CONTROL Port The remaining 8 pins are grounded

EMC First Parallel Port Map [motion]

DB25 Pin Signal/Dir EMC Signal Using Step/Dir EMC Signal Using Phase Drive Using Six Axis Hexapod
1 /c0 - Out n/a n/a Motor-4 DIR
2 d0 - Out x dir HOMING_POLARITY = 1 motor-0 phase-A Motor-0 DIR
3 d1 - Out x step motor-0 phase-B Motor-0 STEP
4 d2 - Out y dir HOMING_POLARITY = 1 motor-1 phase-A Motor-1 DIR
5 d3 - Out y step motor-1 phase-B Motor-1 STEP
6 d4 - Out z dir HOMING_POLARITY = 1 motor-2 phase-A Motor-2 DIR
7 d5 - Out z step motor-2 phase-B Motor-2 STEP
8 d6 - Out n/a ?? Motor-3 DIR
9 d7 - Out n/a ?? Motor-3 STEP
10 s6 - In OPTION PROBE PROBE_POLARITY = 1 ?? unused
11 /s7 - In OPTION PROBE PROBE_POLARITY = 0 ?? unused
12 s5 - In x,y,z home HOME_SWITCH_POLARITY = 1 ?? All motors Reference Sw
13 s4 - In x,y,z limit- MIN_LIMIT_SWITCH_POLARITY = 1 ?? All motors Neg Limit Sw
14 c1 - Out n/a n/a Motor-4 STEP
15 s3 - In x,y,z limit+ MAX_LIMIT_SWITCH_POLARITY = 1 same All Motors Pos Limit Sw
16 c2 - Out n/a n/a Motor-5 DIR
17 /c3 - Out n/a n/a Motor-5 STEP
18-25 ground n/a n/a Ground

Notes on probing

[TRAJ] PROBE_INDEX = 3
hook the probe up to the S6 input, pin 10.
For PROBE_INDEX = 4, it's S7, pin 11
use the G38.2 code
variable #5061 receives X value
variable #5062 receives Y value
variable #5063 receives Z value
(PROBEOPEN probe.out)
G38.2 X1.0 G38.2 Y1.0
(PROBECLOSE)

Notes on using phase drive with EMC

To specify this, just put the following 3 lines in your .ini file:
[EMCMOT]
EMCMOT = freqmod.o
STEPPING_TYPE = 1 or 2 (pick original or table driven code)

It only works for freqmod.o (steppermod.o will come once this is debugged). If you say 0, or leave it out, it uses step-and-direction.

EMC Second Parallel Port Map [aux I/O]

DB25 Pin Signal/Dir EMC variable / flags
1 /c0 - Out SPINDLE_DECREASE_INDEX SPINDLE_DECREASE_POLARITY = 1
2 d0 - Out SPINDLE_REVERSE_INDEX SPINDLE_REVERSE_POLARITY = 0
3 d1 - Out SPINDLE_FORWARD_INDEX SPINDLE_FORWARD_POLARITY = 0
4 d2 - Out n/a
5 d3 - Out n/a
6 d4 - Out n/a
7 d5 - Out n/a
8 d6 - Out MIST_COOLANT_INDEX MIST_COOLANT_POLARITY = 0
9 d7 - Out FLOOD_COOLANT_INDEX FLOOD_COOLANT_POLARITY = 0
10 s6 - In n/a
11 /s7 - In n/a
12 s5 - In LUBE_SENSE_INDEX LUBE_SENSE_POLARITY = 1
13 s4 - In ESTOP_SENSE_INDEX ESTOP_SENSE_POLARITY = 1
14 c1 - Out SPINDLE_INCREASE_INDEX SPINDLE_INCREASE_POLARITY = 1
15 s3 - In n/a
16 c2 - Out ESTOP_WRITE_INDEX ESTOP_WRITE_POLARITY = 1
17 /c3 - Out SPINDLE_BRAKE_INDEX SPINDLE_BRAKE_POLARITY = 0
18-25 ground n/a

parport info IBM Parallel Port FAQ/Tutorial The tutorial goes into the gory details of the different parallel port modes and has a lot of info on printer signals and interfacing.

home.jpg Back to Lawrence's CNCStuff Page