Browse our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteris
Learning the basics about RS485 of an industrial PLC
RS-485, also known as EIA-485, is defined as a differential multi-point bus system; it 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 insinde 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 in 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 to 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 PLC with Arduino IDE: Installing the Industrial Shields's boards in the Arduino ID
Configuring the switches and jumpers
We have 2 families of PLCs: Mduino and Ardbox.
On the Mduino 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).
For the Ardbox family programmable logic controllers, we have the two subfamilies:
In this one, we need to choose between RS-232 and RS-485 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
Ardbox Analog HF+
Jumper zone 1: RS-232 / RS-485 HW.
Jumper zone 2: RS-232 SW / Q0.8 and Q0.9.
Ardbox Relay HF+
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.
The first thing we need to do is to be sure that the industrial arduino PLC is supplied with 12-24Vdc.
Mduino family :
The pins of the PLC that we have to use for RS-485 communication.
Ardbox family :
Ardbox Analog HF+ :
Ardbox Relay HF+ :
The first step is downloading the Arduino based PLC boards for Arduino IDE.
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 .