Skip to main content
Version: 3.2

Brother TCTC Brother TC Integration Guide

Read the state, alarms, work counters and tool life of Brother TC machines, and read and write their PLC devices.

Status
Beta
Machines
Brother TC-series tapping and machining centres
Transport
TCP, port 10000 by default
Operations
Read Device · Read Block · Write Device
Triggers
None: poll with a Schedule trigger

Brother TC-series tapping and machining centres answer the Type 2 ASCII protocol on their Ethernet port. MaestroHub reads the machine's CNC data (its execution state, running program, mode, alarm codes, work counters and tool life) and reads and writes the devices of its built-in PLC by address, such as D100 or Y1F. This guide covers the connection, the addresses, the three function types, and how the matching nodes fit into the Pipeline Designer.

The Brother Speedio machines speak the same protocol with small differences, and have their own connector: see Brother Speedio.

Beta

What stands behind the connector today:

  • Brother publishes no manual for the Type 2 protocol; it gives it to its customers. The frames, the PLC area table, the value encodings and the CNC records MaestroHub uses were read from a reference driver for these machines, and only the parts confirmed there are implemented.
  • Two public sources agree with that reading: the Litmus Edge guide for Brother TC Ethernet gives port 10000, and the Maple Systems guide for Brother Speedio machines gives port 10000 and the X and Y range 0 to 3FF.
  • MaestroHub's tests run against an in-process test machine that checks every request byte by byte, and against the HTTP API with that machine behind it.

What is not proven yet:

  • It has not been run against a real Brother TC machine. No open-source implementation or simulator of the protocol exists to check MaestroHub against.
  • What each completion code other than 00 means: no table of them is documented, so MaestroHub reports the code the machine answered with.
  • Which work counter the letter A or B and the number 1 to 4 name on the machine, and what the two tool-life columns hold: MaestroHub reads the record fields the reference driver reads.

Overview​

The Brother TC connector provides:

  • Machine status: execution state, a running flag, the program number and the mode
  • Alarms: the 18 alarm codes of the machine's alarm record
  • Work counters: counters A and B, numbers 1 to 4, each with its count, current, target and end values
  • Tool life: the tool life and the initial tool life of tools 1 to 99, in tool groups 0 to 9
  • PLC devices: the bits X, Y, M, LM, BX, BY and the signed 16-bit words D, LD, BDX, BDY; writes to Y, M, LM, D and LD
  • Block reads: many named devices and signals in one node, each CNC file read once

Terms used in this guide​

TermMeaning
Type 2Brother's ASCII request and response protocol over TCP. Each request has a 19-character header; the machine answers with the header repeated, a two-digit completion code and the data.
Completion codeTwo digits in every answer. 00 is success; what any other code means is not documented.
CNC fileData the machine's control keeps as lines of records, read whole: MEM (state and alarms), WKCNTR (work counters), TOLNM0 to TOLNM9 (tool life of a tool group).
PLC deviceA bit or a word of the machine's built-in PLC, named by its area and number: D100, Y1F.

Not supported​

WhatWhy
Writing CNC data (counters, tool life, alarms)The reference driver reads them only. Every CNC signal is read only.
The checksum modeA TC sends and expects the checksum digits 00; the reference driver has no checksum mode for a TC.
The timer and counter areas of the PLC (LT, LC forms)Not confirmed for a TC; not in this version.
A list of values in one writeThe protocol writes one device per request. Write each device with its own function.
A triggerThe machine does not send data on its own. Poll it with a Schedule trigger.

What happens on connect​

MaestroHub opens the TCP connection to the machine's port, then reads D0, the first data register, which every machine has. Any answer in the protocol counts, a completion code other than 00 included: it proves a Brother machine answers there. An open TCP port alone proves nothing.

A Type 2 answer carries no request number: it is matched to its request only by repeating the request's header. So the connection sends one request at a time. An answer that does not repeat the header, data after the end of an answer, a request that gets no answer within the Response Timeout, and a lost connection close the connection, and it is opened again: a late answer could otherwise be read as the answer to the next request. Before each request the connection also checks that nothing is waiting on it. Bytes no request asked for (a reply sent twice or unasked) close the connection before the request is sent: the request reports the connection as unavailable, and nothing reaches the machine. A machine that closes or resets the idle connection is noticed when it happens, not at the next request: the connection is checked at once and opened again, and a request in between is not sent and reports the connection as unavailable. A completion code other than 00 is a whole answer and leaves the connection in use.

Use one MaestroHub connection per machine.

Connection Configuration​

Creating a Brother TC Connection​

Navigate to Connections → New Connection → Brother TC and fill in the form. It has four tabs: Connection, Functions, Scaling and Health. The Functions, Scaling and Health tabs unlock after the connection is saved.

1. Profile Information​

FieldDefaultDescription
Profile Name-A descriptive name for this connection profile (required). Must be unique across all connections.
Description-Optional description for this connection
Labels-Key-value pairs to categorize and organize the connection

2. Machine​

FieldDefaultMeaning
Address(required)Machine host name or IP address, e.g. 192.168.1.20
Port10000The machine's Type 2 TCP port, 1 to 65535. 10000 is the Brother default
Connection Timeout5sMaximum time to open the connection and read D0 (1s to 5m)
Response Timeout5sHow long one request waits for the machine's answer (500ms to 30s)

Each function has its own Timeout (default 30m) that bounds the whole operation. Within it, each request waits at most the Response Timeout for its answer.

Brother TC connection formBrother TC connection form

The Connection tab: the machine's address and port, and the timeouts

Testing the Connection​

Click Test Connection at the bottom of the form to try the current settings before saving. It connects as described in What happens on connect. Once the connection runs, its health probe reads D0 again and reports the round trip. When the machine does not answer, the connection is closed and opened again.

Function Builder​

Creating Brother TC Functions​

After the connection is saved:

  1. Open the connection and navigate to the Functions tab
  2. Click New Function to open the function type selection dialog
  3. Choose Read Device, Read Block or Write Device
  4. Fill the Basic tab (name, description, labels) and the Configuration tab (operation-specific parameters)
  5. Use the Test button to run the function against the machine before saving. Testing a Write Device function writes to the machine's PLC
Brother TC function typesBrother TC function types

Two reads and one write

Addresses​

An address is a PLC device or a CNC signal. Letter case does not matter: y1f is Y1F.

PLC devices are an area and a number, with no separator:

AreaWhat it isNumbersValueWritable
XInputs0 to 3FF, hexadecimaltrue/falseNo
YOutputs0 to 3FF, hexadecimaltrue/falseYes
BX, BYInterface bits0 to 3FF, hexadecimaltrue/falseNo
MInternal relays0 to 8191true/falseYes
LMLatched relays0 to 1023true/falseYes
DData registers0 to 2047-32768 to 32767Yes
LDLatched data registers0 to 2047-32768 to 32767Yes
BDX, BDYInterface words0 to 255-32768 to 32767No

CNC signals are read from the machine's CNC files and are read only:

SignalValueFile
EXECUTIONSTATEThe execution state, 0 to 3MEM, record A01
RUNNINGtrue when the execution state is 1MEM, record A01
PROGRAMNUMBERThe program number, 0 to 9999MEM, record A01
MODEThe mode, 0 to 9MEM, record A01
ALARM:<n>Alarm code n, 1 to 18MEM, record E01
COUNTER:<A or B>:<n>:<field>A work counter's COUNT, CURRENT, TARGET, ENDSIGNAL or ENDWARNING, counter number 1 to 4WKCNTR, record A01 to B04
TOOLLIFE:<group>:<tool>The tool life of tool 1 to 99 in group 0 to 9TOLNM<group>, record T01 to T99
TOOLLIFEINITIAL:<group>:<tool>The initial tool life of that toolTOLNM<group>

ENDSIGNAL and ENDWARNING read the same field of the counter record, the fourth, as the reference driver does.

Read Device (brothertc.read.device)​

ParameterRequiredDescription
DeviceYesA PLC device or a CNC signal, as in Addresses
TimeoutNoBound on this single operation (default 30m)

A CNC signal reads its whole file, then takes the one field.

Read Block (brothertc.read.block)​

ParameterRequiredDescription
Data PointsYesThe points to read. Each has a Name, the key of its value in the result, and a Device / Signal. Each name is used once
TimeoutNoBound on this single operation (default 30m)

Each CNC file is read once however many of its signals are listed: RUNNING, PROGRAMNUMBER and ALARM:3 together cost one request. Each PLC device takes a request of its own. A point the machine does not give (a counter or tool it does not have, a device it refuses) is reported by name in the result, and the other points are still read.

Write Device (brothertc.write.device)​

ParameterRequiredDescription
DeviceYesA writable PLC device: Y, M or LM for a bit, D or LD for a word
ValueYesFor a bit: true or false (also 1/0, on/off). For a word: a whole number from -32768 to 32767. Supports ((parameter)) placeholders
TimeoutNoBound on this single operation (default 30m)

A device that is read only, a CNC signal, or a value that does not fit is refused when the function is saved, and again before anything is sent when a placeholder fills in a value that does not fit.

Write Device function parametersWrite Device function parameters

A Write Device function whose value comes from a parameter

A write happens when the node runs, or not at all

A write is never buffered for later delivery: a setpoint that arrives an hour late is a new decision, not the old one. A pipeline run started by a late (replayed) input does not execute the write unless the node allows late input. A write whose answer did not come (no answer within the Response Timeout, the connection closed or reset, an answer that does not repeat the request) may have reached the machine: its outcome is reported as unknown, not as refused, and the connection is opened again.

Using Parameters​

The Value field supports ((parameterName)) placeholders; they appear in the Function Parameters block, where you set each one's type, whether it is required, and a default. For example, Device D100 and Value ((setpoint)) write the node's setpoint parameter to D100.

Pipeline Integration​

Use the functions you configure here as nodes inside the Pipeline Designer. Each function type has its own node:

  • Brother TC Read Device (connected.brothertc.read.device): executes a brothertc.read.device function
  • Brother TC Read Block (connected.brothertc.read.block): executes a brothertc.read.block function
  • Brother TC Write Device (connected.brothertc.write.device): executes a brothertc.write.device function

A Brother machine does not send data on its own: to poll one, drive the reads from a Schedule trigger.

Brother TC node in the pipeline designerBrother TC node in the pipeline designer

The Read Device node with its connection and function

For node-level details (output structure, execution settings), see the Brother TC Nodes page.

Common Use Cases​

Machine state and part counts to the UNS​

A Read Block of RUNNING, PROGRAMNUMBER, ALARM:1 and COUNTER:A:1:COUNT on a Schedule trigger, routed to the Unified Namespace. Two requests per run: one for MEM, one for WKCNTR.

Tool life alerts​

A Read Block of the tools of a group (TOOLLIFE:1:5, TOOLLIFE:1:6) compared in a Condition node against a threshold, to warn before a tool runs out. One request per tool group.

Requests to the ladder program​

Write true to a relay the ladder program watches (M100) to request a sequence, or a value to a register (D200) the program reads as a setpoint.

Retry on Fail and relays the ladder program clears

A write whose answer did not come is reported as outcome unknown, because it may have reached the machine. Writing a value again leaves the device as one write did, so the write is declared safe to repeat, and the node's Retry on Fail and Retry on Timeout send it again (see A write whose outcome is unknown is sent again only when that is safe). For a relay the ladder program sets a sequence going with and then clears, a second write can start the sequence twice: turn Retry on Fail and Retry on Timeout off on that node.

Troubleshooting​

Error Reference​

What you seeMeaningRetried?
"Q100" is not an address: …Not a PLC device or a signal this connector reads. The save is refusedNo
"D2048" is out of range: D is 0 to 2047The number is past its area. The save is refusedNo
X1 is read only; the writable areas are Y, M, LM, D and LDA write to an input or interface area. The save is refusedNo
PROGRAMNUMBER is a CNC signal, and every CNC signal is read onlyA write to a CNC signal. The save is refusedNo
D is a word area of signed 16-bit values, -32768 to 32767The value does not fit. Nothing was sentNo
the machine's WKCNTR file has no B04 recordThe machine has no such counter (or tool, for a TOLNM file)No
the machine answered "…" with completion code NNThe machine answered with code NN; what it means is not documented. Check the device against the machine's PLC programYes
no answer from the machineThe request was sent and not answered within the Response Timeout. The connection is closed and opened again. A read is reported as transient; a write's outcome as unknown, because it may have reached the machineA read: yes. A write: yes, as outcome unknown; it is safe to repeat
the machine's reply does not answer the request: …An answer that does not repeat the request's header, or data after its end. The connection is closed and opened again. A write's outcome is reported as unknownA read: yes. A write: yes, as outcome unknown; it is safe to repeat
unexpected queued response: …, the machine closed the idle connection or the idle connection failed: …Before the request was sent, bytes no request asked for were waiting (a reply sent twice or unasked), or the machine had closed or reset the idle connection. The request was not sent; the connection is opened againYes, after reconnect
the machine's data cannot be read: …The answer arrived whole but its data has the wrong shape, for example a record with the wrong number of fields, or a write's acknowledgement that carries data (whether the value was written is not known)A read: yes. A write: yes, as outcome unknown; it is safe to repeat
not connectedThe connection is not upYes, after reconnect

"Retried?" says whether the node's Retry on Fail setting sends the request again. A write whose outcome is unknown is sent again too: writing a value again is safe to repeat. A request MaestroHub refuses before sending, and a counter or tool the machine does not have, give the same answer every time, so they are not retried.

Connection Issues​

SymptomPossible CauseSolution
Test Connection fails with connect to the Brother TC at …Nothing listens at that address and port, or a firewall is in the wayCheck the machine's IP address, the port (10000 by default), and that the port is reachable from the MaestroHub host
Test Connection fails with did not answer a read of D0The port took the connection but answered no Type 2 requestCheck that the port is the machine's Type 2 port
The status signals fail with the MEM A01 record has 8 fields; a Brother TC's has 7The machine is a Speedio, whose status record carries the operation folderUse the Brother Speedio connector
Requests fail with no answer from the machine while the machine is busyThe answer takes longer than the Response TimeoutRaise Response Timeout