The Twinwright controller (kernel) is Twinwright's own CNC controller firmware. In Studio it runs the twin's machine. The same code is built for the MC-1's controller board.
It speaks the Grbl 1.1 serial protocol, so G-code senders work with it. Settings, alarms and errors keep the numbers senders know.
$11, and arcs on the true circle. Motion runs in 1 ms slices. Each axis keeps to its maximum rate ($110–$112) and acceleration ($120–$122).$341 sets them;The serial protocol, the real-time commands and the $ commands are in Protocol. Every setting is in Settings, every alarm in Alarm codes, and every error in Error codes.
Senders written for Grbl work with the controller. This section lists what you notice when you are used to another Grbl controller.
In these cases some Grbl controllers carry on; the Twinwright controller stops or raises an alarm.
ALARM:14.ALARM:19.$1030 controls this; it is on by default.G91 G2 X0 Z1 R5, answers error:33.Some Grbl controllers refuse or ignore these; the Twinwright controller runs them as the standards define them:
G43 Hn, G43.2, G10 L1/L10/L11);G41, G42);G64 P) and exact stop (G61.1);# parameters and expressions;G52, polar coordinates (@, ^) and M99;G85, G86 and G89 drill and bore, where some Grbl controllers accept them and do not move;% line with a name, G49 H0, Fanuc program number lines (O1000) and Centroid's M25.$12 off the circle.G93) take the programmed time. Some Grbl controllers run them several times faster.G4) last as long as programmed. Some Grbl controllers round them to 50 ms steps.M72 restores the tool length offset that M70 or M73 saved. Some Grbl controllers keep a later offset when the saved one was 0 in the same offset mode (G43.1), so after M72 the same program can run there with another tool length offset.$120–$122, also on small arcs. A program with very many small arcs can take up to about 2 % longer than on some Grbl controllers. An ordinary program takes about 0.1 % less.FS: is 0: the axes stand.Bf: shows the planner empty.$10, [GC:] comes once per change.$45x answers error:3.$1=25.0 stores 25; some Grbl controllers store 250.M6 and a motion in one line answer error:40.G65 or G66 with other commands in one line answer error:21.error:7.$1030 (stop when the sender is lost), and $1000 and up for input shaping (off by default).$39=0 (legacy real-time characters off): ?, ! and ~ are text inside $ lines and comments, and commands everywhere else. The controller decides from the bytes as they arrive. So it answers ? also with the door open or in a feed hold, where some Grbl controllers sometimes do not.G65 P7 (Modbus messages).#4120 and the like are ordinary parameters and read 0.G33, G76, G33.1) without a spindle encoder. The MC-1 has none, so these answer error:20.The senders that were checked, and their settings, are in G-code senders. To compare a real machine with its twin, see Real machine and shadow mode.