Tool Touch Probe NO/NC

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

eng199
Posts: 372
Joined: Fri Jan 10, 2014 11:29 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Howard, PA

Re: Tool Touch Probe NO/NC

Post by eng199 »

Resistors are the only things on that schematic that sometimes have a tolerance included on the schematic. 5% is fine. It is uncommon to find resistors with tolerance worse than 5%. That is why tolerance is rarely indicated unless it must be better than 5%.
martyscncgarage
Posts: 9912
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: Tool Touch Probe NO/NC

Post by martyscncgarage »

eng199 wrote: Tue Aug 04, 2020 8:26 am Resistors are the only things on that schematic that sometimes have a tolerance included on the schematic. 5% is fine. It is uncommon to find resistors with tolerance worse than 5%. That is why tolerance is rarely indicated unless it must be better than 5%.
Thanks Matt, also meant what wattage the resistor should be. And the LED itself is typical.
Appreciate your time and effort on the forums!
Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
eng199
Posts: 372
Joined: Fri Jan 10, 2014 11:29 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Howard, PA

Re: Tool Touch Probe NO/NC

Post by eng199 »

Marty, not to be a pain, but the wattage is not normally specified unless it it over 1/4W for the same reason. If you look on Digi-key for 2.2k through hole resistors in stock, there are 162 choices, 5 of which are less than 1/4W. Other than the MOSFET, this is a circuit that the average electronics hobbyist can make from parts in their "junk box" and it will work. I'm not trying to get out of writing things down. I think over-specifying the circuit would make it look more complicated than it really is. This would discourage some people from trying it and lead to even more questions about why xxxx is specified. It is an example circuit with no guarantee for any purpose. Users must build and test the circuit to verify fitness for their purposes.

I am not sure what you are saying about the LEDs. They are probably the least typical parts on the schematic. The choice of color for each one is the most obvious variable. If one is red and the other green, the green one is likely to have a higher voltage drop. The current draw and resistor wattage will be different for one LED circuit than the other. Once again, the differences are not likely to be enough to affect operation. The builder must verify that the circuit works with the parts used.

You could literally spend a lifetime selecting one resistor if you wanted to drill down through all the details. In my resistor search example, the choices of type are: Carbon Composition, Carbon Film, Ceramic, Metal Film, Metal Oxide Film, Thick Film, Thin Film, or Wirewound. What are the advantages of each type? That could take weeks of research by itself if you want to make a good scratch in the surface of available knowledge.
In the case of this circuit, you can put no thought into the resistor selection and use the first one with a reasonably close resistance. The chance of part selection being a problem will still be far less than the chance of a wiring mistake.

This is a circuit that will work with the most common parts available. You would have to go out of your way to select specialized parts or be particularly unlucky for the unlisted specifications to cause a problem.
martyscncgarage
Posts: 9912
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: Tool Touch Probe NO/NC

Post by martyscncgarage »

Thanks Matt.
You are not a pain. These are questions that would be asked by others.
Again your time and efforts are appreciated.
Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
mrichards
Posts: 34
Joined: Thu Feb 28, 2019 12:05 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Tool Touch Probe NO/NC

Post by mrichards »

cncsnw wrote: Sun Aug 02, 2020 2:23 pm The Ctrl-Alt-i facility only applies to INP1 - INP80.

You can invert INP769, but you have to add a line in the PLC program to do it.

The lengthy block of comments in most PLC programs that begins with "PLC Input manipulation - SV_PLC_DEBOUNCE_1 - SV_PLC_DEBOUNCE_64" relates to this capability. You can invert or force any input (or both); and you can change the debounce time for any input (sometimes useful for addressing noisy slow-action switch contacts).

In short, if you want to invert INP769, then you need to set SV_LOCAL_DEBOUNCE_2 = 16843073 in the PLC program. Typically you do this by adding "SV_LOCAL_DEBOUNCE_2 = 16843073" to the list of things that are done unconditionally in InitialStage; recompiling; and cycling the power.
Hi,
License: SERVO PRO
Version: CNC12-D Mill v4.16

I'm also trying to integrate a NC mechanical probe.
I'm using I0769 for the NC probe and I0771 for the probe detect (it gets shorted when I plug in the probe, per the Centroid wiring diagram)
PLC Detective.JPG
I put the "SV_LOCAL_DEBOUNCE_2 = 16843073" line in my initialstage.
Everything works great with the probe, the problem is that when the probe is unplugged, I get "unexpected probe contact" errors. I assumed that was the job of the probe detect input, no? Perhaps some PLC logic to ignore INP679 if INP 771 is false? Or is the probe input safety hard coded and can't be affected by PLC code?

Thanks
Attachments
report_0008DC111213-0916201004_2020-11-24_15-19-16.zip
(5.86 MiB) Downloaded 144 times
------------
Mark
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Tool Touch Probe NO/NC

Post by cncsnw »

Some probe-trip-detection features are in the PLC program, and others are written into CNC12.

The "916 unexpected probe contact" message is a CNC12 feature, which the PLC program cannot directly change.

One thing you could do in your PLC program is copy INP769 into a memory bit somewhere, then tell CNC12 to look at the memory bit instead of the input. That would allow you to do whatever logic manipulations you need.

For example:

Code: Select all

;...
MechanicalProbe               IS INP769  ; N.O. probe: 1 = tripped, 0 = idle
;...
ProbeDetect                   IS INP771  ; N.O. detect: 1 = present, 0 = not present
;...
ProcessedProbeTrip_M         IS MEM30
;...
ProcessProbeFastStage  IS FSTG1
;...
;========================
   ProcessProbeFastStage
;========================
; Report probe trip if the probe is connected, and tripped
IF ProbeDetect && MechanicalProbe THEN (ProcessedProbeTrip_M)
;...
Supposing you used MEM30 for the result, you would then set Parameter 11 to a value of 70030 (instead of 50769).

The input inversion code in InitialStage would still be used, since other parts of the PLC logic are written with the assumption that the probe is normally-open.

A "fast stage" is needed to minimize the delay between when the probe actually trips and when the event is reported to CNC12. Normal PLC program stages only run ca. 50 times per second, so there would be a random lag of up to 21ms. Fast stages run 1000 times per second, so the lag time would be much shorter and more consistent.
mrichards
Posts: 34
Joined: Thu Feb 28, 2019 12:05 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Tool Touch Probe NO/NC

Post by mrichards »

Thanks,
I'll give the code a shot after the holiday. I don't have time today so I just made a dummy plug with a IN669 shorted out so I could run a job.
That made the controller happy and it runs normally.
For a long term solution I think I'll modify my probe with the flipper circuit so I can be compatible with stock OAK logic.

Regards,
------------
Mark
swissi
Posts: 573
Joined: Wed Aug 29, 2018 11:15 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DADEB24D5-0309180716
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Tool Touch Probe NO/NC

Post by swissi »

cncsnw wrote: Sun Aug 02, 2020 2:23 pm The Ctrl-Alt-i facility only applies to INP1 - INP80.

You can invert INP769, but you have to add a line in the PLC program to do it.

The lengthy block of comments in most PLC programs that begins with "PLC Input manipulation - SV_PLC_DEBOUNCE_1 - SV_PLC_DEBOUNCE_64" relates to this capability. You can invert or force any input (or both); and you can change the debounce time for any input (sometimes useful for addressing noisy slow-action switch contacts).

In short, if you want to invert INP769, then you need to set SV_LOCAL_DEBOUNCE_2 = 16843073 in the PLC program. Typically you do this by adding "SV_LOCAL_DEBOUNCE_2 = 16843073" to the list of things that are done unconditionally in InitialStage; recompiling; and cycling the power.
Great info Marc! To take this one step further, if a user has a NO type touch probe on INP769 and wants to permanently connect a NC type tool setter on INP770, can INP770 bee inverted and what would be the "magic" Debounce code?

A detect signal is not really required for a TT that's permanently connected and would also not cause the issue that the control would think the TT is tripped when disconnected as the TT is always connected.

Would that be a supported option?

-swissi
If you are using Fusion 360, check out my CNC12 specific Post Processor
If you are using a Touch Probe, Tool Touch Off Device or a Triple Corner Finder Plate, check out my ProbeApp

Contact me at swissi2000@gmail.com
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Tool Touch Probe NO/NC

Post by cncsnw »

The normal value of SV_LOCAL_DEBOUNCE_2 is 16843009. That is, it is a 32-bit integer with bits 0, 8, 16 and 24 set.

That means that INP769, INP770, INP771 and INP772 all use debounce time #1, and none of them are forced or inverted.

To invert INP769, you set bit 6. This adds 64 to the value, so you get 16843073.

To invert INP770, you would set bit 14. That would add 16384 to the value. If you leave INP769 normal, and invert INP770, then you would have SV_PLC_DEBOUNCE_2 = 16859393. To invert both INP769 and INP770, you would need 16859457 (which is 16843009 + 16384 + 64).
swissi
Posts: 573
Joined: Wed Aug 29, 2018 11:15 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DADEB24D5-0309180716
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Tool Touch Probe NO/NC

Post by swissi »

cncsnw wrote: Wed Mar 17, 2021 12:19 am The normal value of SV_LOCAL_DEBOUNCE_2 is 16843009. That is, it is a 32-bit integer with bits 0, 8, 16 and 24 set.

That means that INP769, INP770, INP771 and INP772 all use debounce time #1, and none of them are forced or inverted.

To invert INP769, you set bit 6. This adds 64 to the value, so you get 16843073.

To invert INP770, you would set bit 14. That would add 16384 to the value. If you leave INP769 normal, and invert INP770, then you would have SV_PLC_DEBOUNCE_2 = 16859393. To invert both INP769 and INP770, you would need 16859457 (which is 16843009 + 16384 + 64).
Thanks Marc for the explanation, that makes sense now.

-swissi
If you are using Fusion 360, check out my CNC12 specific Post Processor
If you are using a Touch Probe, Tool Touch Off Device or a Triple Corner Finder Plate, check out my ProbeApp

Contact me at swissi2000@gmail.com
Post Reply