Kirk,

I like your idea but I got lucky and didn't need to use it.

I guess I was not real clear on what I was asking. I knew that the  
ports in the manual were wrong and the correct ports were the ones  
from the "lspci -v".  My problem was the fact that the example "lspci  
-v" from the wiki and the one from the manual both showed a list of  
port numbers increasing down and both showed the port at the top of  
the list to be a valid port (i.e., the lowest port address), while my  
result had the highest address at the top of the list.

Anyway I took a gamble, and used the "0xec00" in my ".hal" file,  
plugged my cable in to one of the two new ports, and got lucky on the  
first try. Everything worked.

Actually it wasn't the first try, I had tried,
loadrt hal_parport cfg="0xec00 0x378" and it hadn't worked so I  
changed it to
loadrt hal_parport cfg="0xec00" and it worked.

I had tried the whole list of ports on both connectors without any  
luck when I had left the 0x378 in the config statement as the second  
port (without adding the necessary reads and writes).

Can anyone explain why that won't work?  And what does the "1" or  
"-1" after the read or write command mean?

Alan
---

Alan Condit
1085 Tierra Ct.
Woodburn, OR 97071

Email -- [EMAIL PROTECTED]
Home-Office (503) 982-0906

Re: [Emc-users] Second parallel port setup
From: Kirk Wallace <[EMAIL PROTECTED]> - 2008-06-10 02:28
On Mon, 2008-06-09 at 18:33 -0700, Alan Condit wrote:
 > I am still working on getting the second parallel port running.
 >
 > I am trying to figure out what port address to plug in to the parport
... snip
 > I/O at 0xd800 [0xd801] not used
 >
 > -------------------------------------------------------------------
 >

Looking up the port address in a manual may not work because the PC
assigns the address during boot-up and it may change dependent on the
PCI slot or computer the card is plugged into. I use the lspci -v you
show below.

 >
 > When I typed "lspci -v" as suggested in the documentation for emc2 I
 > got the following (note port addresses decreasing):
 >
 > 0000:00:08.0 Communication controller: NetMos Technology PCI 9815
 > Multi-I/O Controller (rev 01)
 > Subsystem: LSI Logic / Symbios Logic 2P0S (2 port parallel
 > adaptor)
 > Flags: medium devsel, IRQ 10
 > I/O ports at ec00 [size=8]
 > I/O ports at e400 [size=8]
 > I/O ports at e000 [size=8]
 > I/O ports at dc00 [size=8]
 > I/O ports at d800 [size=8]
 > I/O ports at d400 [size=16]
 >
 >
 > Since the ports are listed in reverse order from what is shown in the
 > manual, and the wiki, I don't know whether to use 0xec00 or 0xd400.
 > My first attempt was to plug the cable into one of the pci parallel
 > ports and to try and replace the 0x378 with the various addresses.
 >
 > Help please.
 >
 > Alan

I set up port zero pin 1 in the .hal file to connect to the flood
button, "net Flood iocontrol.0.coolant-flood => parport.0.pin-01-out".
Usually, pin 1 port zero is assigned to something else, so I comment the
line out and put the new one in. Then I set the "loadrt hal_parport
cfg="0xXXXX"" line to load only one port and put in the "addf
parport.0.read servo-thread" and "addf parport.0.write servo-thread". I
start with 0xXXXX being the first address on the lspci -v list. I bring
up EMC2 with a voltmeter on pin 1 (and to ground, pin 18 through 25, or
connector shell) of a PCI parallel port and with AXIS, toggle Flood. I
check each pin one for a toggling voltage. If the first address doesn't
work, I exit EMC2, edit the .hal file for the next address and try again
until I find the address for each parport. Sometimes I can find the
addresses right away, sometimes I mess up the configuration and have to
go through the procedure a couple of times to correct my mistakes, but
so far this method has eventually worked. I also have a habit of not
remembering to enter an "addf hal_parport.X.read/write" for each address
in the final .hal file. Good Luck.

-- 
Kirk Wallace (California, USA
http://www.wallacecompany.com/machine_shop/
Hardinge HNC/EMC CNC lathe,
Bridgeport mill conversion, doing XY now,
Zubal lathe conversion pending
Craftsman AA 109 restoration
Shizuoka ST-N/EMC CNC)



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to