Linuxcnc not seeing limit switches

More
10 years 10 months ago #66858 by TarHeelTom
I'm not at all sure what I have at the moment. The old computer crashed and I had to start from scratch as the old motherboard was no longer available. That necessitated switching to a SATA hard drive, and it turns out the old hard drive was cooked as well. So new case, new memory, new hard drive, new paraport. Then when I fired it up it didn't work. Then I ran into long term medical problems and couldn't get out into the shop to fiddle. I think most of MY memory was wiped out in that process also. And my main office computer went belly up in this process, so my nice list of what I'd bought (bits and pieces list) was lost also. (New office computer has a multi TB backup drive).

I'll see if I can pull the paraport out this weekend and photograph it.

Thanks again.

Tom

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

More
10 years 10 months ago #66996 by TarHeelTom
I didn't remember correctly. (Has that ever happened to anyone else?)

The motherboard has a built in parport, and i added a card for a second port. Here's a link to the pics:

tomwade.me/tw/machinist/nm/t18.php

This is a shorter case than the originals, and took me a while to find a shorter plate to go on the card so it would hook up with the shorter case.

Thanks again

Tom

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

More
10 years 10 months ago #67011 by Todd Zuercher
looks like a single port card, (using a multi port chip). One of those addresses from your lspci will be the one you need, You are just going to have to trial and error till you find the right one.

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

More
10 years 10 months ago #67017 by TarHeelTom
I'll play with it some and see what I can find.

Thanks

Tom

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

More
10 years 10 months ago #67031 by tommylight
Sooooo, the port on the motherboard has the address 0x378 if you did not change it in bios (it can be set to 0x278 or something like that) and for the add on card use the third address ( in your case i think it was 1020).
BTW, do not forget to add the needed lines to hal for reading and writing to the second port or it will not work even if you add the correct address.
Below is and example so be sure to check it

# first load the parport driver
loadrt hal_parport cfg="0x0378"
change to
# first load the parport driver
loadrt hal_parport cfg="0x0378 out 0x1020 in"
The "out" and "in" can be left out if you need them both as "12 output 5 input" ports
#
And the following
# next connect the parport functions to threads
# read inputs first
addf parport.0.read base-thread 1
# write outputs last
addf parport.0.write base-thread -1
has to look like this:
# next connect the parport functions to threads
# read inputs first
addf parport.0.read base-thread 1
addf parport.1.read base-thread 1
# write outputs last
addf parport.0.write base-thread -1
addf parport.1.write base-thread -1

Also the pins must be assigned for port 0 and for port 1 as you need them
Regards,
Tom

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

More
10 years 10 months ago #67033 by TarHeelTom
>>>>Sooooo, the port on the motherboard has the address 0x378 if you did not change it in bios (it can be set to 0x278 or something like that) and for the add on card use the third address ( in your case i think it was 1020).
BTW, do not forget to add the needed lines to hal for reading and writing to the second port or it will not work even if you add the correct address.
Below is and example so be sure to check it

I've NOT changed the port address on the motherboard, but I see in looking at the hal history that it has been changed to several different values thru the years.

But thanks so much for commenting the various lines above. Spent a couple of days in the Ann Arbor CNC conference in the linux class studying all this, and it made sense at the time. But that was three or four years and if I don't use this knowledge on a regular basis, it doesn't stay fresh in my mind.

Was just wondering... Is there an empirical method of determining the port address? I was thinking of simply hooking the o'scope to one of the output pins from the computer (but at the bob) and simply sending out a square wave to each address in sequence and watch for it to show up on the scope. Back in the TRS-80 days I could have easily written a driver to make this happen, but don't know where to start when using a pc.

Okay, now it's time for back to the shop and try these changes.

Thanks again

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

Time to create page: 0.138 seconds
Powered by Kunena Forum