PDA

View Full Version : Centroid Acorn Controller - Has anyone tried one?



DY10CNC
13-11-2017, 07:30 PM
I have a Bridgeport Series 1 milling machine, which I am in the process of converting to CNC - I'm looking to a 4 axis setup.
For the moment I am using 1600oz inch steppers, eventually I'll change to something like Technic Clearpath, with shaft encoders.
I have some experience with Anilam, Fanuc and XYZ Prototrak controls so I have some ideas about what I want from a controller.

My PC of choice is a Dell Optiplex 755 with parallel port, ethernet and USB ports.
I have tried a few controllers with varying degrees of success...

First Controller - Mach3 using a Chinese parallel port BOB.

Not great with my setup - not accurate losing steps etc, despite hours of research and motor tuning.
Deciding it was probably the BOB/parallel port, I gave up

Second Controller "Masso"

This worked well but did not support the full range of codes - no G40/G41/G42 looks at present to be more suited to router applications the milling. Excellent support from the company, but decided it's not for me.

Third Arduino with GRBL 1.1 and the latest UGS software.

It works really well, supports most Codes (does not like tool change T1M6, throws up an error message), but positions accurately and motor tuning is a breeze. For me this is the best so far.

However I'd like to use a controller which supports 4 axis, has a professional looking interface, and doesn't cost the earth.
I came across the Centroid Acorn Controller at under $300.
The software has the same look and it seems, most of the functionality of Centroid's industrial controllers.

I have one on order, but would be grateful for input from anyone who has experience of the unit.

There is no dealer selling the in the UK, but I am in touch with a Centroid agent in France who can supply at a sensible price.
Thank you!

Here's a link to Centroid.com for anyone who is interested.
http://www.centroidcnc.com

magicniner
14-11-2017, 12:47 PM
You need the "Pro" software at an extra $99 for 4 axis G Code moves ;-)

Nice

DY10CNC
14-11-2017, 03:41 PM
I understand that the "free" software does 3 axis simultaneously eg X,Y & Z or X,Y & A.

Have you actually tried the Acorn board? (which was the question posed in the original post)

m_c
14-11-2017, 04:08 PM
The acorn was discussed recently, and the general consensus was there were better options for less money.

My main concern with it was the limited IO, with no option to expand. 8 inputs don't go very far on anything other than a basic machine.

magicniner
14-11-2017, 06:02 PM
(which was the question posed in the original post)

As was "4-axis" and "Under $300", and any 3 from 4 simply isn't 4-Axis.
I added the information to save others from thinking the price had dropped for the 4-axis functionality :D

magicniner
14-11-2017, 06:06 PM
First Controller - Mach3 using a Chinese parallel port BOB.



Unless you just bought the cheapest BOB, PSU, Drivers etc. with no research then there's no reason you couldn't have got that working, thousands of people have?

DY10CNC
15-11-2017, 09:29 AM
Thank you for your comments.
As I said in my original post, I did use the cheapest BOB, which as I also said, was probably the problem.
As to the rest of the components, they are working fine with an Arduino and GRBL, which suggests that the problem was with the parallel port and Bob combination. It was not my intention to denigrate Mach 3 or any of it many successful users.
Hopefully we can return to my original question - Has any member of this forum an actual experience of the Centroid Acorn Controller?

magicniner
15-11-2017, 12:43 PM
Has any member of this forum an actual experience of the Centroid Acorn Controller?

As Stated above this has been discussed before and no one had used one or wanted to

magicniner
15-11-2017, 12:51 PM
Have you tried joining their community support forum?

http://centroidcncforum.com/viewforum.php?f=20

Like the Mach3 Forum and BobCAD-CAM forum on CNC zone it should be a very good place to see both successes and shortcomings with the product,
Regards,
Nick

DY10CNC
15-11-2017, 01:07 PM
Yes I joined the Centroid forum, and as you say it is a good place to see how the product performs.

My reason for posting on MYCNCUK, was to solicit unbiased views on what is a relatively new product.

I take delivery of the Acorn controller on Thursday so thats probably "end of story" for my post.

Thanks for all of your posts.

battwell
22-01-2018, 12:46 PM
whats the verdict on the acorn?

JAZZCNC
22-01-2018, 06:31 PM
whats the verdict on the acorn?

Ye, I've got one and For Mill Retrofit it's spot on but for DIY Router then it's missing few things like Independent Homing for slaved axis etc but those are in Beta and hopefully out in next software release.
The software is rock solid as it's exactly same as used on High-end systems and hardware is nice neat well made with a decent amount of I/O. Also Got spindle encoder input so can do Ridged tapping which is nice to have.

One small drawback for me is the fact it only works on Win10 and needs decent PC with plenty power. Suppose that's price progress.!!

Clive S
22-01-2018, 06:39 PM
One small drawback for me is the fact it only works on Win10 and needs decent PC with plenty power. Suppose that's price progress.!!

I was trying to download the software today and it seemed to indicate win version 7,8 10 but they recommended 10. I failed because it says you need the board. It would be nice to see the front end.

Edit looks like I was wrong. From the forum:-
CNC 11 is supported under Windows 7, 8, and 10.
CNC 12 is only supported under Windows 10.
If you are building a new PC, it is highly recommended to use Windows 10 so it is future proof.

KoenigCNC
22-01-2018, 06:42 PM
Centroid Acorn

I have one that i am currently installing on a CNC plasma Cutter. So far it look good it supports most g codes and looks like it might be a great alternative to Mach 3. I have used both Mach 3 and Linux based CNC controls with mixed results. Mach 3 is very old technology and so far the amount time required to get a Linux, or Kflop control to work is just not worth it.

I benched the Acorn getting three motors work in less than 2 hours. I will post some pictures and a link to a running machine n about two weeks.

I also use Siemens for my larger machine build projects. For a home or small shop application the Acorn looks like a great option.

DY10CNC
22-01-2018, 06:50 PM
I now have my Acorn based Bridgeport conversion working, and am pleased with the Acorn board and CNC 12 software (with December 2017 update)
I am still using the free version as I am undecided whether to go for Pro Version at $139 or the Digitising package at $399.
There doesn't appear to be a CNC12 manual, but I'm using the generic Centroid manual downloaded from the website and it looks to be pretty compatible with CNC12.
I am using a refurbed Dell Optiplex 755 with Windows 10, (Amazon or ebay) which has a CPU which falls a bit short of the recommended single thread performance stated by Centroid but it works ok.
CNC 12 has a nice front end - looks professional - can't wait to find a sensible priced touch screen.


Ye, I've got one and For Mill Retrofit it's spot on but for DIY Router then it's missing few things like Independent Homing for slaved axis etc but those are in Beta and hopefully out in next software release.
The software is rock solid as it's exactly same as used on High-end systems and hardware is nice neat well made with a decent amount of I/O. Also Got spindle encoder input so can do Ridged tapping which is nice to have.

One small drawback for me is the fact it only works on Win10 and needs decent PC with plenty power. Suppose that's price progress.!!

JAZZCNC
22-01-2018, 08:08 PM
CNC 12 has a nice front end - looks professional - can't wait to find a sensible priced touch screen.

Here you go just got one and very nice. NO stand thou.!!
https://www.ebay.co.uk/itm/NEW-Viewsonic-TD2220-22-Touch-Screen-Monitor-No-Stand-just-monitor-cables-etc/122920967294?_trkparms=aid%3D222007%26algo%3DSIM.M BE%26ao%3D1%26asc%3D49895%26meid%3D044620f569454d3 487fb582a5fe0765c%26pid%3D100011%26rk%3D2%26rkt%3D 11%26sd%3D122915319632&_trksid=p2047675.c100011.m1850

battwell
22-01-2018, 08:55 PM
has anyone tried the radius offsets to destruction- by that i mean doing something all the others fail on?
i have a dxf which fails on everything ive tried. mach, linux dynomotion, uccnc ( first tester of its g41/42)
its a very simple fail- where the tool comes to a segment smaller than its tool radius (which can happen in any .dxf really)

im running uccnc for all my routers- as i havnt found anything so far that comes close in respect of its motion planner for cv (for fast machines)- its giving me perfect parts every time while keeping up the pace etc.

anyway- il send anyone that has acorn the .dxf to try- its very simple and easy to run.

il probably stay with uccnc for the routers and plasma, but the lathe package is where i think it will be way ahead... lots of features not yet implemented into uccnc.

battwell
22-01-2018, 09:07 PM
[QUOTE=

One small drawback for me is the fact it only works on Win10 and needs decent PC with plenty power. Suppose that's price progress.!![/QUOTE]

i hate anything after windows 7- i only upgraded to 7 last year reluctantly! but i do have some high spec machines i could put it on.
just got a denford fanuc atc in to retrofit for myself. could maybe try one on there. i have someone that wants to buy the fanuc stuff out of it so il be putting mitsubishi servos etc in instead.

by the way- re macros for acorn- what language are they in? can unlimited be created and stored? does it have the equivalent of a macro loop etc? (these are must haves for me to have full control over what i need to do.

m_c
22-01-2018, 09:43 PM
ATCs is where the Acorn board may struggle for IO.

Taking a Triac ATC, it needs 5 inputs (Carousel In, Out, Up, Down, and index sensor) and 5 outputs (Carousel CW, CCW, In, Down, and drawbar) for the ATC alone.

That only leaves 3 and 3.
Input wise, allow one for E-stop/limits (combined on Triac's), one drive fault, one for a probe, and you're out of inputs.
Where do you connect the homing switches/sensors?

Output wise, spindle CW, CCW, coolant, and you're out of outputs.
I'm assuming the drive enables are a separate output on the step/dir headers, if not you're definitely short on outputs.

I will say the software does look good, and it could be the best software in the world, but if you can't get enough inputs and outputs, it's useless.

battwell
22-01-2018, 10:11 PM
hmmm- that could be a sticking point then. wonder if their add on boards work?- but then its becoming an expensive system.
some of my machines ive converted have over 110 i/o in use . thats always been the crunch to what controller can be used .
does it suport modbus? if so i have arduino megas running here for extra i/o (ive had 6 running 300 i/o no problem with uccnc and mach3)

m_c
22-01-2018, 10:20 PM
From what I've read, the Acorn does not allow for any expansion, which is how they've limited it's usability.

To get IO expansion, you've got to buy one of their other controllers, which the next cheapest one is the Oak, at just a shade under $1600, but looking at the overview/comparison table I'm not sure if it's step/dir capable, or some combination of step/dir and analogue.

battwell
22-01-2018, 10:42 PM
yup- saw the oak- but thats way too expensive for a hobby control in my opinion. even the oak- the expansion cards cost loads !

JAZZCNC
22-01-2018, 11:15 PM
I will say the software does look good, and it could be the best software in the world, but if you can't get enough inputs and outputs, it's useless.

Always ways around this stuff and 140 buys you PLC with 32 I/O for the simple in/out/up/down/spin etc stuff.

Just like many other boards which come with restricted I/O then it starts costing you for more with expansion cards so not much difference really.
Main and BIG Difference is the software is Rock Solid and is supported by people who know what there doing.

http://www.audon.co.uk/cubloc_plc/MSB764T.html

Ger21
22-01-2018, 11:31 PM
I've heard very good things about the acorn, and if you can live with the limited I/O, and 4 axis, it may be the best hobby level control there is. Especially for lathe users.
It just doesn't have enough customization features for my needs.

battwell
22-01-2018, 11:49 PM
Ha- no money if you can't sell a screen set :-)
I may try one on the lathe
Maybe il wait until a few more are running well in the uk

JAZZCNC
23-01-2018, 12:02 AM
It just doesn't have enough customization features for my needs.

Visually not so much but don't judge a book by it's cover.!! The built-in PLC is a very powerful tool and along with macros can pretty much make it do whatever you want.!... Provided you speak the Lingo.!!

Must admit thou shame about only 4 axis. I/O can be got around but not # axis.!!

Chaz
17-02-2018, 08:08 PM
So I bought one of these and have replaced this Pokeys on my CNC lathe. Happy this far, anyone know how to do code up an ATC 'macro' for Centroid?

JAZZCNC
17-02-2018, 10:43 PM
So I bought one of these and have replaced this Pokeys on my CNC lathe. Happy this far, anyone know how to do code up an ATC 'macro' for Centroid?

What type of atc.?

Check this out.
http://centroidcncforum.com/viewtopic.php?f=60&t=1340&sid=5067344c908dc2a04d52327af32d86da

Chaz
17-02-2018, 10:50 PM
What type of atc.?

Check this out.
http://centroidcncforum.com/viewtopic.php?f=60&t=1340&sid=5067344c908dc2a04d52327af32d86da

Thanks, seen that topic but still a bit stuck. Pity, cant play with the PLC code unless connected to the Board (now in the garage).

The turret is one of these:-

https://www.youtube.com/watch?v=-cCDulVashA

Standard ratchet / pawl setup.

JAZZCNC
18-02-2018, 09:59 AM
Chaz give me some more info on turret ie: Distance to move per tool change.
Do you have this working on Mach3 if so then post M6.macro as it should tell everything needed to write Macro for Acorn.

Chaz
18-02-2018, 10:06 AM
Chaz give me some more info on turret ie: Distance to move per tool change.
Do you have this working on Mach3 if so then post M6.macro as it should tell everything needed to write Macro for Acorn.

Thanks. I did try and email you yesterday however got a bounce from your hemsworthlad email address.

My understanding is that I need some code in cnctch.mac. I then also need to change some parameters to tell Centroid that there is an ATC. Finally, I believe the actual PLC code (not sure / where / how to edit this) contains the actual movement logic or macro. Here is the Mach 3 macro that works with this turret. The logic is fairly straight forward.



If IsLoading() Then
' Do Nothing, program loading
Else

' Dim Variables

Dim Num_Tools As Integer
Dim CW_Steps_Per_Tool As Integer
Dim CCW_Steps As Integer
Dim HoldingDRO As Integer
Dim Requested_Tool As Integer
Dim Current_Tool As Integer
Dim CW_Feed As Integer
Dim CCW_Feed As Integer

Dim moves As Integer
Dim total_move As Integer


' set up some vars

Num_Tools = 8
CW_Move_Per_Tool = 360/Num_Tools
CCW_Move = 10
HoldingDRO = 1050
Requested_Tool = GetSelectedTool()
Current_Tool = GetUserDRO(HoldingDRO)
CW_Feed = 1500
CCW_Feed = 1000
Current_Feed = GetOEMDRO(818)


' start tool change

Message ("Requested Tool No=" & Requested_Tool)

If Requested_Tool > Num_Tools Then
Message "Requested Tool No. too high, program stopped."
Code "M30"
End
End If

If Requested_Tool < 1 Then
'Message "Requested Tool No. too low, program stopped."
Code "M30"
End
End If

If Requested_Tool = Current_Tool Then
' do nothing
Else
' lets do some changing
If Requested_Tool > Current_Tool Then moves = Requested_Tool -Current_Tool
If Requested_Tool < Current_Tool Then moves = Num_Tools - Current_Tool +Requested_Tool

total_move = (moves * CW_Move_Per_Tool)+(CCW_Move/2)

Code "G91 G94" 'incremental & Feed per minute
Code "G0 A" & total_move '& "F" & CW_Feed
Code "G0 A" & "-" & CCW_Move '& "F" & CCW_Feed
While IsMoving()
Wend

SetCurrentTool Requested_Tool
SetUserDRO HoldingDRO, Requested_Tool
Code "G90" ' back to absolute movement
Code "F" & Current_Feed
End If
End If

Chaz
18-02-2018, 10:13 AM
If you watch this video, you can see the cnctch.mac Tool Change Request Macro.

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

Ive paused it and written (copied) the code.

IF #50001 ;Prevent lookahead
IF #4202 || #4201 THEN GOTO 1000
IF #4120 == #90014 THEN GOTO 1000

N100

G10 P1906 R1
G4 P.5
M94 /6
M101 / 70001
M95 /6

N1000

The actual logic of movement is:-

Code "G0 A" & total_move '& "F" & CW_Feed
Code "G0 A" & "-" & CCW_Move '& "F" & CCW_Feed

I assume this is the logic you need to do in the PLC?

Chaz
18-02-2018, 10:20 AM
If you watch one vid, https://www.youtube.com/watch?v=6Qa_SN9n-MY they open an acorn_mill_plc.src file. On the lathe software, there is no such file. I can reinstall and do the Mill bit on this main PC of mine to try it. The other issue is that the board and machine is in the garage, without removing the board and bringing it inside, I cannot 'play' on my main PC in the house.

I also looked to see if we can change the IP address of the board so that I can 'lan' it. At the moment, my garage PC has only 1 NIC which means that whilst its connected to the board, I have no internet access.

Clive S
18-02-2018, 10:53 AM
At the moment, my garage PC has only 1 NIC which means that whilst its connected to the board, I have no internet access.

How about one of these:-

https://www.ebay.co.uk/itm/Wireless-Antenna-USB-WiFi-Dongle-PC-LAN-CompatibleWith-Adapter-802-11n-g-b-MAG/173087415839?hash=item284cd05e1f:g:boYAAOSwuQxaZ1v z

Chaz
18-02-2018, 11:07 AM
How about one of these:-

https://www.ebay.co.uk/itm/Wireless-Antenna-USB-WiFi-Dongle-PC-LAN-CompatibleWith-Adapter-802-11n-g-b-MAG/173087415839?hash=item284cd05e1f:g:boYAAOSwuQxaZ1v z

Thanks, got something like this already, would just prefer to use the wired connection in the garage if possible.

JAZZCNC
18-02-2018, 11:35 AM
If you watch one vid, https://www.youtube.com/watch?v=6Qa_SN9n-MY they open an acorn_mill_plc.src file. On the lathe software, there is no such file.

The PLC source file is created when controller is started so will only show after it's successfully created. When you start controller watch first screen saying initialising MPU and if you get error then source file won't be created.

If get MPU error the go to wizzard and reset by writing settings to controller.

Chaz
18-02-2018, 11:48 AM
The PLC source file is created when controller is started so will only show after it's successfully created. When you start controller watch first screen saying initialising MPU and if you get error then source file won't be created.

If get MPU error the go to wizzard and reset by writing settings to controller.

Thanks, suspected that as Im not on the Lathe PC.

Making some headway but struggling a bit as this is new to me.

Current macro, clearly not finished yet.

Num_Tools IS 8
CW_Move_Per_Tool IS 360/Num_Tools
CCW_Move IS 10
CW_Feed IS 1500
CCW_Feed IS 1000
TOOLCHANGEMSG IS Tool Changing Taking Place

;start tool change

;If Requested_Tool > Current_Tool Then moves = Requested_Tool -Current_Tool

;If Requested_Tool < Current_Tool Then moves = Num_Tools - Current_Tool +Requested_Tool

If Requested_Tool > SV_TOOL_NUMBER Then moves = Requested_Tool -Current_Tool

If Requested_Tool < SV_TOOL_NUMBER Then moves = Num_Tools - Current_Tool +Requested_Tool


total_move = (moves * CW_Move_Per_Tool)+(CCW_Move/2)


Code "G91 G94" 'incremental & Feed per minute
Code "G0 A" & total_move '& "F" & CW_Feed
Code "G0 A" & "-" & CCW_Move '& "F" & CCW_Feed
;SetCurrentTool Requested_Tool
;SetUserDRO HoldingDRO, Requested_Tool
Code "G90" ' back to absolute movement
Code "F" & Current_Feed

battwell
18-02-2018, 12:28 PM
ive just ordered one of these- pretty good reviews for wired lan extender through power sockets
http://www.ebay.co.uk/itm/BT-Broadband-Extender-Flex-500-Kit-Pass-Through-Powerline-Adapters-Twin-Pack/122236222579

Chaz
18-02-2018, 01:42 PM
ive just ordered one of these- pretty good reviews for wired lan extender through power sockets
http://www.ebay.co.uk/itm/BT-Broadband-Extender-Flex-500-Kit-Pass-Through-Powerline-Adapters-Twin-Pack/122236222579

The problem isnt connectivity. I have a similar setup. The issue is that the controller connects via Ethernet, so I cant 'get' to the Internet if the cable I need is disconnected. CS Labs allows you to use DHCP on your network to reassign its IP. This doesnt seem to do that.

JAZZCNC
18-02-2018, 06:07 PM
Chaz been doing little digging and looks like the acorn is setup in such away that it watches inputs to determine where the turret is located.
This is why the Orac code is so simple. The PLC is watching the I/O to determine which turret location currently at then moving to new location.

There isn't any code in the PLC like what your probably thinking. All the PLC does is watch 3 inputs and depending on there logic state knows turret location. ie:
In1=on In2=off in3=on == Turret Position#1
In1=on In2=on In3=off == Turret Position #2
In1=off In2=on In3=on == Turret Position #3
And so on for each Turret location.

Using this Logic indexing it rotates the turret while watching the I/O untill matches tool # taken from G-code and stored in parameter #4102 and when finished returns sets this location in Memory and sets parammeter #90014.
This Logic is the only thing in the PLC which can be changed.

It should be possible to change the PLC but this is beyond me at the minute.
However think we could easily work around this and effectively do it manually using the Macro with simple moves then set the parameters to keep track where located.

Also note Centroid don't use G91 incremental moves. If want to program incremental move you use UVW moves ie: x10 Z-5 would be absolute moves.
incremental moves would be U10 W-5.

What axis would you use for turret.?

Chaz
18-02-2018, 06:34 PM
Thanks, been doing lots of reading too. I'm using A Axis for the turret.

Here is my PLC Source Code.

https://pastebin.com/SLRZQ4Re

Some specific bits of interest seem to be:-

;SV_MACHINE_PARAMETER_6 is ATC on/off. 1 = ATC on, 0 = ATC off.

;SV_MACHINE_PARAMETER_830 = ATC Type, 0 = none. 1 = incremental, 2 = incremental w/sync,
; 4 = absolute 3bit, 8 = absolute 4bit, 16 = switched reverse
; 32 = self reversing



;------------------------------------------------------------------------------
; Memory Bit Definitions
;------------------------------------------------------------------------------
AtcPresent_M IS MEM1
AtcIsAbsolute_M IS MEM2
AtcIsIncremental_M IS MEM3

RotateToolTurret IS MEM329 ;&*;
ReverseToolTurret IS MEM330 ;&*;

I assume if I set parameter 830 to 1, the following code then applies?

;------------------------------------------------------------------------------
AtcIncrementalStage
;------------------------------------------------------------------------------
;For incremental ATC's, ToolTurretPosBit1 is the tool counter and toggles each time the
;turret rotates to a tool position. If ToolTurretPosBit1 toggles while ReverseToolTurret is
;not on, then CurrentTurretPosition_W = CurrentTurretPosition_W + 1. If ToolTurretPosBit1
;toggles while ReverseToolTurret is on, then CurrentTurretPosition_W = CurrentTurretPosition_W -1.

IF ToolTurretPosBit1 && RotateToolTurret && !ReverseToolTurret
THEN CurrentTurretPosition_W = CurrentTurretPosition_W + 1

IF ToolTurretPosBit1 && RotateToolTurret && !ReverseToolTurret
THEN CurrentTurretPosition_W = CurrentTurretPosition_W - 1

m_c
18-02-2018, 06:52 PM
Looking at that, that's an example for something with an incremental toolholder (something similar to your Triac, but you only get a single pulse per tool position), however what it does show, is that you can directly manipulate the tool position number, simply by setting CurrentTurretPosition_W.

Now you have a couple choices on how to implement the turret rotation.
You can either create a function that only moves one position at a time, and updates the counter each time, such as this basic flow-

while not at required position,
rotate turret one position
end while
rotate turret backwards to lock.

Function rotate turret one position
Rotate A-axis NN degrees
Increment turret position by one
end function


Or if you do it in a single function

calculate required turret movement
Rotate A-axis required movement
Reverse A-axis to lock
Update tool position

However, looking at that code snippet, it does look like it will handle the tool position rollover automatically.
I'd try creating a basic M6 macro that simply increments it by maybe 3 or 5 position in one swift move, and see if the tool position rolls over to where you'd expect. It may be limited to only incrementing by one (I'd hope not, but a quick bit code to test is easier, than having to re-write a whole macro if it is limited).


If you're really stuck, post up the links to the PLC manual and I'll have a bit read later.
From what I looked at a couple weeks ago, the PLC language does seem to be some kind of Basic/Ladder/Fanuc love child.

Chaz
18-02-2018, 06:58 PM
Looking at that, that's an example for something with an incremental toolholder (something similar to your Triac, but you only get a single pulse per tool position), however what it does show, is that you can directly manipulate the tool position number, simply by setting CurrentTurretPosition_W.

Now you have a couple choices on how to implement the turret rotation.
You can either create a function that only moves one position at a time, and updates the counter each time, such as this basic flow-

while not at required position,
rotate turret one position
end while
rotate turret backwards to lock.

Function rotate turret one position
Rotate A-axis NN degrees
Increment turret position by one
end function


Or if you do it in a single function

calculate required turret movement
Rotate A-axis required movement
Reverse A-axis to lock
Update tool position

However, looking at that code snippet, it does look like it will handle the tool position rollover automatically.
I'd try creating a basic M6 macro that simply increments it by maybe 3 or 5 position in one swift move, and see if the tool position rolls over to where you'd expect. It may be limited to only incrementing by one (I'd hope not, but a quick bit code to test is easier, than having to re-write a whole macro if it is limited).


If you're really stuck, post up the links to the PLC manual and I'll have a bit read later.
From what I looked at a couple weeks ago, the PLC language does seem to be some kind of Basic/Ladder/Fanuc love child.

Thanks.

The ATC 'process' is mapped here and links to the PLC reference manual also there.

http://centroidcncforum.com/viewtopic.php?f=60&t=1340&sid=5067344c908dc2a04d52327af32d86da

PLC Manual - http://www.centroidcnc.com/downloads/CNC11%20PLC%20Programming%20Manual.pdf

Many thanks.

JAZZCNC
18-02-2018, 07:47 PM
However, looking at that code snippet, it does look like it will handle the tool position rollover automatically.

Ok think we are looking at two different pieces of code here. I've just downloaded Chaz's file and you could be correct.!!
Looks like ToolTurretPosBit1 uses the tool counter when in incremental mode and then toggles tool position each time this increments.

However Still not sure thou because how does the tool position get incremented inside the PLC.?

Chaz
18-02-2018, 07:49 PM
Don't think so Not without watching at least one input and setting the ToolTurretPosBit1. Only then can it increment the CurrentTurretPosition_W variable which then gets stored in MEM1 which then signals to M101 /70001 in main cnctch.mac (M6 macro) that toolChange is Complete.

Without using an input then the only way is to move it using set amount of degrees then reverse etc then increment tool position in the code.

Yep, which is how the Mach 3 ATC macro works.

JAZZCNC
18-02-2018, 08:23 PM
Yep, which is how the Mach 3 ATC macro works.

So are you saying this Turret does have sensor.? I was under the impression it didn't and just rotated set amount then reversed little. Then updated tool table.

Chaz
18-02-2018, 08:25 PM
So are you saying this Turret does have sensor.? I was under the impression it didn't and just rotated set amount then reversed little. Then updated tool table.

No, no sensor. Here is a video of it running (on Mach 3).

https://www.youtube.com/watch?v=-cCDulVashA

Chaz
18-02-2018, 08:27 PM
Some more example stuff here.

http://centroidcncforum.com/viewtopic.php?f=60&t=1095&p=5499&hilit=atc#p5499

m_c
18-02-2018, 08:39 PM
Ok think we are looking at two different pieces of code here. I've just downloaded Chaz's file and you could be correct.!!
Looks like ToolTurretPosBit1 uses the tool counter when in incremental mode and then toggles tool position each time this increments.

However Still not sure thou because how does the tool position get incremented inside the PLC.?

I'm only going by the code snippet Chaz posted, but it looks to me like if you enable incremental mode, it expects you to link an input, along with a directional command, and the rest is then handled behind the scenes.
However, I would still expect you to be able to directly change the tool position, to allow for tool changer homing routines, and recovery of changers that have no home sensor.

JAZZCNC
18-02-2018, 08:41 PM
Some more example stuff here.

http://centroidcncforum.com/viewtopic.php?f=60&t=1095&p=5499&hilit=atc#p5499

Ye thats one I've been looking at and is more like what would be needed to make work thru PLC. Notice there are commands for error checking and actually turning turret.

JAZZCNC
18-02-2018, 08:44 PM
I'm only going by the code snippet Chaz posted, but it looks to me like if you enable incremental mode, it expects you to link an input, along with a directional command, and the rest is then handled behind the scenes.
However, I would still expect you to be able to directly change the tool position, to allow for tool changer homing routines, and recovery of changers that have no home sensor.

If notice there's nothing in there which actually moves the turret etc. Still needs code adding. Better example is to look at this link and download the file.
http://centroidcncforum.com/viewtopic.php?f=60&t=1095&hilit=turret+atc

Chaz
18-02-2018, 08:49 PM
Copied:-

TurretMotor is an output. It turns on if currentPosition_W != RequestedLocation_W.

;If current position != requested position, rotate turret
IF DoingTurretIndex_M && RequestedLocation_W != CurrentTurretPosition_W THEN SET TurretMotor

Not sure where or how this TurretMotor is defined. On my Triac, that was just an output for a relay, so that's easy. This is different as its actually the A Axis and not an 'outside' device.

Chaz
18-02-2018, 08:53 PM
If notice there's nothing in there which actually moves the turret etc. Still needs code adding. Better example is to look at this link and download the file.
http://centroidcncforum.com/viewtopic.php?f=60&t=1095&hilit=turret+atc

Ye, that works due to this.

TurretMotor IS OUT2 ;&*;

I suspect that's a relay.

I wonder if I can set Step as an output?

m_c
18-02-2018, 09:54 PM
I'll just put this here for now, but it's a work in progress. I need to go and do something, but will try and get it finished later.
Original code-

;================================================= ============================
MainStage
;================================================= ============================
;Do gather if commanded (uncomment and recompile for debugging purposes)
;IF Aux11Key || ((SV_MPU11_ABS_POS_2 < SV_MACHINE_PARAMETER_45) && (SV_MACHINE_PARAMETER_45 < -1000)) THEN (Aux11KeyPD)
;IF Aux11KeyPD THEN (SV_TRIGGER_PLOT_DUMP), SET SV_STOP
;IF Aux11Key || OUT25 THEN (SV_TRIGGER_PLOT_DUMP)

IF TRUE THEN CurrentTurretPosition_W = 0
IF ToolBit1 && ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 1
IF !ToolBit1 && ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 2
IF !ToolBit1 && !ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 3
IF ToolBit1 && !ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 4
IF ToolBit1 && !ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 5
IF !ToolBit1 && !ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 6
IF !ToolBit1 && ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 7
IF ToolBit1 && ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 8
IF TRUE THEN SV_PLC_CAROUSEL_POSITION = CurrentTurretPosition_W

IF SV_PROGRAM_RUNNING THEN (ProgramRunning)

;cnctch.mac
IF OnAtPowerUp_M THEN RequestedLocation_W = CurrentTurretPosition_W
IF TRUE THEN TurretTimer = 700, ReversingTimer = 1500
IF M6 THEN (M6PD), SET DoingTurretIndex_M
IF M6PD THEN RequestedLocation_W = SV_TOOL_NUMBER

IF DoingTurretIndex_M && ((SV_TOOL_NUMBER < 1) || (SV_TOOL_NUMBER > 8))
THEN SET OtherFault_M, FaultMsg_W = INVALID_TOOL_NUMBER, RST DoingTurretIndex_M,
RequestedLocation_W = CurrentTurretPosition_W, SET ToolChangeComplete

IF DoingTurretIndex_M && RequestedLocation_W != CurrentTurretPosition_W THEN SET TurretMotor
IF RequestedLocation_W == CurrentTurretPosition_W THEN SET TurretTimer
IF TurretTimer THEN RST TurretMotor, SET ReversingTimer, RST TurretTimer
IF ReversingTimer THEN RST ReversingTimer, SET ToolChangeComplete

IF !SV_PROGRAM_RUNNING THEN RST M6, RST DoingTurretIndex_M, RequestedLocation_W = CurrentTurretPosition_W

IF !M6 THEN RST ToolChangeComplete, RST TurretTimer


IF SV_STOP THEN RST TurretMotor, RST TurretTimer, RST ReversingTimer, RST M6


Code in the process of being modified

;================================================= ============================
MainStage
;================================================= ============================
;Do gather if commanded (uncomment and recompile for debugging purposes)
;IF Aux11Key || ((SV_MPU11_ABS_POS_2 < SV_MACHINE_PARAMETER_45) && (SV_MACHINE_PARAMETER_45 < -1000)) THEN (Aux11KeyPD)
;IF Aux11KeyPD THEN (SV_TRIGGER_PLOT_DUMP), SET SV_STOP
;IF Aux11Key || OUT25 THEN (SV_TRIGGER_PLOT_DUMP)

IF SV_PROGRAM_RUNNING THEN (ProgramRunning)

;cnctch.mac
IF OnAtPowerUp_M THEN RequestedLocation_W = CurrentTurretPosition_W
IF TRUE THEN TurretTimer = 700, ReversingTimer = 1500
IF M6 THEN (M6PD), SET DoingTurretIndex_M
IF M6PD THEN RequestedLocation_W = SV_TOOL_NUMBER

IF DoingTurretIndex_M && ((SV_TOOL_NUMBER < 1) || (SV_TOOL_NUMBER > 8))
THEN SET OtherFault_M, FaultMsg_W = INVALID_TOOL_NUMBER, RST DoingTurretIndex_M,
RequestedLocation_W = CurrentTurretPosition_W, SET ToolChangeComplete

;code to calculate distance to move
If CurrentTurretPosition_W > RequestedLocations_W THEN DistanceToMove = ... (need to handle roll over)
;code to rotate A-axis require distance
;code to reverse A-axis
IF TRUE THEN SET ToolChangeComplete


IF !SV_PROGRAM_RUNNING THEN RST M6, RST DoingTurretIndex_M, RequestedLocation_W = CurrentTurretPosition_W

IF !M6 THEN RST ToolChangeComplete, RST TurretTimer


IF SV_STOP THEN RST TurretMotor, RST TurretTimer, RST ReversingTimer, RST M6
RequestedLocation_W
CurrentTurretPosition_W

Chaz, to save me looking it up, just to confirm, it's an 8-position turret (45 deg between tools)?
And does normal rotation increase or decrease tool position?

Chaz
18-02-2018, 10:01 PM
I'll just put this here for now, but it's a work in progress. I need to go and do something, but will try and get it finished later.
Original code-

;================================================= ============================
MainStage
;================================================= ============================
;Do gather if commanded (uncomment and recompile for debugging purposes)
;IF Aux11Key || ((SV_MPU11_ABS_POS_2 < SV_MACHINE_PARAMETER_45) && (SV_MACHINE_PARAMETER_45 < -1000)) THEN (Aux11KeyPD)
;IF Aux11KeyPD THEN (SV_TRIGGER_PLOT_DUMP), SET SV_STOP
;IF Aux11Key || OUT25 THEN (SV_TRIGGER_PLOT_DUMP)

IF TRUE THEN CurrentTurretPosition_W = 0
IF ToolBit1 && ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 1
IF !ToolBit1 && ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 2
IF !ToolBit1 && !ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 3
IF ToolBit1 && !ToolBit2 && !ToolBit3 THEN CurrentTurretPosition_W = 4
IF ToolBit1 && !ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 5
IF !ToolBit1 && !ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 6
IF !ToolBit1 && ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 7
IF ToolBit1 && ToolBit2 && ToolBit3 THEN CurrentTurretPosition_W = 8
IF TRUE THEN SV_PLC_CAROUSEL_POSITION = CurrentTurretPosition_W

IF SV_PROGRAM_RUNNING THEN (ProgramRunning)

;cnctch.mac
IF OnAtPowerUp_M THEN RequestedLocation_W = CurrentTurretPosition_W
IF TRUE THEN TurretTimer = 700, ReversingTimer = 1500
IF M6 THEN (M6PD), SET DoingTurretIndex_M
IF M6PD THEN RequestedLocation_W = SV_TOOL_NUMBER

IF DoingTurretIndex_M && ((SV_TOOL_NUMBER < 1) || (SV_TOOL_NUMBER > 8))
THEN SET OtherFault_M, FaultMsg_W = INVALID_TOOL_NUMBER, RST DoingTurretIndex_M,
RequestedLocation_W = CurrentTurretPosition_W, SET ToolChangeComplete

IF DoingTurretIndex_M && RequestedLocation_W != CurrentTurretPosition_W THEN SET TurretMotor
IF RequestedLocation_W == CurrentTurretPosition_W THEN SET TurretTimer
IF TurretTimer THEN RST TurretMotor, SET ReversingTimer, RST TurretTimer
IF ReversingTimer THEN RST ReversingTimer, SET ToolChangeComplete

IF !SV_PROGRAM_RUNNING THEN RST M6, RST DoingTurretIndex_M, RequestedLocation_W = CurrentTurretPosition_W

IF !M6 THEN RST ToolChangeComplete, RST TurretTimer


IF SV_STOP THEN RST TurretMotor, RST TurretTimer, RST ReversingTimer, RST M6


Code in the process of being modified

;================================================= ============================
MainStage
;================================================= ============================
;Do gather if commanded (uncomment and recompile for debugging purposes)
;IF Aux11Key || ((SV_MPU11_ABS_POS_2 < SV_MACHINE_PARAMETER_45) && (SV_MACHINE_PARAMETER_45 < -1000)) THEN (Aux11KeyPD)
;IF Aux11KeyPD THEN (SV_TRIGGER_PLOT_DUMP), SET SV_STOP
;IF Aux11Key || OUT25 THEN (SV_TRIGGER_PLOT_DUMP)

IF SV_PROGRAM_RUNNING THEN (ProgramRunning)

;cnctch.mac
IF OnAtPowerUp_M THEN RequestedLocation_W = CurrentTurretPosition_W
IF TRUE THEN TurretTimer = 700, ReversingTimer = 1500
IF M6 THEN (M6PD), SET DoingTurretIndex_M
IF M6PD THEN RequestedLocation_W = SV_TOOL_NUMBER

IF DoingTurretIndex_M && ((SV_TOOL_NUMBER < 1) || (SV_TOOL_NUMBER > 8))
THEN SET OtherFault_M, FaultMsg_W = INVALID_TOOL_NUMBER, RST DoingTurretIndex_M,
RequestedLocation_W = CurrentTurretPosition_W, SET ToolChangeComplete

;code to calculate distance to move
If CurrentTurretPosition_W > RequestedLocations_W THEN DistanceToMove = ... (need to handle roll over)
;code to rotate A-axis require distance
;code to reverse A-axis
IF TRUE THEN SET ToolChangeComplete


IF !SV_PROGRAM_RUNNING THEN RST M6, RST DoingTurretIndex_M, RequestedLocation_W = CurrentTurretPosition_W

IF !M6 THEN RST ToolChangeComplete, RST TurretTimer


IF SV_STOP THEN RST TurretMotor, RST TurretTimer, RST ReversingTimer, RST M6
RequestedLocation_W
CurrentTurretPosition_W

Chaz, to save me looking it up, just to confirm, it's an 8-position turret (45 deg between tools)?
And does normal rotation increase or decrease tool position?

Yes 45. Can't remember in terms of numbers. I'll need to look tomorrow. Unless you can see from the vid I linked? It's the same turret.

Chaz
18-02-2018, 10:04 PM
Just looked at a pic. It looks like the numbers decend.

m_c
18-02-2018, 11:30 PM
;================================================= ============================
MainStage
;================================================= ============================
;Do gather if commanded (uncomment and recompile for debugging purposes)
;IF Aux11Key || ((SV_MPU11_ABS_POS_2 < SV_MACHINE_PARAMETER_45) && (SV_MACHINE_PARAMETER_45 < -1000)) THEN (Aux11KeyPD)
;IF Aux11KeyPD THEN (SV_TRIGGER_PLOT_DUMP), SET SV_STOP
;IF Aux11Key || OUT25 THEN (SV_TRIGGER_PLOT_DUMP)

IF SV_PROGRAM_RUNNING THEN (ProgramRunning)

;cnctch.mac
IF OnAtPowerUp_M THEN RequestedLocation_W = CurrentTurretPosition_W
IF TRUE THEN TurretTimer = 700, ReversingTimer = 1500
IF M6 THEN (M6PD), SET DoingTurretIndex_M
IF M6PD THEN RequestedLocation_W = SV_TOOL_NUMBER

IF DoingTurretIndex_M && ((SV_TOOL_NUMBER < 1) || (SV_TOOL_NUMBER > 8))
THEN SET OtherFault_M, FaultMsg_W = INVALID_TOOL_NUMBER, RST DoingTurretIndex_M,
RequestedLocation_W = CurrentTurretPosition_W, SET ToolChangeComplete

;code to calculate distance to move
IF CurrentTurretPosition_W > RequestedLocation_W THEN PositionsToMove_W = CurrentToolPosition_W - RequestedLocation_W
IF CurrentTurretPosition_W < RequestedLocation_W THEN PositionsToMove_W = (CurrentTurretPosition_W + 8) - RequestedLocation_W ;this assumes the PLC can handle ELSE..
IF TRUE THEN DistanceToMove_W = PositionsToMove_W * 45 ; This may need a further multiplication if we're not going to be moving in degrees (does this need extra movement to overshoot new position before reversing?)
;code to rotate A-axis require distance

;code to reverse A-axis

IF TRUE THEN SET ToolChangeComplete


IF !SV_PROGRAM_RUNNING THEN RST M6, RST DoingTurretIndex_M, RequestedLocation_W = CurrentTurretPosition_W

IF !M6 THEN RST ToolChangeComplete, RST TurretTimer



This is the barebones of what should be needed I think.
It still needs the required code to actually move the A-axis.
Also see the notes I've added.
Having scanned through the manual, I can't see how, or even if, you can move an axis via the PLC.

m_c
18-02-2018, 11:43 PM
I've just realised, what you need to achieve may have to be via a combination of Macro and PLC.
The macro allows you to run normal G-codes, but I'm not sure if you can run calculations in a Macro.

What you may need to do, is run the Macro, which then moves to the PLC to calculate the rotation required, which is then stored in a variable the macro can access. The macro then carries out the required A axis movement.

Chaz
19-02-2018, 11:49 AM
I've just realised, what you need to achieve may have to be via a combination of Macro and PLC.
The macro allows you to run normal G-codes, but I'm not sure if you can run calculations in a Macro.

What you may need to do, is run the Macro, which then moves to the PLC to calculate the rotation required, which is then stored in a variable the macro can access. The macro then carries out the required A axis movement.

Yep. I thought the same after your previous message.

I'm hoping to get some answers on the Centroid forum too.

Chaz
19-02-2018, 03:03 PM
So some response from the Centroid forum. Explained the logic to him. It looks like I need to buy the software to get access to the M107 command needed for the BCD Tool Changer Output. Happy to buy it but need to know I can get it to work.

Chaz
20-02-2018, 06:29 PM
So a response from the Centroid Forum, Ill try this tomorrow.

http://centroidcncforum.com/viewtopic.php?f=60&t=1544&p=9586#p9586

Because your turret is uni-directional, you will need to calculate the "rolled over position"
and command a move to that position. Once there, you will need to change the machine position
to reflect the turret position.

You don't nee the M107 for this since the tool number is the axis machine position. M107 is to send the tool number to the PLC

For the example(s) below:

Start cnctch.mac with a header for comments etc..

;------------------------------------------------------------------------------
; 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 3rd axis, positions are in machine position.
; Requires: Machine home must be set prior to use.
;
#100 = 12 ;Number turret positions
#101 = 1 ;Distance to move from current location to requested location.
#4120 = requested tool
#20601-#20604 = Counts per unit for axes1-4
parameter 6 = 1 for atc


;------------------------------------------------------------------------------

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-#5023] < .002] THEN GOTO 1000

; Notes: Turns/rev must be configured 1 = 1 turret position change
; Turret is on 3rd axis, positions are in machine position.
; Requires: Machine home must be set prior to use.
;
#100 = 12 ;Number turret positions
#101 = 1 ;Requested position
#20601-#20604 = Counts per unit for axes1-4

Example 1
ie.. Max position = 12. Sitting on 8, requested 3 Assuming direction always counts up when moving from tool to tool.

;If current machine position of turret is > requested position:
;subtract current position from max 12 - 8 = 4, then add the requested position 3, then add max position 12:
IF #5023 > #4120 THEN #101 = [[#100 - #5023] +[ #4120 + #100]

;Above to get to 3 from 8, you need to command a move to 19. 7 positions greater than current position.
G53 A19

;You may need a short move to go past this position and then reverse back to lock

;Once at requested position and locked, reset position for DRO display and prevent position windup
;Set current machine position to requested position
M26 /A L[#4120*#20603]

Example2
ie.. Max position = 12. Sitting on 8, requested 11 Assuming direction always counts up when moving from tool to tool.

;If current machine position of turret is < requested position:
;simply command a move to requested position
G53 A#4120

;You may need a short move to go past this position and then reverse back to lock

;Once at requested position and locked, reset position for DRO display and prevent position windup
;Set current machine position to requested position
M26 /A L[#4120*#20603]

N1000 ;Macro finished

m_c
20-02-2018, 07:18 PM
So that answers the question if calculations can be done in macros.

That does look very like Fanuc programming, but as they don't seem to mention that anywhere in their blurb, I'm going to guess it's they're own version of it. (Fanuc let's you access machine variables via variable numbers within G-code, so you can do things like adjust g-code depending on machine status, or adjust tool offsets via G-code if you're using a tool checker/setter during runs).

Chaz
20-02-2018, 07:21 PM
So that answers the question if calculations can be done in macros.

That does look very like Fanuc programming, but as they don't seem to mention that anywhere in their blurb, I'm going to guess it's they're own version of it. (Fanuc let's you access machine variables via variable numbers within G-code, so you can do things like adjust g-code depending on machine status, or adjust tool offsets via G-code if you're using a tool checker/setter during runs).

Yep it looks like these 'variables' are available to use if you know how they match. No PLC code needed from what I can see.

Ill try this tomorrow and test / feedback.

Chaz
21-02-2018, 02:19 PM
So the code kinda works but the logic is wrong for my turret. Ill update it and see if it works.

m_c
22-02-2018, 08:48 PM
Managed to get it working yet?

Chaz
23-02-2018, 03:10 PM
Managed to get it working yet?

Hope. Ended up in A&E with a chest infection / virus. Will need to wait a few days before I can venture into the cold garage. I think I have the code sorted now however.