Linuxcnc not seeing limit switches
- TarHeelTom
- Offline
- Premium Member
Less
More
- Posts: 91
- Thank you received: 1
11 Dec 2015 00:10 #66778
by TarHeelTom
Replied by TarHeelTom on topic Linuxcnc not seeing limit switches
Will that get both parports?
Tom
Tom
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19067
- Thank you received: 6391
11 Dec 2015 23:57 #66854
by tommylight
Replied by tommylight on topic Linuxcnc not seeing limit switches
Oh you have the 2 paraport card !! how many serial ports and headers ? Picture of the card ?
Or you have to do a bit of testing to figure out the second address.
Make a test config with stepconf wizards, open the hal file and change the parport address to one you got from sudo lspci -v, save and start that config. If you get the error of "device is bussy" restart the computer before trying another address, anything after a bussy device will not work without a reboot on those cards.
To be sure, get an LED light from a toy or lighter or torch and stick one of the pins in the 2 or third output on paraport and the other pin to the screw or shielding of the paraport and IF the axis starts, press the left-right arrow keys on keyboard, If you get nothing, reverse the wires on the LED and try again.
You should get a little light on pin 2 and fully lit on pin3 when you press one direction and no light on pin3 when pressing the other direction.
Regards,
Tom
Or you have to do a bit of testing to figure out the second address.
Make a test config with stepconf wizards, open the hal file and change the parport address to one you got from sudo lspci -v, save and start that config. If you get the error of "device is bussy" restart the computer before trying another address, anything after a bussy device will not work without a reboot on those cards.
To be sure, get an LED light from a toy or lighter or torch and stick one of the pins in the 2 or third output on paraport and the other pin to the screw or shielding of the paraport and IF the axis starts, press the left-right arrow keys on keyboard, If you get nothing, reverse the wires on the LED and try again.
You should get a little light on pin 2 and fully lit on pin3 when you press one direction and no light on pin3 when pressing the other direction.
Regards,
Tom
Please Log in or Create an account to join the conversation.
- TarHeelTom
- Offline
- Premium Member
Less
More
- Posts: 91
- Thank you received: 1
12 Dec 2015 02:03 #66858
by TarHeelTom
Replied by TarHeelTom on topic Linuxcnc not seeing limit switches
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
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.
- TarHeelTom
- Offline
- Premium Member
Less
More
- Posts: 91
- Thank you received: 1
15 Dec 2015 04:35 #66996
by TarHeelTom
Replied by TarHeelTom on topic Linuxcnc not seeing limit switches
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
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.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1440
15 Dec 2015 13:58 #67011
by Todd Zuercher
Replied by Todd Zuercher on topic Linuxcnc not seeing limit switches
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.
- TarHeelTom
- Offline
- Premium Member
Less
More
- Posts: 91
- Thank you received: 1
15 Dec 2015 15:32 #67017
by TarHeelTom
Replied by TarHeelTom on topic Linuxcnc not seeing limit switches
I'll play with it some and see what I can find.
Thanks
Tom
Thanks
Tom
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19067
- Thank you received: 6391
16 Dec 2015 00:20 #67031
by tommylight
Replied by tommylight on topic Linuxcnc not seeing limit switches
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
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.
- TarHeelTom
- Offline
- Premium Member
Less
More
- Posts: 91
- Thank you received: 1
16 Dec 2015 04:08 #67033
by TarHeelTom
Replied by TarHeelTom on topic Linuxcnc not seeing limit switches
>>>>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
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.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1440
16 Dec 2015 14:14 - 16 Dec 2015 16:07 #67041
by Todd Zuercher
Replied by Todd Zuercher on topic Linuxcnc not seeing limit switches
Try this command at the terminal. When I do it on a machine with an on board port and a 2 port pci card this is what it shows.
cat /proc/ioports | grep parportThe on board port is address 0378, and the other two are e030 and e050.
lspci -v on the same machine shows.
cat /proc/ioports | grep parport
digital1@digital1:~$ cat /proc/ioports | grep parport
0378-037a : parport0
e030-e032 : parport2
e050-e052 : parport1
digital1@digital1:~$
lspci -v on the same machine shows.
04:00.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 18
I/O ports at e050 [size=8]
I/O ports at e040 [size=8]
I/O ports at e030 [size=8]
I/O ports at e020 [size=8]
I/O ports at e010 [size=8]
I/O ports at e000 [size=16]
Kernel driver in use: parport_pc
Last edit: 16 Dec 2015 16:07 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
- TarHeelTom
- Offline
- Premium Member
Less
More
- Posts: 91
- Thank you received: 1
16 Dec 2015 16:27 #67042
by TarHeelTom
Replied by TarHeelTom on topic Linuxcnc not seeing limit switches
Thanks, Todd.
Had forgotten all about the grep command. A very useful tool.
Anyone know what the difference between "-v" and "-vv" is? I seem to get the same result with either.
Had forgotten all about the grep command. A very useful tool.
Anyone know what the difference between "-v" and "-vv" is? I seem to get the same result with either.
Please Log in or Create an account to join the conversation.
Moderators: piasdom
Time to create page: 0.118 seconds