June 5, 2015 | Reliance SCADA
This technical article describes how to connect an Arduino microcontroller to the Reliance SCADA/HMI system.
Because Arduino does not have its own communication protocol, we will use, for example, the Modbus communication protocol to connect it to the Reliance SCADA system. This protocol allows the Reliance SCADA system to read and write any analog and digital values stored in the Arduino microcontroller.
If the connection in our simple example project is successful, the two LEDs used in this project will light up (see the video at the bottom of the article). Physically, the LEDs will be plugged into the microcontroller's outputs 8 and 9 (see the picture Connection diagram).
1. Download and install the Arduino software from the official website www.arduino.cc.
2. Run the Arduino software. Go to Tools and choose the port through which the microcontroller is connected to the computer.
3. Download the Arduino Modbus RTU Slave Library from code.google.com.
4. Add the library to the Arduino application by choosing the Sketch > Include Library > Add .ZIP Library command.
Adding the Modbus library to the application
5. Open the project RelianceModbusExample.ino (available for download from here).
6. Upload the project to the microcontroller by choosing the File > Upload command.
1. Run the Reliance 4 Design development environment and open the example project named Reliance SCADA and Arduino (available for download from here).
2. On the communication channel's Basic page (Managers > Project Structure Manager > Devices > Modbus1 > Channel1), the COM port property's value must be equal to the port number (see Arduino, step 2).
3. Two tags of type Bool are defined within the Modbus1 device (Managers > Device Manager > Modbus1). They will be used to control the LEDs. The value of the RedLED tag's address is set to 7 (8 in the Arduino project), the BlueLED tag address value is set to 8 (9 in the Arduino project).
4. Run the project.