ATC Tool number DRO not updating <answered>

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
zigzagwanderer
Posts: 22
Joined: Sun Aug 11, 2019 2:46 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: A81087B9C645-0703192228
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK

ATC Tool number DRO not updating <answered>

Post by zigzagwanderer »

Hi all
I have finally got my home brew lathe ATC pretty much working now.
It works with an 8 position hirth style coupling and a stack of belleville washers with a pneumatic cylinder to open the hirth coupler, its then set up as a 4th axis and uses a small stepper to rotate to the correct tool position before closing the hirth coupling and locking in position.
I'm using the following macro to do this and it all works fine except the tool DRO does not update,
the current tool offset shows in the DRO but the tool number is always 00 eg: if i command t0303 the ATC will move to tool number 03 and use offset 03 but the tool DRO will show T0003.
Can anyone tell me what i am missing or need to do to get the DRO to update correctly ?

Filename: cnctch.mac
; Description: Axis driven tool change macro for Lathe
; Notes: Turns/rev must be configured 1 = 1 turret position change
; Turret is on 4th axis, positions are in machine position.
; Requires: Machine home must be set prior to use.
;
;#100 = Number turret positions
;#4120 = requested tool
;#20601-#20604 = Counts per unit for axes1-4
;#5021-#5024 is the current machine position for axes 1(#5021) through 4(#5024)
;------------------------------------------------------------------------------

;follow with a block that skips if graphing or searching
IF #50001 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

;If not searching or graphing, check to make sure the turret is not already
;at the requested position. If it is, skip the macro
IF [ABS[#4120-#5024] < .002] THEN GOTO 1000

; Notes: Turns/rev must be configured 1 = 1 turret position change
; Turret is on 4th axis, positions are in machine position.
; Requires: Machine home must be set prior to use.


;#20601-#20604 = Counts per unit for axes1-4
;#5021-#5024 is the current machine position for axes 1(#5021) through 4(#5024)
;#4120 = requested turret position from g code


m62 ; piston open
g04p1.25 ;dwell for piston open
G53 A[#4120]
g04p.25 ;dwell
m82 ; piston close
g04p1.5 ;dwell for piston close


N1000 ;Macro finished
Attachments
report_A81087B9C645-0703192228_2019-10-20_13-05-31.zip
(276.44 KiB) Downloaded 136 times
IMG_1178.JPG
IMG_1179.JPG


zigzagwanderer
Posts: 22
Joined: Sun Aug 11, 2019 2:46 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: A81087B9C645-0703192228
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK

Re: ATC Tool number DRO not updating

Post by zigzagwanderer »

Any one ? Please :) !
I've seen the same question mentioned in at least one other thread but it was never mentioned again !


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

Re: ATC Tool number DRO not updating

Post by cncsnw »

Try changing Parameter 160 from 1 to 0.

As far as I am aware, the "Enhanced ATC" functions only apply to certain mill tool changers, and do not apply to the lathe software nor to lathe turrets. But when used, "Enhanced ATC" changes the source of the displayed tool number.


zigzagwanderer
Posts: 22
Joined: Sun Aug 11, 2019 2:46 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: A81087B9C645-0703192228
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK

Re: ATC Tool number DRO not updating

Post by zigzagwanderer »

cncsnw wrote: Tue Oct 22, 2019 4:20 pm Try changing Parameter 160 from 1 to 0.

As far as I am aware, the "Enhanced ATC" functions only apply to certain mill tool changers, and do not apply to the lathe software nor to lathe turrets. But when used, "Enhanced ATC" changes the source of the displayed tool number.

Hi
Thank you for your input , i have just tried changing parameter 160 from 1 to 0 but it made no difference.
Looking at these 2 you tube videos they both show simple lathe ATC's with an Acorn controller and both seem to have the tool DRO updating correctly so it must be possible.
The 1st one is a Denford ATC and i know this uses Gray scale to read the tool position but the one Marty shows is similar to mine in that it only uses a home sensor to initially reference the tool position on start up but watching the video you can see both tool no's and offsets updating in the tool DRO.

https://www.youtube.com/watch?v=7XxCzerDKGU

https://www.youtube.com/watch?v=9zZnF__ZVx8


Allin1Chris
PLC Expert
Posts: 233
Joined: Wed Jul 31, 2019 12:53 pm
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

Re: ATC Tool number DRO not updating

Post by Allin1Chris »

The Axis Driven turrets are done by macro, however the software requires plc logic to display the "Tool: t0101". I did a short test quickly u can at the end of the macro write to the parameter of the tool you requested, and then you can edit the PLC to read from that parameter.

This is what i did for example at the end of your macro,
{Code in your cnctch file
G10 P1890 R#4120 ; Set parameter 890 to current tool position
}
Then in the PLC you will want a line to set the system variable to the parameter value (i put this under the LoadParameterStage)
{Code in your plc.src file
IF True THEN SV_PLC_CAROUSEL_POSITION = SV_MACHINE_PARAMETER_890 ; This tells the software that parameter 890 is the current tool position
}

Marty's video was using our Time based version of the ATC PLC. In this PLC parameter 976 was used to tell the software what tool was requested.

If you want to learn more about PLC the following Manual provided by Centroid and Youtube videos should help
https://www.centroidcnc.com/centroid_di ... manual.pdf
https://www.youtube.com/playlist?list=P ... i2WKIedQlQ
When requesting support READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043

Please ALWAYS post a FRESH report. To make a report: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

(We pride ourselves on providing timely solid technical support but, without good information we may not be able to help and/or reply until such information is posted.)

Centroid PLC Tutorial Videos


zigzagwanderer
Posts: 22
Joined: Sun Aug 11, 2019 2:46 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: A81087B9C645-0703192228
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK

Re: ATC Tool number DRO not updating

Post by zigzagwanderer »

Allin1Chris wrote: Wed Oct 23, 2019 3:12 pm The Axis Driven turrets are done by macro, however the software requires plc logic to display the "Tool: t0101". I did a short test quickly u can at the end of the macro write to the parameter of the tool you requested, and then you can edit the PLC to read from that parameter.

This is what i did for example at the end of your macro,
{Code in your cnctch file
G10 P1890 R#4120 ; Set parameter 890 to current tool position
}
Then in the PLC you will want a line to set the system variable to the parameter value (i put this under the LoadParameterStage)
{Code in your plc.src file
IF True THEN SV_PLC_CAROUSEL_POSITION = SV_MACHINE_PARAMETER_890 ; This tells the software that parameter 890 is the current tool position
}

Marty's video was using our Time based version of the ATC PLC. In this PLC parameter 976 was used to tell the software what tool was requested.

If you want to learn more about PLC the following Manual provided by Centroid and Youtube videos should help
https://www.centroidcnc.com/centroid_di ... manual.pdf
https://www.youtube.com/playlist?list=P ... i2WKIedQlQ

Hi Chris
Thank you for your help and clear instructions.
I must admit that i am somewhat out of my depth here but i have done as you suggested and added " G10 P1890 R#4120 ; Set parameter 890 to current tool position " to the end of my cnctch macro file

I then added the "IF True THEN SV_PLC_CAROUSEL_POSITION = SV_MACHINE_PARAMETER_890 ; This tells the software that parameter 890 is the current tool position" statement as the last line in the " loadparameterstage " of the plc.src file

Unfortunately it still does not show the current tool on the tool DRO.
I have attached a fresh report with the above changes , would you mind taking a quick look to check i have done it correctly ?
Attachments
report_A81087B9C645-0703192228_2019-10-25_19-49-12.zip
(299.4 KiB) Downloaded 130 times


Allin1Chris
PLC Expert
Posts: 233
Joined: Wed Jul 31, 2019 12:53 pm
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

Re: ATC Tool number DRO not updating <answered>

Post by Allin1Chris »

When you make changes to the PLC, you must recompile the PLC for the changes to take effect in the software. The manual and Videos go over how to compile the PLC, but i'll give you a brief course on it.

You will need to open the windows command prompt, on a windows pc if you go to the bottom left of your desktop and type in the search box "Command" you should see "Command Prompt" appear, click it. A black box will appear on your desktop.

First you will need to navigate to your C:\cnct directory, u can do this by typing "cd \cnct" without quotations.
The text on the left side should say "C:\cnct>" If theres more, u can type "cd \" to back all the way out to c directory then type "cd \cnct"

Once in the directory, you can compile easily by typing in the following "mpucomp.exe acorn_lathe_plc.src mpu.plc". Then hit enter, u should see a few new lines pop up with a "Compilation successful" if not the compiler is pretty good at telling you what is wrong, and you will need to go back to the plc to fix it. (i checked your

After you have recompiled the plc, restart your acorn and software if you still have it open.

However, i have also compiled the plc for you from your report, if you cant get the above to work out yourself, you can simply open up the zip i have attached, and put the files in the cnct directory. Overwrite the files.

I should also mention that if you open up the wizard and make I/O changes or any changes that require the Wizard to recompile the PLC, your changes will be overwritten by the wizard.

Hope that helps.
Attachments
ZigZagWanderer.zip
(122.55 KiB) Downloaded 144 times
When requesting support READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043

Please ALWAYS post a FRESH report. To make a report: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

(We pride ourselves on providing timely solid technical support but, without good information we may not be able to help and/or reply until such information is posted.)

Centroid PLC Tutorial Videos


zigzagwanderer
Posts: 22
Joined: Sun Aug 11, 2019 2:46 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: A81087B9C645-0703192228
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK

Re: ATC Tool number DRO not updating <answered>

Post by zigzagwanderer »

Wow that was a fast reply , i've just left the workshop to get some food in me.
But i'll get back to it ASAP and report back.
Many thanks for your time


zigzagwanderer
Posts: 22
Joined: Sun Aug 11, 2019 2:46 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: A81087B9C645-0703192228
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK

Re: ATC Tool number DRO not updating <answered>

Post by zigzagwanderer »

Chris ! Success !

I have to confess i took the easy option and used your compiled PLC attachment ,
but with this the tool DRO now works and shows current tool and offset numbers correctly so i'm very happy.
I will have a play over the weekend and try "compiling" so when i end up overwriting the PLC from the wizard i am able to modify the overwritten files again.
thanks again for your help


Post Reply