Working documentation
This page is generated from the project's working notes. It records a real retrofit in progress, corrections included. Anything marked ๐ด or โ ๏ธ is unresolved or carries a caveat - read those before acting.
Running the original ATC โ sequence, timings, and why it may refuse¶
5 September 2026. From MW310.PLC JOB 48 (CICLO CAMBIO UTENSILE 6), JOB 50 (CICLO ROTAZIONE GIOSTRA C.U. 6), MW310.EQU, Param/pargen.prm and the machine's own English/ISO.TXT.
Written to answer a practical question โ the ATC will not run and the Masterwood software is opaque โ rather than to design the replacement. Everything here is read off the machine's own disk.
โ ๏ธ Nothing below is an instruction to actuate anything. A tool change moves the head and rotates a loaded carousel. Read it, decide, then act deliberately.
1. ๐ด Read this first โ an earlier version of this page had the wrong premise¶
This document was written on the assumption that the ATC was refusing โ that the PLC was declining to run for a reason buried in the source. That was my framing, not Grant's, and it was wrong.
The actual situation is simpler: the cycle has never been commanded. Not a refusal, a gap in knowing how to drive the software.
If the ATC will not run, start with mw310-operating.md, not with this page. That covers the file model, the tool numbering, and the fact that nothing on the machine arms โ pedal, start button or tool changer โ until a program has been loaded with F5. This page is only useful once a cycle is actually being commanded and something goes wrong partway through.
Two corrections to what was here before:
| Was | Is |
|---|---|
| "The diagnostic screen cannot start a tool change" | Unfounded. JOB 48 does start on OS.51 from the interpreter, but I never established what the diagnostic screen can or cannot raise. Treat the OS.51 fact as read and the conclusion as untested |
"EN_CU_MAN = 0 disables manual tool change" |
Unfounded. VEN_CU_MAN is declared in the PLC and never used โ one reference in 83,000 lines, the EQU line itself. The surrounding symbols (MSTART_CU_MAN "c.u. manuale non C.E.", VQ1_CU_MAN "quota U1 per c.u. man. non C.E.") describe the machine parking so the operator can change a tool by hand. That is a different feature from commanding the carousel, and EN_CU_MAN says nothing about the latter |
What was right, and is read directly from the source: the sequence, the timings, the preconditions, the fault meanings, and the gripper-down interlock. Those follow.
2. What has to be true before it will complete¶
Every one of these will stall or fault the cycle:
| Precondition | Checked by |
|---|---|
| Air on | Every motion in the cycle is pneumatic |
| Spindle stopped | Phases 4 and 7 do WAITTIM0 48,IF_VEL_RAGG โ they wait for at-speed to go low. A spindle still spinning holds the cycle until it times out |
| Carousel homed | IF.46 (RESET GIOSTRA IN POS. 1). If the controller has lost the carousel position, MMEM_RES_ABIL_CU_6 forces a reset cycle before anything else |
| Gripper reaches both ends | IF.43 up, IF.44 down |
| Tool-presence sensor works | IF.17. Phase 0 reads it to decide whether there is anything to unload |
VFREMONT1 matches reality |
The controller's memory of which tool is mounted (VV.54). If the spindle is empty and the controller thinks it is loaded โ or the reverse โ phase 0 raises 1005 |
๐ด VFREMONT1 is the one that catches people. It is software state, not a sensor. If a previous cycle was interrupted, or a tool was changed by hand, the controller's idea of what is in the spindle is wrong and phase 0 will fault before anything moves.
3. The sequence, reduced to what this machine actually has¶
The generic code drives three spindles, a carousel cover, three doors, taper-blow air and a separate tool clamp output. On TuChop almost none of that is fitted โ every one of these is on the OF.254 / OF.256 not-present sentinel:
OF_BLOCCO_UT1 (clamp), OF_SOFFIO_CONO1 (taper blow), OF_COP_CU_6_APERTA / _CHIUSA (cover), OF_PORTELLO1-3 (doors), OF_PANT1_SU_DOP (double launch), and everything for spindles 2 and 3 โ plus the matching inputs.
So the real cycle is much shorter than the source makes it look:
| Phase | What happens on this machine |
|---|---|
| 0 | Wait for the change piston up (IF.20). Read tool presence (IF.17). No tool โ skip to phase 2. Tool present โ check it against VFREMONT1 |
| 1 | Flag "change in progress". Stop the router (JOB 46, spindle off). Raise the gripper (OF.35), wait IF.43. Rotate the carousel to the pocket the outgoing tool came from โ see ยง4 |
| 2 | Release the tool (OF.40), wait for the change piston to leave "up". Lower the gripper (OF.36), wait IF.44 |
| 3 | Cover wait โ no-op here, not fitted |
| 4 | Wait for the spindle to be stopped (IF.25 low). Release the tool, wait for the piston down (IF.21) |
| 5 | Gripper down (OF.36), wait IF.44 |
| 6 | Release the drawbar. Retract the router ram (OF.23 set, OF.24 reset), wait head-up (IF.10). Wait for tool presence to go away (IF.17 low) โ five attempts, then fault 1066. Raise the gripper, then plunge the ram (OF.24) onto the new tool |
| 7 | Clamp the new tool. Wait for at-speed low, wait piston down (IF.21), then piston up (IF.20). Re-seat and re-check โ this is the retry loop, faults 1023 on failure |
| 8 | Wait piston up (IF.20). Raise the router (OF.23). Gripper down then up. Close-up sequence โ mostly no-ops here |
4. The carousel rotation, in full โ JOB 50¶
This is the part worth understanding, because it is self-contained and it is where most of the real timing lives.
1. Read the five echo bits IF.36-IF.40 into a number.
If it already equals the wanted pocket -> EXIT IMMEDIATELY.
(the gripper is never touched)
2. Gripper DOWN (OF.36 set, OF.35 reset), wait IF.44 [7 s]
3. Arm the "gripper must stay down" monitor
4. Write the 5 position bits OF.43-OF.47
5. DELJ 50 ms <- bit settle
6. Set the go command OF.42
7. DELJ 600 ms <- before watching
8. Wait IF.35 "position reached" [25 s]
9. Compare the echo bits against what was commanded.
equal -> done
not -> wait up to 7 s re-checking, then fault 1042
10. If the target was pocket 1, additionally wait IF.46 [25 s]
11. Drop OF.42, disarm the monitor, record the position
Three things in there that matter¶
๐ด The carousel only ever rotates with the gripper DOWN, and MCHK_PINZA_GIU_CU_6 watches it for the whole rotation. If the gripper leaves the down position mid-rotation the PLC raises 1045 immediately. That is a collision guard, and it is the single most important reason not to drive OF.42 by hand.
If it is already at the right pocket, nothing moves at all. The gripper is not lowered. Worth knowing when testing โ a rotation command that appears to do nothing may be correct.
The echo bits are checked against the command, twice. Reaching position is not enough; the carousel has to report the right pocket. That is what catches an indexer that has lost a step.
Bit inversion โ settled¶
CMP 0,EN_CU_6
JPLT J50_INVERTI ;only if EN_CU_6 < 0
COPY 29,VAPP_CU_6
SUB VPINZA_UTE,VAPP_CU_6 ;29 - pocket
pargen.prm has EN_CU_6 = 8, which is positive, so the pocket number is sent as-is. No inversion. โ
5. The timings, all of them¶
| Value | Where | Meaning |
|---|---|---|
| 50 ms | DELJ 50,50 |
Position bits settle before the go command |
| 600 ms | DELJ 50,600 |
After the go command, before watching for position-reached |
| 7 s | TIMEOUT |
Every ordinary input wait in JOB 48 and JOB 50 |
| 25 s | TIMEOUT2 |
Carousel rotation, and the pocket-1 home wait |
| 7 s | DEL1 ... TIMEOUT |
Re-check window when the echo bits disagree |
| 5 | VCONTA_PREUTE |
Tool-seating attempts before giving up |
6. The faults, and what each one is telling you¶
| Code | Means | Read it as |
|---|---|---|
| 1005 | Check "tool presence" and the routing bit fitted | Phase 0. The spindle's real state disagrees with VFREMONT1, or IF.17 is not reading |
| 1042 | Position control in T.C.6 erroneous | The carousel reported reaching position but the echo bits are wrong. Lost step, or a broken echo wire |
| 1045 | Clamp not down during T.C.6 rotation | The gripper left the down position while the carousel was turning. Stop and look before retrying |
| 1023 | Tie rod 1 OK went down after 5 retries | The drawbar will not stay clamped. Air pressure, or the tool is not seating |
| 1066 | Tool 1 presence after 5 tries | The old tool would not release, or the new one would not seat |
Full dictionary in plc-fault-codes.md.
7. If it still will not go, in order¶
- Read the fault code rather than the symptom. Every failure path above sets one, and the code says which phase and which sensor.
- Rotate the carousel on its own first. JOB 50 is independent of JOB 48 and much simpler. If rotation alone will not work, the tool change never will.
- Check
IF.20andIF.21change when the change piston moves. Phase 0 waits onIF.20before anything else, so a dead sensor there stalls the cycle at the very first step with no visible movement. - Check the spindle is genuinely stopped,
IF.25low. Phases 4 and 7 wait for it and a mis-wired at-speed input holds them for 7 s each. - Suspect
VFREMONT1if phase 0 faults with nothing having moved.
โ ๏ธ OF.42 / OF.43 are still unsettled. The PLC uses OF.42 as the go command with five bits on OF.43-OF.47; the wiring diagram reads OF.42 as SVON with the strobe on OF.43. Ring them out before drawing conclusions from carousel behaviour โ a shifted bit map would look exactly like a carousel that goes to the wrong pocket.
Related¶
plc-sequences.mdโ the wider PLC translationplc-fault-codes.mdโ all 95 codesmachine-timings.mdโ where the constants come fromio-map.mdโ every signal above, to its terminal and wire../linuxcnc-sim/nc_subs/toolchange.ngcโ the same sequence, translated