logi.cals#Install Raspberry Runtime

Here is a tutorial to explain how to install the  logi.cals runtime into your raspberry devices.

Although TwinCAT and Codesys are very great tools in the SoftwarePLC field to let you to test anything, It is better to see more different tools in the world:) and think which one is the best for you.Let’s start!

Pre Install Software

Here is some software that can help you to configure your Raspberry in this Tutorial.

  • Putty
  • Tera Term
  • VNC Vewer


Hardware

The Raspberry pi3 that I bought 5 years ago.

Setup

Here is some link to help you to save the time for setting the static ip/enabling ssh/using VNC Server.

RaspberryPI#Enable the SSH Interface without start the OS
RaspberryPI#Set the static ip without starting the OS
Raspberrypi#Using VNC Viewer

Basic

Preferences>Raspberry Pi Configuration.

Locale

Go to Localisation>Set Locale.

Choose your Language and Country.

WLAN Country

you need to use apt-update to get the new packages – Internet connection is a must.

If your device is connecting with Wifi, Go to “Set WLAN Country”.

Set your Country;)

SPI

Go to Interfaces > Enable the Interface that you need to use.

SPI/VNC/Serial Port.. etc.

Static IP

Now you need to set a static IP of your devices.

Click the Network icon>Wireless & Wired Network Settings.

I will connect my device to eth0(LAN).

Set your IP.

Update PI

Enter these commands in Terminal to update your PI.

sudo apt-get update
sudo apt-get install dos2unix
sudo apt-get remove wolfram-engine


RTS 

Here is a full instruction to explain how to install Runtime into Raspberry.

Or you can follow my tutorial also.

https://help.logicals.com/lco3docu/latest/user-documentation/en/kurzanleitungen/raspberry-pi-in-betrieb-nehmen

Download

Access the following link and go to Support > Downloads.

https://www.logicals.com/en/support/downloads

chosse log.RTS.

Raspberry PI is used in this tutorial,Please download logiRTSVxxxx Raspberry Pi file.

Install

Let’s Install the RTS into your pi.

Copy the installation Files

You need to copy the RTS installation files to Raspberry.you can use FTP/USB or anyway you can.

FTP

If you want to use FTP and start-up a FTP server in your PI, please follow this tutorial:

Beckhoff#Using TwinCAT TF6300 to Upload file to Raspberry

USB

I am using USB 😉

Create Directory

create the directory of the Runtime.

sudo mkdir –p /opt/RTS
cd /opt/RTS

Move

move your tar.gz to your PI.

sudo mv /media/pi/AC65-CA60/logiRTS_V5.6.0_Raspbian.tar.gz  /opt/RTS/logiRTS_V2.3.602_Raspbian.tar.gz

Unzip

unzip the tar.gz files.

sudo tar –no-same-owner -xzf logiRTS_V2.3.602_Raspbian.tar.gz 

Remove

you can remove the runtime file now;)

sudo rm logiRTS_V2.3.602_Raspbian.tar.gz 

Config Logging

export RTS_LOG_UDP=YOUR IP:7777
export RTS_LOG_SYSLOG=1

START  logi.RTS

start the Runtime, press enter and until you can input new command again.

cd /opt/RTS/bin/
sudo ./startPLC &

Starting logi.RTS at system start

Create an empty service file for logi.RTS.

sudo nano /lib/systemd/system/logirts.service

Copy the following lines into this file (observe that there are no empty lines inserted by mistake at the beginning of the file):

[Unit]
Description=RTS
# uncomment the following line if your system needs a codemeter stick for the licence
#Requires=codemeter.service
After=multi-user.target

[Service]
Type=simple
WorkingDirectory=/opt/RTS

Environment=”LD_LIBRARY_PATH=/opt/RTS/lib”
# enter the ip address of your development system in the next line, if you want to see RTS traces in the development environment
Environment=RTS_LOG_UDP=127.0.0.1:7777
ExecStart=/opt/RTS/bin/RTSLoader -b /opt/RTS/PLC
Restart=on-failure
RestartSec=1

[Install]
WantedBy=multi-user.target

Save the changes and exit the editor: Press Ctrl+O then press Ctrl+X.

Activating the new service

systemctl daemon-reload
systemctl enable logirts.service

System start by using init script file

Creating an init script file for logi.RTS.

sudo nano /etc/init.d/startPLC

Copy the following lines into this file:

#!/bin/sh
### BEGIN INIT INFO
# Provides: RTSLoader
# Required-Start:
# Required-Stop:
# Default-Start: 5
# Default-Stop: 0 1 2 3 4 6
# Short-Description: Starts RTS
# Description:
### END INIT INFO

case “$1” in
start)
cd /opt/RTS/bin
./startPLC &
echo “Starting logi.RTS”
;;
stop)
sudo pkill RTSLoader
echo “logi.RTS stopped”
;;
*)
echo “Usage: /etc/init.d/startPLC {start|stop}”
exit 1
;;
esac
exit 0

Save the changes and exit the editor: Press Ctrl+O then press Ctrl+X.

Change the permissions for the file.

sudo chmod +x /etc/init.d/startPLC

Convert the file to Unix (so that possibly problematic Windows characters are removed).

sudo dos2unix /etc/init.d/startPLC

Adding init script file to the system start

update-rc.d startPLC defaults

Reboot And Check

The listed processes must include RTSLoader.

ps aux | grep RTS

Download the IDE

Please refer to the following tutorial:

logi.cals#Install your IDE

Load Application

Open your IDE, File> New>logi.CAD 3 Project for Raspberry Pi.

Enter your Project Name.

Open the Instance Tag, Click the RaspbianConfiguration>raspberry.

Change the IP Address.

Press Connect to PLC to online.

Now you are online condition.

Build and Load your Application into runtime.

Click the Play Button to start your Application.

Done!

Footer_Basic

Please Support some devices for my blog

Amazon Gift List

Find ME

Twitter:@3threes2
Email:soup01threes*gmail.com (* to @)
YoutubeChannel:https://www.youtube.com/channel/UCQ3CHGAIXZAbeOC_9mjQiWQ

シェアする

  • このエントリーをはてなブックマークに追加

フォローする