Build Thread - Emco 320

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Chaz
Posts: 774
Joined: Thu Feb 08, 2018 7:57 am
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: Build Thread - Emco 320

Post by Chaz »

suntravel wrote: Sun Apr 20, 2025 11:21 am
Chaz wrote: Thu Apr 17, 2025 8:51 am OK, made some progress. I'm using G50 to set the A Axis but its setting the WCS that's active and not the Work Coordinate System.

How would I go about setting A Axis (machine) to be a calculated value please?
If you have an encoder on the A axis:

M26/A L4096 ; set machine home for the A-axis at encoder position of 4096

Uwe
Thanks. I assumed M26 might have been the answer but wasnt sure on the format.

There is no encoder (other than servo to drive). My turret is set for 360 degrees, so each tool is 45 degrees apart.

From memory, when Tool 1 is set, its at -40, tool 2 is -85 etc.

I want to be able to start the machine, not need to home the A but the machine coordinates are 'learnt' by a formulae that basically says, if you are in T01, then you are at machine coordinate -40, tool 2, -85 etc.

Ill try the 'L' attribute later, thanks.


Chaz
Posts: 774
Joined: Thu Feb 08, 2018 7:57 am
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: Build Thread - Emco 320

Post by Chaz »

Great, got this to work but need to use an odd multiplier to get the result correct. Probably something to do with the gear ratios in the turret etc I would assume.

Calc is basically :

# 135 = (# 4203 * - 40)- ((4203 - 1)*5)
# 136 = # 135 * 930.651456

I'm doing that in 2 stages as I wanted to be sure that the multiplier value was being applied right at the end. Of course I could just combine the formulae now that its working.

The output basically gives me Tool 1 = -40, Tool 2 = -85 and it reduces with -45 per tool number. So tool 8 = -355.

I assumed that variable 4203 (tool in spindle) is persistent with machine power off but it goes back to 0 when I restart. Perhaps I should save this value to one of the ranges (150 upwards) so I can use it later?

So the calc stops working however I can use the index turret button to get it correct. Odd behaviour, the index turret button just random cycles through various numbers, like 1, then 4, then 2, then 6 etc. Is that normal? What's happening when I press index turret in the background?


Chaz
Posts: 774
Joined: Thu Feb 08, 2018 7:57 am
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: Build Thread - Emco 320

Post by Chaz »

I'm trying a different method to update the tool number than using the index turret button. This is meant to call Macro21 but not sure if it does in my case. I edited the Macro and it doesnt run it but I can do it from the macro2 button (on the mpg) and then call the M21 function.

Basically the code is this, however I get an error to say that the variable in line 25 (assuming 4203) is read only.

M224 #100 “What is the current tool number?”

IF [#100 < 1 || #100 > 8] THEN GOTO 200 ;If operator inputs invalid number, repeat question.

#4203 = #100

So looking at the macro guide, which seems to be outdated btw, specifically this section on 4203, is that there are words associated - could I update any of them instead?

"Currently, Acorn software does not use system variable #4203 for “Tool in spindle” and will result in an “Undefined variable” error in software. For CNC12 for use with Allin1DC and Oak CNC controllers, #4203 is used in five axis machines,
primarily for special tool changes involving “Large tools”. System Variable #4203 is set differently depending on how parameters 6 and 160 are set.
If Parameter 6 and 160 are set to a zero, then #4203 is updated when a T command is called, Essentially,
#4203 == #4120
If Parameter 6 is a non-zero value and 160 is set to a zero, then #4203 is updated from a value from the PLC. For Example a line in the PLC may say the following,
SV_PLC_CAROUSEL_POSITION = CarouselPosition_W
SV_PLC_CAROUSEL_POSITION is the tool number displayed at the top right in the software and is the value of #4203, it
will not change until the value in the PLC changes. CarouselPosition_W is a variable used in the PLC, it is assigned values which then gives its value to the SV_PLC_CAROUSEL_POSITION variable.
If Parameter 6 and 160 is set to a non-zero, then #4203 is updated after the M6 tool change macro is called and finished.
This allows for special operations in the macro for 5-axis machines primarily, where #4120 can be used for the requested
tool and #4203 is the previous tool. So,
#4120 = T Number requested
#4203 = Tool in Spindle (Last T number called)
M6 is executed and Finished
#4203 = Tool number requested making it new tool in spindle
"


Post Reply