CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Need to find document, configure EMC with multiple lpt ports

Posted by Brian Pitt
on 2001-01-30 01:51:10 UTC
On Tuesday 30 January 2001 01:03, you wrote:
> Hello All,
>
> Sometime back I came accross a file on setting up or configureing EMC
> to use more than one parallel port with steppers. It seemed to be
> very detailed in its explanation. I have since lost track of it and
> I can't seem to locate it again to print out a new copy. I thought I
> rememembered stumbling accross it on a NIST EMC link but I can't seem
> to find my way back to it. Can any one on this list point me in the
> right direction?
>
> Thanks,
>
> Donald Brock

as far as I know only one port is used for the motors but there are two
ways to set it up ,the usual step/dir or phase stepping
the second port is used for auxilary I/O

this may not be the post you saw earlier but you may find it useful


Brian


-------------------mill slot here------------------------------

EMC parallel port map(s)
first port = step/dir+limit/home switches and probe
second port = E-Stop + misc I/O
option phase stepping on first port

(added probe pinouts and corrected 2 pin number typos)


The original IBM-PC's Parallel Printer Port had 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 para port map [motion]
lpt lpt
pin EMC bit default default
num name name use polarity
1 /c0
2 d0 x dir HOMING_POLARITY = 1
3 d1 x step
4 d2 y dir HOMING_POLARITY = 1
5 d3 y step
6 d4 z dir HOMING_POLARITY = 1
7 d5 z step
8 d6
9 d7
10 s6 OPTION PROBE PROBE_POLARITY = 1
11 /s7 OPTION PROBE PROBE_POLARITY = 0
12 s5 x,y,z home HOME_SWITCH_POLARITY = 1
13 s4 x,y,z limit- MIN_LIMIT_SWITCH_POLARITY = 1
14 c1
15 s3 x,y,z limit+ MAX_LIMIT_SWITCH_POLARITY = 1
16 c2
17 /c3
18-25 gnd

[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 RECIEVES X VALUE
variable #5062 RECIEVES Y VALUE
variable #5063 RECIEVES Z VALUE

(PROBEOPEN probe.out)
G38.2 X1.0
G38.2 Y1.0
(PROBECLOSE)



------------------------------------------------------------------------------
EMC second para port map [aux io]
lpt lpt
pin EMC bit default default
num name name use polarity
inputs
15 index 0 s3
13 index 1 s4 ESTOP_SENSE_INDEX ESTOP_SENSE_POLARITY = 1
12 index 2 s5 LUBE_SENSE_INDEX LUBE_SENSE_POLARITY = 1
10 index 3 s6
11 index 4 /s7

outputs
2 index 0 d0 SPINDLE_REVERSE_INDEX SPINDLE_REVERSE_POLARITY = 0
3 index 1 d1 SPINDLE_FORWARD_INDEX SPINDLE_FORWARD_POLARITY = 0
4 index 2 d2
5 index 3 d3
6 index 4 d4
7 index 5 d5
8 index 6 d6 MIST_COOLANT_INDEX MIST_COOLANT_POLARITY = 0
9 index 7 d7 FLOOD_COOLANT_INDEX FLOOD_COOLANT_POLARITY = 0
1 index 8 /c0 SPINDLE_DECREASE_INDEX SPINDLE_DECREASE_POLARITY = 1
14 index 9 /c1 SPINDLE_INCREASE_INDEX SPINDLE_INCREASE_POLARITY = 1
16 index 10 c2 ESTOP_WRITE_INDEX ESTOP_WRITE_POLARITY = 1
17 index 11 /c3 SPINDLE_BRAKE_INDEX SPINDLE_BRAKE_POLARITY = 0
------------------------------------------------------------------------------
new for phase stepping from Fred Proctor's post

To specify this, just put this in your .ini file:

[EMCMOT]
EMCMOT = freqmod.o
STEPPING_TYPE = 1

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.

The wiring looks like this, from a comment in emcmot.c:

Phases are labeled p13 and p19, from Bridgeport stepper motor driver
pins 13 and 19. The values are converted from step/direction using the
following table:

dir p13 p19

| ^ 0 0
| | 1 0
+ - 1 1
| | 0 1
v | 0 0

The new value of p13 is the logical result of (p19 != dir), and
the new value of p19 is the logical result of (p13 == dir), where
+ dir is 1 and - dir is 0.
The bits are "wired" onto the parallel port like this:

MSB low byte LSB
-----------------------------------------------------------------
| p13-3 | p19-3 | p13-2 | p19-2 | p13-1 | p19-1 | p13-0 | p19-0 |
-----------------------------------------------------------------

MSB hi byte LSB
-----------------------------------------------------------------
| x | x | x | x | p13-5 | p19-5 | p13-4 | p19-4 |
-----------------------------------------------------------------

where p19-0 is pin 19 of axis 0, p13-5 is pin 13 of axis 5, etc.

translates to this pinout/port map (outputs only)
[phase motion] home/limits and probe same as first motion example
lpt lpt
pin bit EMC signal
num name name function
2 D0 P19-0 motor-0 phase-A
3 D1 P13-0 motor-0 phase-B
4 D2 P19-1 motor-1 phase-A
5 D3 P13-1 motor-1 phase-B
6 D4 P19-2 motor-2 phase-A
7 D5 P13-2 motor-2 phase-B
8 D6 P19-3 motor-3 phase-A
9 D7 P13-3 motor-3 phase-B
1 /C0 P19-4 motor-4 phase-A
14 /C1 P13-4 motor-4 phase-B
16 C2 P19-5 motor-5 phase-A
17 /C3 P13-5 motor-5 phase-B

-----------------------------------------------------------------------------
reply to a question about phase stepping drivers

for a four-phase stepper motor
rename phase-A & B to coil-A & B
and add an inverter to each line(2ea 7414 for all 6 motors)
coil-A
wire-1= true
wire-2=!true

coil-B
wire-3= true
wire-4=!true

gives a two-windings-on step sequence

dir p13 p19 coil-A coil-B
wire-1 wire-2 wire-3 wire-4
| ^ 0 0 = 0 1 0 1
| | 1 0 = 1 0 0 1
+ - 1 1 = 1 0 1 0
| | 0 1 = 0 1 1 0
v | 0 0 = 0 1 0 1

---------------------------------------------------------
Jon Elson's reply

The output of what we have now for phase drive in EMC works like
this, for going in one direction (the other direction would go through the
table backwards) :

EMC outputs Bipolar Drive Unipolar Drive
state ph A ph B ph A ph B A1 A2 B1 B2
1 1 0 + - on off off on
2 0 0 - - off on off on
3 0 1 - + off on on off
4 1 1 + + on off on off

In this table, for Bipolar Drive, the + and -
indicate which polarity voltage is applied to each
stepper phase winding. In the Unipolar Drive, on
and off refer to the state of the transistors, and
the A1 and A2 refer to the transistors on the opposite
ends of the same phase, and B1, B2 are the other
phase.

So, you see that 2 bits can control the 4 transistors
of a unipolar stepper driver pretty easily. A1 and
A2 are never on at the same time, and both are never
off at the same time (unless that would be commanded by
a machine-off or E-stop signal).

Jon
----------------------------------------------------------------

Discussion Thread

Donald Brock 2001-01-30 01:03:56 UTC Need to find document, configure EMC with multiple lpt ports Brian Pitt 2001-01-30 01:51:10 UTC Re: [CAD_CAM_EDM_DRO] Need to find document, configure EMC with multiple lpt ports Donald Brock 2001-01-30 17:29:05 UTC Re: Need to find document, configure EMC with multiple lpt ports