Acorn ATC Interface

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

RayL
Posts: 45
Joined: Wed Jan 03, 2018 9:41 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Acorn ATC Interface

Post by RayL »

The "service manual" is referenced in the "centroid_G_and_M_codes" manual, in the sections on M94/95 and M107. I've seen it in at least one other document as well.

This is starting to make sense, but I'm still not clear on exactly what M107 does. The document says it outputs the tool number, but there is NO explanation of exactly WHAT signals it outputs it on.

The M17 documentation states: "The M17 macro is allocated for use with Intercon and the setting in Parameter 162. See Parameter 162 in
Chapter 14 for more information." But, there is NO Chapter 14 in the document!

What is "Intercon"?

Where are the numbered "parameters" defined? They are referenced numerous times in the G/M code manual, but I've seen no table or list explaining what each parameter is used for.

For example, in your sample macro:

IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching
IF #4120 == #90014 THEN GOTO 1000 ;Skip macro if already at position

Those lines of code are trivial, except I have no clue what #50010, #4201 and #4120 actually control.

BTW - It would be awfully nice to have links to ALL the available Acorn documents on the Acorn page. They seem to be scattered around at different places on the web site.

Regards,
Ray L.
Regaards,
Ray L.
cnckeith
Posts: 7264
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Acorn ATC Interface

Post by cnckeith »

links to all acorn resources are on the acorn page about 1/2 way down.
acorn links.JPG

Intercon: http://www.centroidcnc.com/conversational.html


i don't know what you are referring to when you say M17 document.


in chapter 11 page 13 M107 example is given.
m107.JPG
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
diycncscott

Re: Acorn ATC Interface

Post by diycncscott »

Ray,

There is NO limit whatsoever to the number of positions the Acorn can support for an ATC. The only limitation is the # of I/O available but, if you use and incremental type sensor for tool counting, you're looking at 32bits (billions of tools).

For your app you would create a custom mfunc6.mac as keith posted that uses an input to wait for an acknowledge from your ATC that it has completed a tool change. The PLC would contain logic that takes the tool number from the software, turns on outputs that represent the BCD or binary value of the requested tool and then turn on an output that represents a tool change request to your plc. When an M107 is issued in the m6 (tool change macro) the tool number is sent down to the PLC via a system variable - SV_TOOL_NUMBER. The PLC reports position back to the software for display on the screen via another system variable - SV_PLC_CAROUSEL_POSITION.

Your PLC code might look something like:

;If tool change is requested (m94/6 in m6 macro), get requested tool number
IF M6 THEN RequestedTurretPosition_W = SV_TOOL_NUMBER

;Assuming Outputs 1-4 are interpreted by your ATC a binary representation
;of the requested turret position with Output 1 being the least significant bit
;use WTB (word to bit) to send RequestedTurretPosition_W to outputs.
;The 4 at the end is the number of bits (outputs) we want to set RequestedPositionOut1-RequestedPositionOut4

IF M6 THEN WTB RequestedTurretPosition_W RequestedPositionOut1 4

;We'll assume out5(ToolChangeRequest) is used to represent the tool change request to your ATC to start the tool change
;This is only set if the current position != requested position
IF M6 && (RequestedTurretPosition_W != CurrentTurretPosition_W) THEN SET ToolChangeRequest

;Reset tool change request if complete or fault
IF !M6 || SV_STOP THEN RST ToolChangeRequest

;Send new turret position back to software when tool change is complete
;ToolChangeComplete is an input wired that your ATC sets to indicate when
;the tool change is complete.
IF ToolChangeComplete THEN SV_PLC_CAROUSEL_POSITION = RequestedTurretPosition_W

...etc..
Using a 3rd party PLC to move the tool turret is not a very efficient use of I/O because of the number of I/O needed to send the tool number.
Instead I'd recommend letting the Acorn handle the tool turret rotation and tool position reporting using an incremental sensor. ToolCounterInput
is an Acorn input and RotateToolTurret is an Acorn output.

...
;Rotate turret
IF M6 && (RequestedTurretPosition_W != CurrentTurretPosition_W) THEN SET RotateToolTurret

;Update turret position every time the ToolCounterInput fires
;Use 1 shot so tool counter only increments once when input is turned on
IF ToolCounterInput THEN ToolCounter(PD)
IF RotateToolTurret && ToolCounter(PD) THEN CurrentTurretPosition_W = CurrentTurretPosition_W+1

;Handle rollover - set parameter 161 to max # tool positions in turret
IF CurrentTurretPosition_W > SV_MACHINE_PARAMETER_161 THEN CurrentTurretPosition_W

;Report position to software
IF True THEN SV_PLC_CAROUSEL_POSITION = CurrentTurretPosition_W

;Note control stores the last known location of tool turret on shutdown so you can use SV_ATC_CAROUSEL_POSITION to initialize the turret
;position on power up.

Turret positioning and live position reporting handled with 1 output and 1 input... If you wanted to use a 3rd party PLC to expand your I/O
you could but you might consider using it for other tool change I/O like carousel in/out/up/down, spindle orient, pot up/down, turret homing etc.. etc...
I will be posting a more general outline of various tool change schemes later today.
RayL
Posts: 45
Joined: Wed Jan 03, 2018 9:41 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Acorn ATC Interface

Post by RayL »

Keith,
i don't know what you are referring to when you say M17 document.
I said "M17 documentation", in the G/M-code manual:
M17 – Prepare for Tool Change (Macro)
M17 has no default action, therefore a custom M17 macro must be defined for this feature to work. If defined, the
M17 macro turns off spindle and coolant and starts the spindle orientation process in preparation for M6 (Tool
Change). The M17 macro is allocated for use with Intercon and the setting in Parameter 162. See Parameter 162 in
Chapter 14 for more information.
There ain't no "Chapter 14" in that document.
Example:
M107 ; send request for tool to change
M94/16
WHERE does it "send the request for tool to change"?? What pins? How many pins? In what format? For someone, like me, new to this controller, some of this documentation uses a lot of words, but conveys virtually no useful information. If M107 were a macro (and I don't understand why it's not!), I could understand easily how I could make it do whatever I want using M94/M95 and, I assume, the tool number coming from some as-yet-unknown (to me) parameter (and assuming there is something in the macro language allowing extracting single bits from a multi-bit value). But it appears the M107 functionality is fixed, and nowhere is that functionality actually described in any detail whatosever. Does it output 8 bits to the PLC outputs? Which bit is MSB, which is LSB?

Another question: I have an existing interface on the ATC that uses only 3 I/Os. It can be thought of as a low-speed, bit-banged equivalent of an I2C or SPI interface. Does the macro/PLC capability allow effectively bit-banging with timing resolution in the milliseconds (or even tens of milliseconds) range? If so, I could likely use that interface as-is.

The answer to the above question would address the next set of questions I have regarding the ability to connect a custom pendant to the Acorn. My current controller is a Dynomotion KFlop, running a CNC controller app I wrote myself, and I also have a custom pendant containing an MPG (for moving the axes) and several switches that communicates with the KFlop over an RS232 connection, by sending short messages from the pendant to the KFlop. This pendant is my primary means of controlling the machine. In fact, about the only thing I do using the GUI is loading the G-code file, and setting up the tool table. Everything else having to do with actually setting up and running the machine can be controlled from the pendant without ever touching the mouse or keyboard. If the above bit-banged interface could be used for the ATC, I would think a similar interface could be implemented for the pendant on the Acorn.

Regards,
Ray L.
Regaards,
Ray L.
RayL
Posts: 45
Joined: Wed Jan 03, 2018 9:41 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Acorn ATC Interface

Post by RayL »

Scott,
There is NO limit whatsoever to the number of positions the Acorn can support for an ATC. The only limitation is the # of I/O available but, if you use and incremental type sensor for tool counting, you're looking at 32bits (billions of tools).
That is good news.
When an M107 is issued in the m6 (tool change macro) the tool number is sent down to the PLC via a system variable - SV_TOOL_NUMBER.
Ok, so if I understand correctly, when the M107 is executed, it does nothing more than send the number of the requested tool to the PLC. When the M6 is executed, and the ATC is enabled, a user-provided PLC program is run that can fetch the tool number, and output it to the PLC outputs in any manner the user chooses? Your code sample seems pretty clear to me. I must admit to having no experience with PLCs, so I'll need to read up on how they work. But, if my statement above is more-or-less correct, then I can finally see how this all works.

This is starting to make sense....

Regards,
Ray L.
Regaards,
Ray L.
diycncscott

Re: Acorn ATC Interface

Post by diycncscott »

Yes, the M107 simply sends the tool number to the PLC where it can be read from SV_TOOL_NUMBER.

The macro itself doesn't implicitly tell the PLC to do anything (and neither does the M107). You must explicitly set a bit in the macro
to tell the PLC you want to do a tool change. my example uses M94/6 to set SV_M94_M95_6. In the PLC, SV_M94_M95_6 is defined as
M6 IS SV_M94_M95_6

so that PLC logic can be used such as IF M6 THEN ....whatever you need it to do. Hope that clears it up a little.
RayL
Posts: 45
Joined: Wed Jan 03, 2018 9:41 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Acorn ATC Interface

Post by RayL »

Scott,

Yes, that mostly makes sense (and will make more sense once I read up on how the PLC works). Where would I find documentation on the PLC functionality and programming?

Thank you both for your help. It am starting to understand how this can be done.

Regards,
Ray L.
Regaards,
Ray L.
RayL
Posts: 45
Joined: Wed Jan 03, 2018 9:41 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Acorn ATC Interface

Post by RayL »

Would I be correct in thinking that the encoder input could be connected to an MPG, and used to control axis movement, under direction from a PLC program? If so, then that, plus keyboard emulation, should give me the pendant functionality I want.

Regards,
Ray L.
Regaards,
Ray L.
cnckeith
Posts: 7264
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Acorn ATC Interface

Post by cnckeith »

RayL wrote: Thu Jan 04, 2018 1:38 pm Would I be correct in thinking that the encoder input could be connected to an MPG, and used to control axis movement, under direction from a PLC program? If so, then that, plus keyboard emulation, should give me the pendant functionality I want.

Regards,
Ray L.
<< i posted links to the PLC programming manual and the PLC detective manual. near top of this thread>>
plc programming manual.JPG
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cnckeith
Posts: 7264
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Acorn ATC Interface

Post by cnckeith »

RayL wrote: Thu Jan 04, 2018 12:18 pm Keith,
i don't know what you are referring to when you say M17 document.
I said "M17 documentation", in the G/M-code manual:
M17 – Prepare for Tool Change (Macro)
M17 has no default action, therefore a custom M17 macro must be defined for this feature to work. If defined, the
M17 macro turns off spindle and coolant and starts the spindle orientation process in preparation for M6 (Tool
Change). The M17 macro is allocated for use with Intercon and the setting in Parameter 162. See Parameter 162 in
Chapter 14 for more information.
There ain't no "Chapter 14" in that document.
Example:
M107 ; send request for tool to change
M94/16

Regards,
Ray L.
<< i still don't know what you are looking at. here is the manual i am looking at. It has 15 chapters. the link to this manual is on the Acorn web page as pointed out earlier in this thread.
http://www.centroidcnc.com/downloads/ce ... manual.pdf
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
Post Reply