- Posts: 4
- Thank you received: 0
Cannot use pins 2 - 9 as inputs, only outputs.
- howardsmith
- Topic Author
- Offline
- New Member
-
Less
More
15 years 6 months ago #9122
by howardsmith
Cannot use pins 2 - 9 as inputs, only outputs. was created by howardsmith
I have two parallel ports in my computer driving my SEIG KX1. The first port, 0x378, is setup to handle all the mill functions and works great.
I currently use the second port, a NetMos MCS9805CV based card at 0xdc00, to plug in my digitizing probe and drive coolant relays etc.
As I don't have a need to output anything with the second card, I want to use pins 2 - 9 as inputs from my pendant. My pendant needs a total of 7 inputs (2 for encoder A and B, 2 to select speed, 3 to select axis).
From what I've read, specifying 'in' in the hal file's port config line should allow me to use these pins as inputs.
loadrt hal_parport cfg="0x378 0xdc00 in"
However, when I fire up the hal meter and try to trip these pins, I get no action. Pins 10, 11, 12, 13, 15 all work perfectly.
Have I missed something? Is this card not capable of using 2-9 as inputs?
Thanks!
-Howard.
I currently use the second port, a NetMos MCS9805CV based card at 0xdc00, to plug in my digitizing probe and drive coolant relays etc.
As I don't have a need to output anything with the second card, I want to use pins 2 - 9 as inputs from my pendant. My pendant needs a total of 7 inputs (2 for encoder A and B, 2 to select speed, 3 to select axis).
From what I've read, specifying 'in' in the hal file's port config line should allow me to use these pins as inputs.
loadrt hal_parport cfg="0x378 0xdc00 in"
However, when I fire up the hal meter and try to trip these pins, I get no action. Pins 10, 11, 12, 13, 15 all work perfectly.
Have I missed something? Is this card not capable of using 2-9 as inputs?
Thanks!
-Howard.
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Offline
- Platinum Member
-
Less
More
- Posts: 1018
- Thank you received: 183
15 years 6 months ago #9124
by Mike_Eitel
Replied by Mike_Eitel on topic Re:Cannot use pins 2 - 9 as inputs, only outputs.
Hi Howard
Lately I was hunting for a similar problem.
1. Did you modified according to :
If you encounter this problem, you must make sure that the Linux kernel module parport_pc is not loaded at boot time.
On Ubuntu systems, you can do this by creating a file in /etc/modprobe.d/ with the one line
install parport_pc /bin/true
The EMC2 packages put this line in the file /etc/modprobe.d/emc2.
2. Did you use lspci to look for the correct adress. ( I found that sometimes I needed a reboot with powerloss to get a result. )
3. And this was the hardest one I found that a interrupt conflict did ecactly what you describe..... Playing around with bios and PCI bus slot..... Opps, It worked ( AGAIN )
Mike
Lately I was hunting for a similar problem.
1. Did you modified according to :
If you encounter this problem, you must make sure that the Linux kernel module parport_pc is not loaded at boot time.
On Ubuntu systems, you can do this by creating a file in /etc/modprobe.d/ with the one line
install parport_pc /bin/true
The EMC2 packages put this line in the file /etc/modprobe.d/emc2.
2. Did you use lspci to look for the correct adress. ( I found that sometimes I needed a reboot with powerloss to get a result. )
3. And this was the hardest one I found that a interrupt conflict did ecactly what you describe..... Playing around with bios and PCI bus slot..... Opps, It worked ( AGAIN )
Mike
Please Log in or Create an account to join the conversation.
- howardsmith
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
15 years 6 months ago #9164
by howardsmith
Replied by howardsmith on topic Re:Cannot use pins 2 - 9 as inputs, only outputs.
I have the modprobe.d file with that line in it, so that much must be 'ok'.
lspci is how I found the address in the first place - 0xdc00
lspci shows many addresses for this card, but the first, 0xdc00, is the only one that will let EMC use the card.
I'll try messing around with the bios/interrupts and see if I can get some action that way.
Thanks for the help, I'll let you know how I make out.
-Howard.
lspci is how I found the address in the first place - 0xdc00
lspci shows many addresses for this card, but the first, 0xdc00, is the only one that will let EMC use the card.
I'll try messing around with the bios/interrupts and see if I can get some action that way.
Thanks for the help, I'll let you know how I make out.
-Howard.
Please Log in or Create an account to join the conversation.
15 years 6 months ago #9168
by cncbasher
Replied by cncbasher on topic Re:Cannot use pins 2 - 9 as inputs, only outputs.
pins 2 - 9 are output only on a parallel port ,
pins 10,11,12,13,15 are input only
pins 1 , 14,16,17 are bi directional
pin 18 - 25 are ground
only other way is using an pci i/o card or mesa card etc modbus perhaps ?
pins 10,11,12,13,15 are input only
pins 1 , 14,16,17 are bi directional
pin 18 - 25 are ground
only other way is using an pci i/o card or mesa card etc modbus perhaps ?
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Offline
- Platinum Member
-
Less
More
- Posts: 1018
- Thank you received: 183
15 years 6 months ago #9169
by Mike_Eitel
Replied by Mike_Eitel on topic Re:Cannot use pins 2 - 9 as inputs, only outputs.
Hi cncbasher
Sorry but pin 2-9 can be changed by driver if you can use ECP/EPP mode for that card.
Howard
If you want you can download www.eitel.ch/mechatronics/MeCNC/cnc.zip
In the configs directory, there is a subdirectory porttest. There you find a .hal/xml combination to test a two parport configuration,
with first normal and second one in IN modus. Second port adress is xD400 ...
The file is called LPTplusIN.hal..
Use terminal in that directory and: halrun -I -fLPTplusIN.hal
Hope this helps you a bit
Mike
Sorry but pin 2-9 can be changed by driver if you can use ECP/EPP mode for that card.
Howard
If you want you can download www.eitel.ch/mechatronics/MeCNC/cnc.zip
In the configs directory, there is a subdirectory porttest. There you find a .hal/xml combination to test a two parport configuration,
with first normal and second one in IN modus. Second port adress is xD400 ...
The file is called LPTplusIN.hal..
Use terminal in that directory and: halrun -I -fLPTplusIN.hal
Hope this helps you a bit
Mike
Please Log in or Create an account to join the conversation.
- howardsmith
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
15 years 6 months ago #9172
by howardsmith
Replied by howardsmith on topic Re:Cannot use pins 2 - 9 as inputs, only outputs.
Good tool, thanks.
Using that, I could get the 0x378 card to use pins 2 - 9 as inputs if I short them with pin 13. So, I lose pin 13 as an input, but I gain 2 - 9, so it's all good. I'm sure that's not the right way of doing this, but it's working so I'm not going to mess with it. The add-on card would become 'TRUE' on these pins when shorted with 13, but they would never return to 'FALSE', so, no good.
What I'm noticing now, however, is that it takes a few seconds for pins 2 - 9 to change from true to false after I open the circuit. Is this normal? I'm using 3 of these pins as 'axis selection' on my pendant and if I don't wait a couple of seconds after changing the switch, I can actually be moving two axes at the same time! Dangerous.
-Howard.
Using that, I could get the 0x378 card to use pins 2 - 9 as inputs if I short them with pin 13. So, I lose pin 13 as an input, but I gain 2 - 9, so it's all good. I'm sure that's not the right way of doing this, but it's working so I'm not going to mess with it. The add-on card would become 'TRUE' on these pins when shorted with 13, but they would never return to 'FALSE', so, no good.
What I'm noticing now, however, is that it takes a few seconds for pins 2 - 9 to change from true to false after I open the circuit. Is this normal? I'm using 3 of these pins as 'axis selection' on my pendant and if I don't wait a couple of seconds after changing the switch, I can actually be moving two axes at the same time! Dangerous.
-Howard.
Please Log in or Create an account to join the conversation.
Time to create page: 0.293 seconds