multiple motion probe inputs

More
5 years 10 months ago #192158 by Stran_ge
Hello

At the moment i am using a touch probe (Drewtronics) and a tool length sensor via 2 inputs on my mesa card by the use of "or2".
Both probes are normally closed. The touch probe is used with a cable. I use Probe Basic as Screenset.
My problem is, that i disconnect my touch probe after the initial probing of my stock and when i do that the tool length sensor obviously doesnt work anymore since the motion.probe-input is already triggered.
So currently i have to connect my touch probe to use the tool length sensor, which is, as you can imagine, less than ideal.
Is there a smart way to solve this problem via hal or script functions ?

This is my probing part in the hal.
Code:
loadrt or2 addf or2.0 servo-thread net probe-input-A or2.0.in0 <= hm2_7i76e.0.7i76.0.0.input-08-not net probe-input-B or2.0.in1 <= hm2_7i76e.0.7i76.0.0.input-09-not net probe-input motion.probe-input <= or2.0.out

Best regards

Nils

Please Log in to join the conversation.

More
5 years 10 months ago #192159 by alkabal
Hi

I face 100% the same problem but for now i haven't cherched for the good solution excepted i manage this directly inside macro with probe screen V2, but i plan to found a autonomous way and at same time i like to prevent spindle starting if the probe is detected.

Br

Please Log in to join the conversation.

More
5 years 10 months ago #192161 by alkabal
For now i'm here, using motion.digital for inhibit Touch probe or tool setter
Code:
# --- probe signals separated for probe + toolsetter with status checking and possible bypass from macro --- # --- some link for securing probe are done inside spindle and orient config-- loadrt or2 names=or2.combined-touch loadrt and2 names=and2.combined-probe loadrt and2 names=and2.combined-setter loadrt not names=not.combined-probe-on loadrt not names=not.combined-setter-on addf or2.combined-touch servo-thread addf not.combined-probe-on servo-thread addf not.combined-setter-on servo-thread addf and2.combined-probe servo-thread addf and2.combined-setter servo-thread net touch-probe-not-in <= motion.digital-out-01 net touch-probe-not-in => not.combined-probe-on.in net touch-setter-not-in <= motion.digital-out-02 net touch-setter-not-in => not.combined-setter-on.in net touch-setter <= [HMOT](CARD0).7i76.0.0.input-14 # probe is NC NPN with pullup #or #net touch-setter <= [HMOT](CARD0).7i76.0.0.input-14-not # probe is NC PNP net touch-probe => and2.combined-probe.in0 net touch-probe-on-psng <= not.combined-probe-on.out # M65 P1 activate / M64 P1 inhibit net touch-probe-on-psng => and2.combined-probe.in1; net touch-probe-and2-psng <= and2.combined-probe.out net touch-probe-and2-psng => or2.combined-touch.in0 net touch-setter <= [HMOT](CARD0).7i76.0.0.input-15 # setter is NC NPN with pullup #or #net touch-setter <= [HMOT](CARD0).7i76.0.0.input-15-not # setter is NC PNP net touch-setter => and2.combined-setter.in0 net touch-setter-on-psng <= not.combined-setter-on.out # M65 P2 activate / M64 P2 inhibit net touch-setter-on-psng => and2.combined-setter.in1 net touch-setter-and2-psng <= and2.combined-setter.out net touch-setter-and2-psng => or2.combined-touch.in1 net touch-probe-combined <= or2.combined-touch.out net touch-probe-combined => motion.probe-input

edited message for clarification

Please Log in to join the conversation.

More
5 years 10 months ago #192163 by alkabal
So wanted in this code is allow probe to be automatically deactivated until is see as wired. NPN NC with pull up.

I have see in other topic a guy simply using a timedelay as workaround.

Br

Please Log in to join the conversation.

More
5 years 10 months ago #192165 by Stran_ge
that seems quite complex, kinda hard for me to make sense of this.

Thank you anyway.

Please Log in to join the conversation.

More
5 years 10 months ago #192166 by alkabal
github.com/alkabal/probe-screen-ng

But the change are for now not finalized...

Please Log in to join the conversation.

More
5 years 10 months ago #192167 by Stran_ge
i dont want to change my screenset tho.

Please Log in to join the conversation.

More
5 years 10 months ago #192168 by alkabal
Well

i have do like you, using or2

But after that i have wanted to add a possible deactivation using motion.digital-out-01 and motion.digital-out-02 (using M64 M65 command for make this value 1 or 0)

i have faced the fact this motion pin need to be inverted from 1/0 to 0/1 so i have a a not function allowing to reverse signal.

Please Log in to join the conversation.

More
5 years 10 months ago #192169 by alkabal
I have put link if you need to study how i have managed the activation/deactivation for input.

Please Log in to join the conversation.

More
5 years 10 months ago #192172 by Stran_ge
that would indeed be helpful

Please Log in to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum