use motherboard parallel for additional inputs?
My computer motherboard has a parallel port that I would like to use for more inputs (tooleye sensor, ?)
I am having trouble figuring out how to access it.
My .hal file has this in it right now:
loadrt hal_parport cfg="0xa400 out 0x378 in"
When I try lspci -v in terminal, I get I/O a000 and a400.
I figure they are referring to the PCI card only? (hence the 0xa400 in my .hal file)
I am not sure why it says "out" and "in". My PCI card handles inputs and outputs.
Not sure how to identify the mobo address for parport. And if it is say... 0x378, how will the machine know
parport.0 from parport.1 when I do this in .hal:
addf parport.0.read base-thread
addf parport.0.write base-thread
addf parport.1.read base-thread
addf parport.1.write base-thread
Any ideas would be appreciated because I am stumped right now.
thanks!
Please Log in or Create an account to join the conversation.
lspci will not show the built in port, because it is not on the PCI bus
Use cat /proc/ioports
First off, it would be easier for you and anyone looking at your config, if you use the conventional setup, of the built in port for steppers etc and use the PCI card as additional inputs etc
Just change the hal file line to
loadrt hal_parport cfg="0x378 out 0xa400 in"
and plug your DB25 plug into the onboard connector, that is it done
I am not sure why it says "out" and "in". My PCI card handles inputs and outputs.
Setting a port to input, sets pins 2-9 as input, that is way different to a port set as output and gives many more inputs.
Not sure how to identify the mobo address for parport. And if it is say... 0x378, how will the machine know
parport.0 from parport.1 when I do this in .hal:
addf parport.0.read base-thread
addf parport.0.write base-thread
addf parport.1.read base-thread
parport0 is the first port declared in the loadrt line, parport1 the second etc.....
All quite simple really.
So just check the address is 0x378, change the loadrt line and swap the parport plug and you should be off and running ( or at least able to)
regards
Please Log in or Create an account to join the conversation.
Now I can start reading about the next move...
Please Log in or Create an account to join the conversation.
I could not get it to work with g38 though in a program.
My .hal contains 2 lines with respect to the probe:
loadrt probe_parport
net probe-in <= parport.1.pin-02-in
I wrote a short program, and it attempts G38.2 but never triggers when I hit the probe? (or it gives error with G38.3 of not hitting anything)
I read about "motion.probe-input" but when I put that in the .hal file it won't start the machine (error msg)
maybe I am using incorrect syntax?
Any suggestions or direction would be appreciated! thanks.
EDIT: It works now, I had to do this...
net probe parport.1.pin-02-not =>motion.probe-input
Please Log in or Create an account to join the conversation.
My .hal contains 2 lines with respect to the probe:
loadrt probe_parport
net probe-in <= parport.1.pin-02-in
For info, the first line is nothing to do with the probing you mean.
A probe is just a switch, it is the way the system deals with it that makes
probing different.
Couple of links for you, if you have not already seen them.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Touch_Probe
www.timeguy.com/cradek/01262579508
regards
Please Log in or Create an account to join the conversation.