How to test RS-232 from 7" Raspberry Pi Panel PC
Industrial 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

Introduction

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 post, you will learn how to test with the RS-232 communication protocol from our 7" Industrial Panel PC with another Raspberry Pi PLC controller for industrial automation.

Related Links

How to

Connect Raspberry PLC to Wi-Fi

Read 

Raspberry PLC

Family products

See 

Basics about

Raspberry Pi 4 PLC Analog outputs

Read 

How to

Find your perfect industrial PLC

Read 

Touchberry Pi

Family products

See 

Raspberry Pi automation

7 commands that everyone should know

Read 

Basics test

RS-232 Protocol

1. First of all, let's take the Raspberry Pi based PLC and wire it to your Industrial Panel PC as shown in the picture below. By doing this, you will be able to send any message from any Raspberry Pi industrial PLC to our 7" Panel PC through the RS-232 protocol for industrial control. 

Basic test-How to test RS-232 from 7" Raspberry Pi Panel PC






2. Once your 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: 10.10.10.20, which 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 industrial Raspberry Pi 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 will tell us that the communication was successful!

Successful communication-How to test RS-232 from 7" Raspberry Pi Panel PC



Tip: Try wiring a cable from the RX port from the open source PLC Raspberry Pi to the TX port of the 7" Panel PC. Also, 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
Archive

Looking for your ideal Programmable Logic Controller?

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!