Reusing probe pin (I did run out of pin on papor)
- Stanislavz
- Away
- Senior Member
- Posts: 54
- Thank you received: 16
So did come here to conclusion : forum.linuxcnc.org/12-milling/50094-rigi...-with-simple-encoder
That for rigid tapping one need A B Z on spindle encoder. Did order three hall sensors. But ! I have 3 parport pins already in use (E stop, home and probe). I did find of possibility to use missing tooth encoder style for both index and phase. After reading on missing tooth implementation - it will not take B signal so quadrature would be lost. Which is ok lathe threading, but not for rigid tapping. I do even download source code of encoder - no easy way to implement both (missing tooth and X4) of them. Unless other have seen different option, question is simple.
How can one reuse Probe pin as Phase B pin ? Acidently - you do not want spindle to rotate while probing
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19202
- Thank you received: 6436
If it is a built in parallel port, almost all can be set to different modes and that changes the number of outputs and inputs:
-Mode "out" 12 outputs and 5 inputs
-Mode "in" 4 outputs and 13 inputs
-Mode "X" 8 outputs and 9 inputs
Please Log in or Create an account to join the conversation.
- Stanislavz
- Away
- Senior Member
- Posts: 54
- Thank you received: 16
My crap code using spindle-on:
net probe-and-B <= parport.0.pin-15-in
loadrt and2 count=2
addf and2.0 servo-thread
addf and2.1 servo-thread
loadrt not count=1
addf not.0 servo-thread
net spindle-phase-a encoder.0.phase-A
net spindle-phase-b encoder.0.phase-B
net spindle-index encoder.0.phase-Z
net my_sigin1 and2.0.in0 <= probe-and-B
net my-sigin2 and2.0.in1 <= spindle-on
net both-on spindle-phase-b <= and2.0.out
net my-signot not.0.in <= spindle-on
net my-sigout probe-on <= not.0.out
net my-sigin12 and2.1.in0 <= probe-and-B
net my-sigin22 and2.1.in1 <= probe-on
net both-on2 probe-in <= and2.1.out
net probe-in => motion.probe-input
And chat gpt created :
Or it will go to error while stopping, due to loosing one of encoder phase. I think i can add an delay of 1 second to avoid this ? And - any way to get all axis homed bit ?# Load the MUX component
loadrt mux names=mux.0 count=2
# Configure the MUX to select between encoder phase B and probe based on spindle state
setp mux.0.sel 0 # Use encoder phase B signal by default
# Invert the spindle-on signal to control the MUX selection
net spindle_on_not spindle.0.on => mux.0.sel-invert
# Connect encoder phase B and probe signal to the MUX
net encoder_phase_B encoder.0.phase-B => mux.0.0.in
net probe_signal probe.0.probe-in => mux.0.1.in
# Connect the output of the MUX to the input pin (parport12)
net mux_output mux.0.out => parport.0.pin-12-out
Looks like here it is called get_allhomed
github.com/LinuxCNC/linuxcnc/blob/master...onents/homecomp.comp
Than i would share home all pin.
Please Log in or Create an account to join the conversation.