Browse our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteria
Basics about RS485 of an industrial PLC
RS-485 's Introduction
RS-485, also known as EIA-485, is defined as a differential multi-point bus system. The RS-485 standard is perfect to transmit data with high speed to ranges until 12m. One of its most important characteristics is that the twisted pair of cables reduce the noise-induced in the transmission line. Multiple receivers may be connected to such a network in a linear, multi-drop bus. These characteristics make RS-485 useful in industrial control systems and similar applications.
Our PLCs for industrial automation have inside the integrated circuit MAX485. This one is a low-power transceiver used for the communication RS-485 that works with a single power supply of 5V and the average current is 300μA. Using Half Duplex communication to convert the TTL level to RS-485 level, it can reach the maximum speed of transmission of 2.5Mbps. Internally we can find a Half Duplex transceiver MAX485 and also a MAX485, in the way that, if we are in Full Duplex, it will use the Half Duplex MAX485 to receive data and the transmitter MAX485 will send it.
We recommend you read the following posts in order to understand the program of this blog. We used the following blog posts to do this example:
How to program our industrial Arduino PLC with Arduino IDE:
Requirements for working with RS-485
In order to work with RS-485 protocol, you will need any of our industrial Arduino PLC controllers for industrial automation:
Industrial Shields controllers:
Configuring the switches and jumpers
We have 2 families of PLCs: M-Duino and Ardbox.
RS-485 in M-Duino
On the M-Duino Family you will always have activated the RS-485 by default, so you will not need to activate it using any switch. The only thing is that you need to select between Full Duplex and Half Duplex, using the last switch (FD/HD).
RS-485 in M-Duino
RS-485 in Ardbox
For the Ardbox family we have two subfamilies. In this one, we have to choose between RS-485 and RS-232 using the switches and jumpers as we show in the following image:
IMPORTANT❗: THE CONFIGURATION OF THE COMMUNICATION IS ALREADY DONE, YOU JUST NEED TO CHOOSE IT WHEN YOU BUY THE DEVICE.
Jumper zone 1: RS-232 / RS-485 HW.
Jumper zone 2: RS-232 SW / Q0.8 and Q0.9.
Jumper zone 1: RS-485 FD / A0.0 and A0.1.
Jumper zone 2: RS-232 SW / I0.2 and I0.3.
Jumper zone 3: RS-232 / RS-485.
After making the hardware configuration, we need to continue with the software configuration and also how we use it. To begin this process, it is necessary to include the library RS485.h founded in our website. After this, in the function setup, please take care to do the right implementation of your communication.
For all families:
To check the RS-485 activation you only have to use the serial monitor from the Arduino IDE using the right sentence inside the setup() function.
It is also important to implement the initialization on the setup() function.
IMPORTANT❗: CHECK THE SPEED OF TRANSMISSION OF PLC-LAPTOP AND PLC-DEVICES.