Skip to main content

Brother D Series

D Series (D00) controls connect over OPC-UA, which is the recommended method for this series. Enable the OPC-UA server on the control, set a static IP, then point MachineMetrics at it.

Protocol: OPC-UA · Port: 4840 · Endpoint: opc.tcp://<machine_ip>:4840 · Cable: the standard network port on the control

For where the cable goes physically, see Physical Connection in the OPC-UA overview.

Brother controls use a 12-digit numeric IP format

IP addresses are entered without dots, with each octet padded to three digits — 172.22.3.34 becomes 172022003034. Getting this wrong is the most common cause of a Brother connection failing to come up.

If OPC-UA is unavailable

The Brother Adapter in FTP mode also supports D00 when configured with cnc-version: d00. Use it only when OPC-UA cannot be enabled — it collects less data and needs FTP credentials.

Control Setup​

Step 1: Access Communication Menu​

  1. From main screen, press DATABANK soft key
  2. Select 7. Communication parameter
  3. Navigate to Ethernet/FTP settings

Step 2: Configure Static IP​

  1. 0202 - Use DHCP → Set to No
  2. 0203 - IP address → Enter the IP as a 12-digit number, padding each octet to three digits and omitting the dots:
    • 172.22.3.34 → 172022003034
    • 10.1.50.200 → 010001050200
  3. 0204 - Mask bit → Typically 255.255.255.0

Brother D-Series Ethernet/FTP settings — IP address and DHCP configuration (page 1 of 4)

Step 3: Configure Network Access​

  1. 0004 - Display slave command alarm → Set to No
  2. 0216 - Restrict Ethernet access → Set to No

Brother D-Series Ethernet/FTP settings — Restrict Ethernet access setting (page 2 of 4)

Step 4: Enable OPC-UA​

Navigate to final Ethernet/FTP menu screen:

  1. 0235 - OPC UA server function → Set to Valid
  2. 0236 - Security communication for client → Set to 2: Type2
  3. 0237 - OPC UA security communication → Set security level:
    • 0: No - No username/password (simplest)
    • 1-5 - RSA/AES encryption with authentication

Brother D-Series Ethernet/FTP settings — OPC UA server function and security communication (page 4 of 4)

Step 5: Save Settings​

  1. Press Save and end (bottom left)
  2. Or use Overwrite save to continue editing

⚠️ Critical: If you don't save, all changes are lost on shutdown/reboot.

Brother D-Series Ethernet/FTP settings — Save and end / Cancel options

Step 6: Verify Connectivity​

  1. Press MONITR soft key
  2. Select 3. Communication monitor

Brother D-Series Production monitor menu — select Communication monitor (item 3)

  1. Look for Ethernet (OPC UA) in Port column
  2. Message column should show:
    • Sending completed
    • Data sent
    • Output request received

Brother D-Series Communication monitor — Ethernet (OPC UA) activity log confirming active connection

Step 7: Check Ethernet Information​

  1. In MONITR menu, select Ethernet information
  2. Verify displays:
    • IP Address (as configured)
    • Subnet Mask
    • Gateway
    • MAC Address
    • DHCP status

MachineMetrics Setup​

With the OPC-UA server running on the control, add the machine's endpoint in MachineMetrics.

  1. Go to Assets → Machines and open the machine.

  2. On the Data Collection tab, add an OPC-UA data collection method and select the Edge device that will connect to this machine.

  3. Enter the connection string, using the IP you set on the control — in normal dot notation here, not the control's 12-digit format:

    opc.tcp://[ip-address]:4840

    For example: opc.tcp://10.103.112.62:4840

  4. Set the security policy to match 0236 — Security communication for client on the control. Type2 is the usual value.

  5. Test the connection, then save.

MachineMetrics OPC-UA integration configuration for Brother D-Series

Sample Adapter Script​

Paste this into the adapter script field on the data collection method. It is a working starting point for a D00 control — it reads four nodes and derives execution state, program identity, part count, feedrate override and controller mode from them.

version: 2
type: opc-ua
read-mode: polling

tags:
MEM:
path: ns=3;s=NC/MemoryOperation/MEM
wkcntr:
path: ns=3;s=NC/ProductionMonitor/WKCNTR
PDSP:
path: ns=3;s=NC/System/PDSP
mode:
path: ns=3;s=NC/System/Mode
variables:
execution:
- source: MEM
- pattern-match:
pattern: /^(?:[^,]*,){3}\s*([^,]+)/
group: 1
- state:
- ACTIVE: this == 1
- READY: true
program-name:
- source: MEM
- pattern-match:
pattern: /^(?:[^,]*,){1}\s*'([^']+)'/
group: 1
program-number:
- source: MEM
- pattern-match:
pattern: /^(?:[^,]*,){2}\s*'([^']+)'/
group: 1
part-counter:
- source: wkcntr
- pattern-match:
pattern: /^(?:[^,]*,){2}\s*([^,]+)/
group: 1
nc-mode:
- source: mode
feed-ovr:
- source: PDSP
- pattern-match:
pattern: /^(?:[^,]*,){115}\s*([^,]+)/
group: 1
program:
- source: program-name
data-items:
- execution
- program-name
- program-number
- part-counter
- feed-ovr
- nc-mode
- program

How the script works​

Brother's D00 OPC-UA server does not expose one node per value. Instead, each of the nodes above returns a single comma-separated string containing many fields, so the script reads the node once and then uses pattern-match to pull individual fields out of it by position.

The regular expressions all follow the same shape. /^(?:[^,]*,){3}\s*([^,]+)/ means "skip three comma-separated fields, then capture the next one" — so changing the number in {3} changes which field you read. That is why feed-ovr uses {115}: the feedrate override sits at that offset in the PDSP string.

NodeWhat it carriesFields used
NC/MemoryOperation/MEMMemory operation statusRunning state, program name, program number
NC/ProductionMonitor/WKCNTRWorkpiece countersPart count
NC/System/PDSPPosition and display dataFeedrate override
NC/System/ModeController modeUsed directly, no parsing needed

A few notes on adapting it:

  • read-mode: polling is deliberate. The adapter subscribes to value changes by default, but polling is the reliable choice on these controls. See Read Options to tune scan-interval alongside it.
  • Verify the field offsets on your machine. The positions above were observed on a particular control and firmware. If a value reads back wrong or empty, browse the node, look at the raw comma-separated string, and count the fields to find the correct offset.
  • execution is intentionally coarse — it reports ACTIVE while the program runs and READY otherwise. Add further states to the state block if your process needs them.
  • Namespace index ns=3 is typical for this server, but confirm it when browsing. See Browsing OPC-UA Servers if the paths don't resolve.

After saving, map the resulting data items (particularly part-counter) to the correct MachineMetrics data types under Machine Settings → Data Mapping.

Setting Up the Part Counter​

The sample script's part-counter reads the control's workpiece counter, so it only moves if the counter on the control increments once per finished cycle. D00 controls have four workpiece counters; these steps use counter 1.

Set the counter values on the control​

  1. Press MONITR and open Workpiece counter.
  2. For counter 1, set the current value to the parts already made in this run (or 0 for a new run).
  3. Optionally set the target (shown as completion) to the run quantity, for the operator's reference on the control.

Make the program increment the counter​

The counter does not count on its own. A program arms it with an M-code, and the control adds to it when the program ends:

  • M211 arms counter 1 (M212–M214 arm counters 2–4).
  • When the program reaches M02 or M30, each armed counter goes up by its count value (#3801 for counter 1).
  • Arming is cleared by M02/M30, the RESET key, power-on, or M221–M224, so the M-code has to run in every program cycle. A cycle that is reset part-way through is not counted.

Add these two lines just before the program end:

O1000 (WORKPIECE COUNTER EXAMPLE)
...
(MACHINING)
...
#3801=1 (PARTS PRODUCED PER CYCLE)
M211 (ARM WORKPIECE COUNTER 1)
M30 (COUNTER 1 INCREMENTS HERE)

If a cycle produces more than one part, such as a fixture holding four parts, set #3801 to that number so each program end adds the right amount.

Add it to your post processor

Rather than editing programs by hand, add the #3801 and M211 lines to your CAM post processor's program-end section so every program you post counts the same way. If your post supports user-defined properties, expose the parts-per-cycle value as a property so programmers can set it per job.

Workpiece counter variables​

Each counter's values can be read and written from a program as macro variables:

CounterCount (added per cycle)Current valueTarget (completion)Arm / cancel
1#3801#3802#3803M211 / M221
2#3811#3812#3813M212 / M222
3#3821#3822#3823M213 / M223
4#3831#3832#3833M214 / M224

Check the count in MachineMetrics​

Run a cycle and compare part-counter in MachineMetrics with counter 1's current value on the control. If they differ, browse the NC/ProductionMonitor/WKCNTR node, find the field that matches counter 1's current value, and adjust the offset in the part-counter pattern (see How the script works).