How to test RS-232 from 7" Raspberry Pi Panel PC
Raspberry PLC & Industrial Panel PC Communications
11 May, 2021 by
How to test RS-232 from 7" Raspberry Pi Panel PC
Boot & Work Corp. S.L., Fernandez Queralt Martinez

7" Raspberry Pi Panel PC



RS-232 is an interface that designates a standard for the exchange of serial binary data between a DTE (Data Terminal Equipment), such a computer, and a DCE (Data Communication Equipment), such a router.

In this blog, you will learn how to test with the RS-232 communication procotol from our 7" Industrial Panel PC with another Raspberry PLC.

Related links

How to connect 
Raspberry PLC to Wi-Fi

Read >>


Basics about Raspberry Pi PLC
analog outputs

Read >>

How to find your
perfect industrial PLC

Read >>

How to program Raspberry PLC
interrupt inputs with Python

Read >>

Raspberry PLC
family products

Read >>

TouchBerry Pi
family products

Read >>

Basic test

RS-232 Protocol

  1. First of all, we are going to take the Raspberry PLC and we are going to wire it to our Industrial Panel PC as shown in the picture below. By doing this, we will be able to send any message from any Raspberry PLC to our 7" Panel PC through the RS-232 protocol. 

Basic test

  2. Once our hardware is ready, let's go into the devices. If you have two screens, you just have to connect an HDMI cable to the HDMI ports from both devices and connect them to the screens. Otherwise, both have a static IP address: which it allows you to connect through SSH.

  3. Open the RS-232 ports in both linux terminals with baudrate 115200 in the /dev/ttyS0 port:

stty sane 115200 -F /dev/ttyS0 raw -echo

   4. From the Panel PC where the RX cable is connected, run the following command to wait for the message to be received:

cat /dev/ttyS0

  5. From the Raspberry PLC where the cable is connected to the TX pin, echo a message to send through RS-232:

echo "OK" > /dev/ttyS0

  6. Finally, this is what you will get in your Industrial Panel PC terminal window, which it will tell us that the communication was successful!

Successful communication

Tip: Try wiring a cable from the RX port from the Raspberry PLC to the TX port of the 7" Panel PC, and reverse the commands to test the RX from the Raspberry PLC and the Tx from the TouchBerry Pi 4.

Want to know the basics about the RS-232 communication protocol with an Arduino PLC?

Check the following link.

How to test RS-232 from 7" Raspberry Pi Panel PC
Boot & Work Corp. S.L., Fernandez Queralt Martinez
11 May, 2021
Share this post

Looking for your ideal PLC?

Take a look at this product comparison with other industrial controllers Arduino-based.

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.

Industrial PLC comparison >>

Do you want more information?

Just fill the form!

Tell me more!