Pi4IoT / CODESYS_Serial

CODESYS - Raspberry - Arduino – RS232(USB)

Home Page:https://youtu.be/AeyhBszlmOY

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CODESYS_Serial

CODESYS - Raspberry - Arduino – RS232(USB)

RS232

Arduino Program
CODESYS Program

This example demonstrates how serial communication can be implemented, how ports are opened, closed on Raspberry Pi to communicate with Arduino via COM Port RS232 by using CODESYS.

The Demo set the light of the LED bar and read out the temperature from the thermocouple.

First of all you need to download the free The CODESYS Development System (you need to register) after install it, you need to download CODESYS Control for Raspberry Pi SL (free version runs for 2h and the you need it to restart)

Links:

CODESYS Development System
CODESYS Control for Raspberry Pi SL

Important

After install Codesys on Raspberry you need to edit the file “CODESYSControl.cfg” as following: sudo nano /etc/CODESYSControl.cfg


[SysCom]

Linux.Devicefile=/dev/ttyACM
portnum := COM.SysCom.SYS_COMPORT1


Save it and restart the codesys controller
sudo /etc/init.d/codesyscontrol restart

About

CODESYS - Raspberry - Arduino – RS232(USB)

https://youtu.be/AeyhBszlmOY


Languages

Language:C++ 100.0%