Two switches/sensors for tool length and 3d touching into motion-probe-in? Howto

  • Muftijaja
  • Away
  • Premium Member
  • Premium Member
More
16 May 2025 14:29 - 16 May 2025 14:33 #328566 by Muftijaja
Hello again!
My next problem to get my machine running (it's running but not as precise as I want it) has to do with two switches.
My tool length sensor is a quite normal mechanical switch, that is NC and put +24V into input-08-not. That's working perfectly.
If I put my 3d Sensor (NPN-NO) into the line as the picture shows, nothing works. The 10k resistor (R1) before the Tool length switch puts the voltage down to 12.xVolts, the Input-08-not is set to "probing" permanently.
The 3D Sensor does nothing at all, not even the LEDs are active (the output is an open collector, I presume). What about diodes?
 

So, my next thought is to disconnect the two sensors from each other and use another Input of my MEsa 7i76e just for the 3D Sensor. This input should not be inverted for correct funktion. How can I do this with or without using an OR2 funktion?
My lines for the tool length are as follows

#---PROBE-IN ---
net probe-in     <=  hm2_7i76e.0.7i76.0.0.input-08-not    
net probe-in     =>  motion.probe-input

AFAIK, I cannot just net another input to motion.probe-input. But how could a OR2 look like?

Thanks for your help, again!
Hanno
 
Attachments:
Last edit: 16 May 2025 14:33 by Muftijaja.

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

More
16 May 2025 14:51 #328571 by PCW
You would need a stiffer pullup so you get more than 12V at the 7I76E input

I would suggest 2.2K 1/2W

You could also use two separate inputs and an OR or MUX component
(the MUX component has the advantage of ignoring the other input
when not in use, but requires a signal to select which input shouls be active)
The following user(s) said Thank You: Muftijaja

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

  • djdelorie
  • Away
  • Junior Member
  • Junior Member
More
17 May 2025 03:08 #328606 by djdelorie
I would avoid the mux option unless you're VERY comfortable with your programming skills. I used a mux on mine, and the first time I did something unusual with the toolsetter I broke it off because it hadn't been enabled.
I still use separate inputs, but now it's so I can apply a different software noise rejection on each input (the toolsetter tends to trip from the tool change)
The following user(s) said Thank You: Muftijaja

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

  • Muftijaja
  • Away
  • Premium Member
  • Premium Member
More
17 May 2025 15:02 #328633 by Muftijaja
PCW, thanks a lot for the advice with the smaller resistor! I found one 2.2k with 1W in my boxes and used that today and voilá, it works as it should. Problem solved, I hope. (Don't know if I need noise reduction)Guys, I have no idea how to use sth like mux or mux_generic. I wouldn't even be able to use two inputs - but just out of curiosity , how would you do that in a HAL file if i would use an OR2:
 loadrt or2 count=1
net probe-in     <=  hm2_7i76e.0.7i76.0.0.input-08-not    
net probe-in     =>  motion.probe-input
and the second input hm2_7i76e.0.7i76.0.0.input-09 ? my programming scills are beginner level...
(Yes, I read the example in the LCNC HAL Examples to OR2 but I cannot convert that for my problem.)

Thanks and best regards!
Hanno

 

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

More
17 May 2025 15:38 #328637 by PCW
Something like:

loadrt or2
addf or2.0 servo-thread

net probe-wzl  <= hm2_7i76e.0.7i76.0.0.input-08-not => or2.0.in0
net probe-3d   <= hm2_7i76e.0.7i76.0.0.input-09-not => or2.0.in1
net probe-in     =>  motion.probe-input <= or2.0.out

Notes:

This assumes the "or2" is not already used

(if its already used, you need to add a new instance with the names or count stanza)

Also not sure of the individual 3d and wzl polarities
The following user(s) said Thank You: Muftijaja

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

  • Muftijaja
  • Away
  • Premium Member
  • Premium Member
More
17 May 2025 16:41 #328640 by Muftijaja
Thanks, PCW for this example! I try this out the next days. 
or2 is not used actually. 3D is NO and WZL is NC, otherwise I would have put them both in series.
I will see if I have to delete the -not for the 3D switch.
Thanks a lot and have a nice weekend!
Hanno

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

Time to create page: 0.300 seconds
Powered by Kunena Forum