Skip to Content

Choosing your development environment: Arduino IDE and the Industrial Shields board package

Before writing a single line of control logic, you need a development environment that can talk to an M-Duino or Ardbox over USB. This lesson sets that up: the Arduino IDE, the Industrial Shields board package, and a first upload that switches a real output.

What you will learn

  • Install the Industrial Shields board package in the Arduino IDE.
  • Select the exact PLC model and understand why that choice matters.
  • Upload a sketch and confirm it works on a real output.
  • Diagnose the three most common first-upload failures.

You need: an M-Duino or Ardbox, a USB cable, the power supply specified in your model's datasheet, and a computer with the Arduino IDE.

Which Arduino IDE version to use

Industrial Shields boards are added to the Arduino IDE through a board package, the same mechanism used for any third party Arduino compatible hardware. Use Arduino IDE 1.8.0 or higher. If the documentation of your PLC model pins a specific board package version, install that version rather than the latest one, to avoid compatibility issues with the bootloader.

Installing the Industrial Shields board package

  1. Open the Arduino IDE and go to File > Preferences.
  2. In Additional Boards Manager URLs, add this address and confirm with OK:
    http://apps.industrialshields.com/main/arduino/boards/package_industrialshields_index.json
  3. Open Tools > Board > Boards Manager and search for industrialshields.
  4. You will see up to three packages: AVR, ESP32 and megaAVR. For M-Duino and Ardbox, install the AVR package, then close the Boards Manager.

Once installed, your PLC family and model appear under Tools > Board. Selecting the exact model matters: it defines the pin mapping and memory layout of your hardware and gives you ready-made names for every input and output, plus the libraries for the communication ports, instead of a generic Arduino board.

How the I/O names work

Industrial Shields documents its terminals with names such as Q0.1 or I0.0. In code, replace the dot with an underscore: Q0.1 becomes Q0_1. The board package maps that name to the real Arduino pin for your model, which keeps your sketch readable and portable between models.

Your first upload: blink a digital output

With the correct board selected and the PLC connected over USB, select the serial port under Tools > Port and upload this sketch. It is the industrial version of blink: it toggles a digital output instead of an onboard LED, so you confirm the upload path end to end on real I/O.

void setup() {
  pinMode(Q0_0, OUTPUT);
}

void loop() {
  digitalWrite(Q0_0, HIGH);
  delay(1000);
  digitalWrite(Q0_0, LOW);
  delay(1000);
}

Q0_0 is the name of the first digital output of your model. Using the name instead of a raw pin number is deliberate: if you later move the sketch to a different M-Duino or Ardbox model, it still points to the right output.

Expected result: the output indicator LED of Q0_0 turns on and off every second (on relay models you will also hear the relay click). If nothing happens, go to the checklist below.

What to check if the upload fails

Most first-upload failures come from one of three causes, check them in this order before suspecting a hardware fault:

  1. Wrong board model selected. Re-check Tools > Board against the label on your PLC.
  2. Missing USB to serial driver for your operating system, so the port never appears under Tools > Port.
  3. Board package version mismatch with the bootloader installed on your PLC.

Next lesson: where each of these named pins sits physically on the board, so wiring and code line up. Take the quiz below first to check what you have learned.

Rating
0 0

There are no comments for now.

to be the first to leave a comment.