Allin1DC Normally Closed Probe (Solved)

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

Moderator: cnckeith

xr4x4ti
Posts: 52
Joined: Sun Dec 22, 2019 10:03 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Minnesota

Re: Allin1DC Normally Closed Probe

Post by xr4x4ti »

After a long delay, I finally got back to this and made some good progress.

I did what CNCSNW said and used his PLC program and added the line to invert the probe input (769). I then set parameter 11 = 50769 (positive).

Those few changes got me 90% there. Now the spindle inhibit works as intended and when the probe is plugged in everything works as it should.

The last stumbling block is that now with the probe unplugged it thinks the probe is being activated even though the probe enable is not active. This results in not being allow to fast jog or move in the negative Z direction.

There are ways around this problem, for example make a plug that jumpers the actual probe input when the probe is not plugged in while still leaving the probe enable open. But, there is probably a way to do this in the PLC program. That is not my expertise, but looking through it, it seems possible.

Thoughts?

Thanks,
Tim
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Allin1DC Normally Closed Probe

Post by cncsnw »

Lots of thoughts, no ready solutions.

Some probe-related functions are built into CNC12. Others are implemented in the PLC program.

The PLC program is responsible for inhibiting the spindle when a probe is connected (for Mills) or when a tool detector is connected (for Lathes).

The PLC program is responsible for stopping jogging moves when a probe or tool detector comes to be tripped; allowing only slow jog while a probe or tool detector is tripped; prohibiting Z-minus jogging while a probe or tool detector is tripped; and prohibiting continued X or Y jogging in the direction that was in use when the probe or tool detector came to be tripped.

Can you tell me in 25 words or less, what it means for the probe to be tripped, given all possible choices in Parameters 11 and 18?

Can you tell me in 100 words or less, what it means for a tool detector to be tripped, given all possible choices in Parameters 11, 44 (244 for lathe), and 257?

By "all possible choices", I generally mean positive, negative, or zero. However, to be complete, the logic ought to account for (absolute) values less than 10000 (look at the input of that number); greater than 50000 and less than 60000 (look at the input of that number); and greater than 70000 and less than 80000 (look at the memory bit of that number).

I am not saying it is impossible to write universal PLC logic for probe and tool detector trip detection and spindle inhibit; only that logic for 98% of cases takes only a few lines; while logic for 100% of cases will take hundreds of lines and many hours of testing.

My inclination thus far has been to simply make a custom PLC program for machines that fall into that last 2%.
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Allin1DC Normally Closed Probe

Post by cncsnw »

If you have the probe input wired to INP769 (as is usual); have inverted INP769 so that it looks like the probe is normally-open (as is usual); have a probe detection circuit that is normally open (as is usual); and have that probe detection circuit wired to INP771 (as is usual), then you might be able to resolve your remaining issues simply by editing five lines near the top of MainStage.

You would need to replace all occurrences of "MechanicalProbe" with "(MechanicalProbe && ProbeDetect)". I.e.

Code: Select all

;----------------------------------------------------------------
;           Probe protection while jogging
;----------------------------------------------------------------
; If the probe comes to be tripped while a jogging move is active,
; then trigger an error (stop jog and output message),
; and also disable jogging in the direction it was going.
IF (MechanicalProbe && ProbeDetect) THEN (ProbePD)

IF ProbePD && DoAx1PlusJog THEN SET Ax1PlusJogDisabled_M
IF ProbePD && DoAx1MinusJog THEN SET Ax1MinusJogDisabled_M
IF ProbePD && DoAx2PlusJog THEN SET Ax2PlusJogDisabled_M
IF ProbePD && DoAx2MinusJog THEN SET Ax2MinusJogDisabled_M
IF ProbePD THEN SET Ax3MinusJogDisabled_M

IF ProbePD && !JogProbeFault_M && (DoAx1PlusJog || DoAx1MinusJog ||
   DoAx2PlusJog || DoAx2MinusJog || DoAx3PlusJog || DoAx3MinusJog ||
   DoAx4PlusJog || DoAx4MinusJog || DoAx5PlusJog || DoAx5MinusJog)
  THEN (JogProbeFaultPD)

IF JogProbeFaultPD THEN SET JogProbeFault_M,
                        SET ErrorFlag_M,
                        ErrorMsg_W = PROBE_JOG_TRIP_MSG

; If the probe comes to be tripped while no program cycle is running,
; then save the previous jog mode (fast/slow) and force slow mode.
IF (MechanicalProbe && ProbeDetect) && !SV_PROGRAM_RUNNING && !JogModeSaved_M
  THEN (SaveJogModePD),
       SET JogModeSaved_M
IF SaveJogModePD && FastSlowLED THEN SET LastProbeMode_M
IF SaveJogModePD && !FastSlowLED THEN RST LastProbeMode_M
IF (MechanicalProbe && ProbeDetect) && !SV_PROGRAM_RUNNING THEN SET FastSlowLED

; Once the probe clears, restore the saved mode and reset
IF !(MechanicalProbe && ProbeDetect) && JogModeSaved_M && !LastProbeMode_M
  THEN RST FastSlowLED

IF !(MechanicalProbe && ProbeDetect) THEN RST JogModeSaved_M,
                                          RST JogProbeFault_M,
                                          RST Ax1PlusJogDisabled_M,
                                          RST Ax1MinusJogDisabled_M,
                                          RST Ax2PlusJogDisabled_M,
                                          RST Ax2MinusJogDisabled_M,
                                          RST Ax3MinusJogDisabled_M
If the original code works in 98% of cases, the code above will work in 98.5% of cases.

It will not work if there is no probe detect signal. It does not look at Parameters 11, 18 or 44, so it will not work if the probe trip or probe detect signals are wired to non-standard inputs, or if there is a tool detector that has its own separate input. But it should work in your case.
xr4x4ti
Posts: 52
Joined: Sun Dec 22, 2019 10:03 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Minnesota

Re: Allin1DC Normally Closed Probe

Post by xr4x4ti »

CNCSNW,

Once again, thanks for all of the help. I didn't have much time to work on the mill, but I was excited to try your change to the PLC you listed. I added the and functions as you described and gave it a try.

This fixed the jogging functions with the probe disconnected and I thought I was good to go.
But, the wireless MPG will not work with the probe disconnected :x

To be clear, the wireless pendant works in general, just the rotary MPG does not work until you plug the probe back in.

I am so confused. I can't believe it is this complicated to get a NC probe working.

I will try to answer the rest of your questions and post a report when I get more time tomorrow or later in the week.

Thanks again,
Tim
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Allin1DC Normally Closed Probe

Post by cncsnw »

CNC12 (not the PLC program) limits MPG handwheel jogging to the x1 increment, if it thinks that a probe is tripped.

You could try reversing all the MechanicalProbe references in the PLC program and removing the inversion, then going back to a negative value for Parameter 11. Perhaps CNC12 will check for a probe-detect signal if it sees that the probe is normally-closed.
xr4x4ti
Posts: 52
Joined: Sun Dec 22, 2019 10:03 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Minnesota

Re: Allin1DC Normally Closed Probe

Post by xr4x4ti »

I found a solution to the problem.

Basically I gave up:)

It seems that there is no simple way to make a NC probe work with an Allin1DC. I reached out to Centroid directly and I was told to buy some tech help at $90 an hour.

Looking at the KP-3 probe, it is also a Normally closed probe, but yet they sell a version that works with the Allin1DC. How is that? Well, the version they sell for the Non Acorn products has a little circuit board in the cable connector that inverts the signal! So I purchased the two cables, PN 1121 and 14910(the one with the PCB). I received them yesterday, wired it up, put in a standard PLC and all is good. Everything works as intended!!!
14910.jpg
This should be advertised a bit more, it would have saved me a lot of headaches. The cost with shipping for both cables was $100.

Thanks for all of the help on this Forum, especially CNCSNW, I beyond appreciate it.

Tim
Post Reply