Build Thread - Emco 320
Moderator: cnckeith
-
- Posts: 725
- 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
Using Franco's PP looks to outputting the correct format such as T0101 or T0303 but no M6. It looks like it could be in this bit of code, working through what I can work out.
if ((programId >= 8000) && (programId <= 9999)) {
warning(localize("Program number is reserved by tool builder."));
}
var oFormat = createFormat({width:(properties.o8 ? 8 : 4), zeropad:true, decimals:0});
if (programComment) {
//writeln("O" + oFormat.format(programId) + " (" + filterText(String(programComment).toUpperCase(), permittedCommentChars) + ")"); //FRANCO 2/12/18
writeln("O" + oFormat.format(programId)) //FRANCO 2/12/18
writeln(":" +filterText(String(programComment).toUpperCase(), permittedCommentChars))//FRANCO 2/12/18
} else {
writeln("O" + oFormat.format(programId));
}
} else {
error(localize("Program name has not been specified."));
return;
if ((programId >= 8000) && (programId <= 9999)) {
warning(localize("Program number is reserved by tool builder."));
}
var oFormat = createFormat({width:(properties.o8 ? 8 : 4), zeropad:true, decimals:0});
if (programComment) {
//writeln("O" + oFormat.format(programId) + " (" + filterText(String(programComment).toUpperCase(), permittedCommentChars) + ")"); //FRANCO 2/12/18
writeln("O" + oFormat.format(programId)) //FRANCO 2/12/18
writeln(":" +filterText(String(programComment).toUpperCase(), permittedCommentChars))//FRANCO 2/12/18
} else {
writeln("O" + oFormat.format(programId));
}
} else {
error(localize("Program name has not been specified."));
return;
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 725
- 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
Ok, found this in the code and changed it from writeBlock "T" to add in M6 before which seems to work in my first test post.
writeBlock("M6T" + toolFormat.format(tool.number * 100 + compensationOffset));
if (tool.comment) {
writeComment(tool.comment);
}
if (properties.preloadTool) {
var nextTool = getNextTool(tool.number);
if (nextTool) {
var compensationOffset = nextTool.isTurningTool() ? nextTool.compensationOffset : nextTool.lengthOffset;
if (compensationOffset > 99) {
error(localize("Compensation offset is out of range."));
return;
}
writeBlock("M6T" + toolFormat.format(nextTool.number * 100 + compensationOffset));
} else {
// preload first tool
var section = getSection(0);
var firstTool = section.getTool().number;
if (tool.number != firstTool.number) {
var compensationOffset = firstTool.isTurningTool() ? firstTool.compensationOffset : firstTool.lengthOffset;
if (compensationOffset > 99) {
error(localize("Compensation offset is out of range."));
return;
}
writeBlock("M6T" + toolFormat.format(firstTool.number * 100 + compensationOffset));
}
writeBlock("M6T" + toolFormat.format(tool.number * 100 + compensationOffset));
if (tool.comment) {
writeComment(tool.comment);
}
if (properties.preloadTool) {
var nextTool = getNextTool(tool.number);
if (nextTool) {
var compensationOffset = nextTool.isTurningTool() ? nextTool.compensationOffset : nextTool.lengthOffset;
if (compensationOffset > 99) {
error(localize("Compensation offset is out of range."));
return;
}
writeBlock("M6T" + toolFormat.format(nextTool.number * 100 + compensationOffset));
} else {
// preload first tool
var section = getSection(0);
var firstTool = section.getTool().number;
if (tool.number != firstTool.number) {
var compensationOffset = firstTool.isTurningTool() ? firstTool.compensationOffset : firstTool.lengthOffset;
if (compensationOffset > 99) {
error(localize("Compensation offset is out of range."));
return;
}
writeBlock("M6T" + toolFormat.format(firstTool.number * 100 + compensationOffset));
}
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
Re: Build Thread - Emco 320
Just to refresh, the Emco 320 is a lathe, with a turret. Correct?
Lathe controls do not use M6.
The 4-digit T code is all that is required. If the first two digits (hundreds place) is different from previous, then the control will initiate a tool change.
The tool change macro file is named "cnctch.mac". That is where you put the code to perform the tool change (or to cooperate with the PLC while it performs the tool change).
Lathe controls do not use M6.
The 4-digit T code is all that is required. If the first two digits (hundreds place) is different from previous, then the control will initiate a tool change.
The tool change macro file is named "cnctch.mac". That is where you put the code to perform the tool change (or to cooperate with the PLC while it performs the tool change).
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 725
- 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
Yep. OK, that's odd. Ill try when I get home. Aware of the macro, been editing it many times to get it to work.cncsnw wrote: ↑Mon Jan 06, 2025 6:50 pm Just to refresh, the Emco 320 is a lathe, with a turret. Correct?
Lathe controls do not use M6.
The 4-digit T code is all that is required. If the first two digits (hundreds place) is different from previous, then the control will initiate a tool change.
The tool change macro file is named "cnctch.mac". That is where you put the code to perform the tool change (or to cooperate with the PLC while it performs the tool change).
I was sure that T0101 did nothing, ill confirm when im home again in a few days time. That said, it works as it is now.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
Re: Build Thread - Emco 320
If the tool number is already T01xx, then "T0101" will do nothing; but T0202 will do something.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 725
- 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
Ok, in my macro code, T0101 will still trigger (long story why, its related to not reading the grey code to be sure). Ill test when I get home.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 725
- 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
Could anyone suggest how the index pulse would be wired for my X Axis homing on the lathe so that I can get better repeatability?
Ive wired 27 into an input. Does 12 just get grounded? I'm not seeing any state change as the motor spins. Even when not trying to home, I should see the ZRI input state change, correct or only active when using it for homing?
Thanks
Ive wired 27 into an input. Does 12 just get grounded? I'm not seeing any state change as the motor spins. Even when not trying to home, I should see the ZRI input state change, correct or only active when using it for homing?
Thanks
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 725
- 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
I'm just wondering - google suggests open collector is NPN. Should the main Acorn board see it? I might move it to the Ext1616 board just to see.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Community Expert
- Posts: 3578
- Joined: Thu Sep 23, 2021 3:49 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 6433DB0446C1-08115074
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany
Re: Build Thread - Emco 320
I also failed to make the OZ output trigger an Acorn Six input, regardless if set to NPN or PNP.
But using Z /Z from the encoder output is working with a 2€ F5305S
https://www.amazon.de/JZK-Elektronische ... 83&sr=8-50
Uwe
But using Z /Z from the encoder output is working with a 2€ F5305S
https://www.amazon.de/JZK-Elektronische ... 83&sr=8-50
Uwe
1 user liked this post
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 725
- 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
Thanks. I can get the same in the UK. Do you still use the equivalent output from the driver - like in my case, output 27? Just looking at the wiring for it, could you please indicate how you have yours wired?suntravel wrote: ↑Fri Jan 24, 2025 9:30 am I also failed to make the OZ output trigger an Acorn Six input, regardless if set to NPN or PNP.
But using Z /Z from the encoder output is working with a 2€ F5305S
https://www.amazon.de/JZK-Elektronische ... 83&sr=8-50
Uwe
(Note: Liking will "up vote" a post in the search results helping others find good information faster)