-
Re: Centroid Acorn Controller - Has anyone tried one?
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
-
Re: Centroid Acorn Controller - Has anyone tried one?
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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
m_c
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/viewtopi...52327af32d86da
PLC Manual - http://www.centroidcnc.com/downloads...g%20Manual.pdf
Many thanks.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
m_c
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.?
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
JAZZCNC
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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
Chaz
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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
JAZZCNC
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
-
Re: Centroid Acorn Controller - Has anyone tried one?
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
JAZZCNC
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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
Chaz
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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
m_c
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/viewtopi...lit=turret+atc
-
Re: Centroid Acorn Controller - Has anyone tried one?
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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
JAZZCNC
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?
-
Re: Centroid Acorn Controller - Has anyone tried one?
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-
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
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 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?
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
m_c
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-
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
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 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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Just looked at a pic. It looks like the numbers decend.
-
Re: Centroid Acorn Controller - Has anyone tried one?
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 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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
m_c
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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
So a response from the Centroid Forum, Ill try this tomorrow.
http://centroidcncforum.com/viewtopi...4&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
-
Re: Centroid Acorn Controller - Has anyone tried one?
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).
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
m_c
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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
So the code kinda works but the logic is wrong for my turret. Ill update it and see if it works.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Managed to get it working yet?
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
m_c
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.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Really good to see this, Ive been looking at the Acorn for the last couple days for my new Boxford, I should have the board etc sometime next week, Mine has a very similar atc to the one Chaz is using so I really apprciate the work you guys have done here. Hopefully i'll be able toprovide some input when Ive got it hooked up.
On a side note
After doing a bit of research into the required specs of the PC the Lenovo M92z ticks all the boxes the i3 is just over the single thread 1500 passmark and the i5 plenty over. Can be picked up for a lot less than a new hd touchscreen. Also seem like they have a normal motherboard inside so cpu/ram can be upgraded.
https://www.cnet.com/products/lenovo...-series/specs/
hope you get well soon Chaz
-
Re: Centroid Acorn Controller - Has anyone tried one?
Quote:
Originally Posted by
Benja
Really good to see this, Ive been looking at the Acorn for the last couple days for my new Boxford, I should have the board etc sometime next week, Mine has a very similar atc to the one Chaz is using so I really apprciate the work you guys have done here. Hopefully i'll be able toprovide some input when Ive got it hooked up.
On a side note
After doing a bit of research into the required specs of the PC the
Lenovo M92z ticks all the boxes the i3 is just over the single thread 1500 passmark and the i5 plenty over. Can be picked up for a lot less than a new hd touchscreen. Also seem like they have a normal motherboard inside so cpu/ram can be upgraded.
https://www.cnet.com/products/lenovo...-series/specs/
hope you get well soon Chaz
Thanks, that was Feb :-)
Shout if you need any help.
-
Re: Centroid Acorn Controller - Has anyone tried one?
Lol I was wondering why it was cold in the workshop! :) did you get it working? Im about to buy my board from the French supplier, i think it works out about the same roughly maybe a few quid more in fact but i'll have it quicker!
-
Re: Centroid Acorn Controller - Has anyone tried one?
I bought one about 3 week ago from Denmark 3 days from order it was here, but have not had chance to set it up yet, hoping to get into it next week.
Phill