Table of Contents

Arduino IDE · Connecting an HMI with Mitsubishi MC 1C

HMI Connection overview · Arduino IDE setup

The MC Slave in this SDK handles MELSEC A-compatible 1C frame, Format 1 serial ASCII requests. Set the HMI driver to that frame format and to Sum Check enabled. Ordinary MC 3E/4E frame drivers and MC TCP drivers cannot connect to this example. M and D are specified by the device letter and number in the 1C request.

The example on this page uses MPINO-8A4R-S · RS-232 Serial1 · station 1 · 9600 bps · 8N1 and is for Arduino IDE. Check channels and wiring and SDK installation and board selection. The MPINO STUDIO2 Communication settings do not include this protocol.

1. Addresses for the HMI screen

Screen element SDK memory Device and address in the 1C request Request command
Communication check number D0 D0000 Word read WR, repeats 0~99
Number input D1 D0001 Word write WW, 0~9999
Returned value D2 D0002 Word read WR, same as D1
Test switch and lamp M0 M0000 Bit write BW, read BR

D0000 and M0000 in the table are the device code and 4-digit decimal address in the 1C request the core receives. HMI editors display this differently by driver, so confirm that the actual request points to this address. The Modbus address conversion table does not apply to MC. Number format, switch, and lamp settings are covered in Building the HMI Screen.

2. Enter the complete code in a new sketch

This simple example exchanges internal memory values at the 1C addresses above. It does not use any real input or relay output pins.

#include <Arduino.h>
 
unsigned long lastTick = 0;
 
void setup() {
  IMcMem(0, 0, 16, 16);      // X/Y not used; includes M0 and D0~D2
  IMcAdr(0, 0, 0, 0);        // External addresses also start at 0
  IMcInit(Serial1, 1, 9600);
  lastTick = millis();
}
 
void loop() {
  if (M == nullptr || D == nullptr) return;
  IMcProtocol();
 
  unsigned long now = millis();
  if (now - lastTick >= 1000UL) {
    lastTick = now;
    D[0] = (D[0] >= 99) ? 0 : D[0] + 1;
  }
 
  if (D[1] > 9999) D[1] = 9999;
  D[2] = D[1];
}

IMcMem() allocates the memory at startup, and IMcProtocol() handles HMI requests on every loop.

3. Verify, upload, and build the HMI screen

After uploading the sketch, place the HMI elements using the screen example below and the address table above.

D0 communication check number, D1 input, D2 returned value, M0 test switch and lamp

  1. Save the sketch and run Verify in Arduino IDE.
  2. Check Tools → Board and the upload COM port, then select Upload. See Getting Started with Arduino IDE.
  3. In Building the HMI Screen, assign D0000~D0002 and M0000 above to external device elements, then transfer the HMI project.
  4. Turn on the product and the HMI, then test read → write → bit in Checking Operation and Troubleshooting.

The HMI writes D1 and M0, then reads back the product's D2 and M0 to check the result

First confirm that the HMI driver sends 1C, Format 1, Sum Check requests. Expected results and where to look for each symptom are listed in Checking Operation and Troubleshooting.