New motherboards w/out on-board parallel

More
18 Jun 2010 19:32 #3169 by DIYLILCNC
I've been a happy EMC user for about a year now. My EMC/Linux 8.04 installations on older computers have been a breeze, but now I'd like to build a computer/controller combo in the same PC case. It seems that installing EMC on a newer computer is a little more complicated.

First off, for others with the same problem, here are the solutions I've figured out thus far:

1. Pay careful attention to motherboard (mobo) revision numbers/specifications. I ordered a Gigabyte GA-MA74GM-S2 through newegg.com because this board was pictured with a parallel port. Not so! They gave me a hard time, intially promised to send a parallel PCI card for free, then backed out. I wound up purchasing a Syba 1 port card (Moschip MCS9805CV) at Microcenter for $20.

2. I had to disable onboard LAN in the BIOS for the liveCD to load. I think that was the central issue, but I also wound up deleting "quiet splash" and adding "use-generic-ide" in the F6 boot options.

So! Linux 8.04 is installed and EMC loads just fine. I'm very confident in my controller (hobbyCNC kit), motors and wiring as I've used them in the same configuration successfully in the past. However, when I try to jog motors through EMC or Stepconf, I get no motion/jitter at all. I know the board/motor are communicating because it holds position quite well (cannot be turned by hand).

My parallel card shipped with a driver CD, but the instructions appear to be out of date. I'm supposed to find the proc/pci directory, and some searching on the forum indicates that this is an outdated file structure.

Moschip offers a downloadable set of instructions, but I haven't been able to get these working either. Here's what they suggested/what I did:

0.5 (Fellow newbies! Open the terminal and type "sudo bash" for root access, no quotes).

1. lspci -v
    02:07.0 Communication controller: NetMos Technology PCI 1 port parallel adapter (rev 01)
    Subsystem: LSI Logic / Symbios Logic Unknown device 0010
    Flags: medium devsel, IRQ 7
    I/O ports at df00

I/O ports at de00
I/O ports at dd00
I/O ports at dc00
I/O ports at db00
I/O ports at da00 [/ul]
This tells me the card is recognized on IRQ 7.

2. Now the instructions say:
    Setserial /dev/ttyS2 port 9000 UART 16550A irq 18 Baud_base 115200
    Setserial /dev/ttyS3 port 9400 UART 16550A irq 18 Baud_base 115200
...but I only want one port. So I used:
    setserial /dev/ttyS2 port 0xdf00 UART 16550A irq 7 Baud_base 115200
3. setserial /dev/ttyS2 -a
    /dev/ttyS2, Line 2, UART: 16550A, Port: 0xdf00, IRQ: 7
    Baud_base: 115200, close_delay: 50, divisor: 0
    closing_wait: 3000
    Flags: spd_normal skip_test
4. Now the instructions say:
    /sbin/modprobe parport_pc io=0x3f8,a400 irq=4,18
...but I only want one port. So I used:
    /sbin/modprobe parport_pc io=0xdf00 irq=7
According to the instructions (if I interpreted them correctly) I should be ready to go. So it seems to me that the last step (as laid out in the Integrator's manual V2.4, pg 6) is to make sure that EMC is communicating with the correct port. I used Stepconf to change the default (0x378) to the port I targeted earlier (0xdf00). No dice - when I go to jog the motor, I get a funny I/O error ("Broken Pipe"). If I set 0xdf00 as the second Parport, I no longer get an error (but no motor movement either).

Any thoughts are much appreciated! I'll use the information to flesh out the DIYLILCNC project, an open-source CNC research initiative that I'm a part of.

Please Log in or Create an account to join the conversation.

More
19 Jun 2010 00:25 #3171 by PCW
I dont think you want to do what MOSChip suggests as that will set up a normal Linux parallel port driver which is _not_ what you want for EMC

The parallel port section in www.linuxcnc.org/docs/EMC2_Integrator_Manual.pdf is probably your best bet (note you should not even need to deal with port addresses anymore, just parallel port card # (0,1,2...)

Please Log in or Create an account to join the conversation.

More
19 Jun 2010 15:57 - 19 Jun 2010 16:00 #3175 by DIYLILCNC
SOLVED!

Thanks PCW! I followed your link to the parallel section of the Integrator's manual, then did further googling based on commands found there. Amazingly, I came upon a solution you posted to a similar question from a year ago:

www.linuxcnc.org/component/option,com_ku...func,fb_pdf/lang,en/

Here's the breakdown for noobs:

When using a PnP (Plug 'n' Play) or PCI parallel card, no drivers are required. All you need to do is verify the port address of the card by typing the following into the terminal:
    sudo bash
    lspci -v
This will spit out a long list. Look for something like this:
    02:07.0 Communication controller: NetMos Technology PCI 1 port parallel adapter (rev 01)
    Subsystem: LSI Logic / Symbios Logic Unknown device 0010
    Flags: medium devsel, IRQ 7
    I/O ports at df00

I/O ports at de00
I/O ports at dd00
I/O ports at dc00
I/O ports at db00
I/O ports at da00 [/ol]
Now you should open the EMC Stepconf wizard. Make educated guesses about all of your settings and finish the wizard to generate a HAL file. You should be able to find this easily if you allow Stepconf to generate an alias on your desktop.

Open the HAL file that is named after the settings that you just created. There should be a line near the top that looks like:
    loadrt hal_parport cfg="0x378 out "
change this to:
    loadrt hal_parport cfg="df00 out "
...or whatever your first port address happens to be (as revealed above with lspci -v). Save the file and you should be in business.
Last edit: 19 Jun 2010 16:00 by DIYLILCNC.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.173 seconds
Powered by Kunena Forum