Put 12 limit switch into 4 input pin in 1 parallel port

More
19 Jan 2017 13:42 #86146 by randyt1027
I am trying to put 12 limit switch,including home,-limit,+limit,of 4 axis ,to encode them to 4 bit with ICs circuit, so that my parallel port can read them all status.
But I don't know if this is possible or needed(I am not sure how linuxcnc deal with precise position), to configure HAL for linuxcnc knowing 0000 is Home X, 0001 is Home Y, 0110 is +limit A, or program with Python and linuxcnc module to make is possible for linuxcnc knowing all these status.
So that I don't have to make another CNC platform for my just-fit platform to work.

Please let me know if that is possible for linuxcnc to read 4 bit logic for different state.
simply by configure hal ,or programming, or impossible ,or just dont needed ,linuxcnc motion control can knowing the limit by predicting my stepper motion.

Thanks and Regards

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

More
19 Jan 2017 14:01 #86148 by andypugh
The simple (and common) approach would be to simply use one input for max limit, min limit and home on each axis/joint.

Otherwise, HAL is entirely capable of converting a bit pattern to a single output. The easiest component to use for this is probably "match8" linuxcnc.org/docs/2.7/html/man/man9/match8.9.html though you could also use LUT5.

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

More
19 Jan 2017 17:50 #86178 by tommylight
How many outputs are you using? If less than 8, change the paraport section in hal from "0x378 out" to "0x378 x", or whatever your address is.
That will give you 8 outputs and 9 inputs form the paraport. Most parallel ports will support that mode (all i tested do).

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

Time to create page: 0.141 seconds
Powered by Kunena Forum