VCP Lathe Collet open close

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

Moderator: cnckeith

lavrgs
Posts: 666
Joined: Sat Aug 11, 2018 11:22 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: Yes
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Oregon

VCP Lathe Collet open close

Post by lavrgs »

I am trying to change the VCP to include a collet open/close function. I have the image at R4C4 but I am not sure about the Skin event and Number. I tried event 19 and output 1075
Do I need to change the name in the PLC?
SkinAux11_M_SV IS SV_SKIN_EVENT_19 ; Row 4 Column 4
Attachments
report_0008DC111213-0821233001_2025-01-06_09-12-25.zip
(7.75 MiB) Downloaded 6 times


cncsnw
Community Expert
Posts: 4565
Joined: Wed Mar 24, 2010 5:48 pm

Re: VCP Lathe Collet open close

Post by cncsnw »

It looks like someone already tried to add collet open/close control in your PLC program, using Aux8 and Aux9. See lines ca. 3010-3050.

Unfortunately, they apparently did not finish the job or test it.

Do you want to remove the incomplete Aux8/Aux9 code, and replace it with code that uses Aux11 as an open/close toggle?


lavrgs
Posts: 666
Joined: Sat Aug 11, 2018 11:22 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: Yes
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Oregon

Re: VCP Lathe Collet open close

Post by lavrgs »

Aux 8 and 9 would work. That way I can back out of the changes I made easily EDIT I WOULD PREFER TO TOGGLE


lavrgs
Posts: 666
Joined: Sat Aug 11, 2018 11:22 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: Yes
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Oregon

Re: VCP Lathe Collet open close

Post by lavrgs »

Since the PLC is not finished being set up for collet open - Close can someone at Centroid add the required code? One of my next areas that I will work on the lathe is the cutoff slide. Can the PLC be checked for appropriate code for that?
Attachments
k104766.src
(152.36 KiB) Downloaded 4 times


lavrgs
Posts: 666
Joined: Sat Aug 11, 2018 11:22 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: Yes
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Oregon

Re: VCP Lathe Collet open close

Post by lavrgs »

I am trying to get a better understanding of PLC functions in regards to getting a button on the VCP to open/close my collet. I am able to open and close with M10 M11 and the Aux8 and Aux9 buttons LED change accordingly but those buttons do not activate anything. My source file is listed above.

I have reviewed other source files that seem to have a different scheme in regards to this issue;they seem to use skinevents extensively and the Collet sections seem much simpler. That code was used by an Acorn vs my ALLIN1DC are they compatible?
Attachments
UVE_acorn_lathe_plc.src
(358.53 KiB) Downloaded 3 times


lavrgs
Posts: 666
Joined: Sat Aug 11, 2018 11:22 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: Yes
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Oregon

Re: VCP Lathe Collet open close

Post by lavrgs »

After reviewing the source file I'm thinking Aux8key_I could replace DoAux8Key to trigger (Aux8PC) in line 3018. I am completely new to PLC (mis) management but am starting to understand the basic logic, its the safety checking structure that will probably bite me.
EDIT - Is there some kind of simulator that would provide testing. I'm going to be away from the machine for a few days and would like to modify the source code and test...


cncsnw
Community Expert
Posts: 4565
Joined: Wed Mar 24, 2010 5:48 pm

Re: VCP Lathe Collet open close

Post by cncsnw »

In general, you probably cannot run an entire Acorn PLC program on an Allin1DC system.

If you wanted to copy and paste the dozen or so lines that implement one particular feature, that would generally work.

You do have to watch for varying naming conventions. Some PLC sources put "_I" or "_O" at the end of every token that names an input or output, and others do not.

You also have to watch for varying usage of the M function macro requests (M94/n and M95/n in the CNC macros, which need to match the SV_M94_M95_n definition in the PLC source).

No, there is not an offline PLC simulator or emulator.

Regarding the collet open/close code:
INP1070 Aux8Key_I (or Aux8Key) refers to the hardware button on the Centroid jog panel (pn11077).
MEM?? KbAux8Key_M refers to the Ctrl-F8 combination on the PC keyboard
SV_SKIN_EVENT_14 SkinAux8_M_SV or SkinAux8_M refers to the Aux8 key on the virtual control panel (VCP)
SV_PLC_FUNCTION_31 DoAux8Key is a bit set by the PLC program, in response to Aux8 and equivalent keypresses, which is primarily intended to activate whatever CNC12 function you have assigned using Machine Parameter 195. But, if the PLC programmer knows that bit has been set by any and every event that is equivalent to Aux8, then it can be tested as if it were a button-press indicator.

The problem with your original factory-supplied "Hardinge" PLC program is that the programmer changed the collet open/close logic to refer to "DoAux8Key" and "DoAux9Key" -- presumably hoping to make it respond equally to the hardware jog panel, the PC keyboard equivalent, and the VCP -- but overlooked that the code to set DoAux8Key and DoAux9Key had been deleted from the jog panel section (presumably because a previous programmer wanted to ensure that functions assigned with Parameters 195 and 196 did not get called whenever the operator opened or closed the collet).

If you replace DoAux8Key_SV with Aux8Key_I, then the collet-open function would work, but only with a hardware jog panel. Since you do not have such a jog panel on your machine, that would not help.

You could use SkinAux8_M_SV instead: then it would work only with the VCP key.

Or you could restore the missing code to set SkinAux8_M_SV, in the vicinity of line 2172, following the pattern of surrounding lines. Just be sure to keep Parameters 195 and 196 set to zero.


lavrgs
Posts: 666
Joined: Sat Aug 11, 2018 11:22 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: Yes
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Oregon

Re: VCP Lathe Collet open close

Post by lavrgs »

I was able to modify the PLC to allow Aux8 and Aux9 to open/close the collet. Getting the same action for Macro1 and Macro 2 on the WMPG did not work. I changed the file MPGmacro1.mac to include the same commands as mfuct10.mac, which opens the collet via the VCP, - somehow it decided it was CYCLE START.
This is the code I used for MPGmacro1.mac
; File: mfunc10.mac
; Author: Scott Pratt
; Date: 5 May 2011
; Desc: M10 Collet Close: ColletCloseSol(OUT19) ON
; Note ColletCloseSol is prevented from changing state while spindle is on
M95/6 ; Turn off M11 = ColletOpenSol(OUT20) OFF ColletCloseSol(OUT19) OFF
M94/4 ; Turn on M10 = ColletCloseSol(OUT19) ON

I read Uwe post about his adventures with MIST etc but I was hoping for an easier solution


lavrgs
Posts: 666
Joined: Sat Aug 11, 2018 11:22 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: Yes
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Oregon

Re: VCP Lathe Collet open close

Post by lavrgs »

Copied the code from mfunc10.mac (collet open) into MPGmacro1 again and it still performs a "cycle start" 8-)
M95/6 ; Turn off M11 = ColletOpenSol(OUT20) OFF ColletCloseSol(OUT19) OFF
M94/4 ; Turn on M10 = ColletCloseSol(OUT19) ON


This PLC mod is what I'm thinking should work for OPEN COLLET
IF ((Aux8PD_PD && !SV_PROGRAM_RUNNING) || (M11_SV && SV_PROGRAM_RUNNING)||(MPGmacro1_M && !SV_PROGRAM_RUNNING)) && !SpindleEnableOut_O
THEN SET ColletOpenSol_O, RST ColletCloseSol_O, SET ColletOpenClosedTimer_T, SET OpeningCollet_M

My question is what code needs to be in MPGmacro1.mac


cncsnw
Community Expert
Posts: 4565
Joined: Wed Mar 24, 2010 5:48 pm

Re: VCP Lathe Collet open close

Post by cncsnw »

If you modify your PLC program to test "MPGMacro1_M" in the same place it tests the Aux8 key, then you do not need a "MPGMacro1.mac" file. Just delete the entire MPGMacro1.mac file and let the PLC program do the job.

Your example code above should work fine, but would be a little more concise as:

Code: Select all

IF (((Aux8PD_PD || MPGmacro1_M) && !SV_PROGRAM_RUNNING) || (M11_SV && SV_PROGRAM_RUNNING)) && !SpindleEnableOut_O
  THEN SET ColletOpenSol_O, RST ColletCloseSol_O, SET ColletOpenClosedTimer_T, SET OpeningCollet_M
plus, of course, equivalent code for Aux9, MPGMacro2_M, M10_SV and ColletCloseSol.
... and delete the MPGMacro2.mac file.


Post Reply