Quick Start Guide

In this guide you will connect a Siemens PLC to the SDA console via a Raspberry Pi which hosts the gateway application. You will need to configure the PLC beforehand to assign an IP address. This step only has to be performed once, afterwards you can use the SDA console to interact with the PLC.

Setup Gateway

Requirements: You will need the following equipment to get started:

  • Raspberry Pi 3B+ or newer with Raspberry Pi OS

  • SSH connection to Raspberry Pi

Once the PLC has been set up with an IP address, the gateway can be created on the Raspberry Pi. The gateway allows you to see the PLC online in the SDA console.

Create the Gateway in the SDA Console

Generate SDA Account

In order to get started with setting up your gateway, you first need to create an account to access the SDA console.

1. Go to https://www.softwaredefinedautomation.io/

2. Click on Start free trial, enter your details, and click Submit to receive access to the SDA Console.

3. Check your Email for the confirmation code and enter it in the form.

4. You now have access to the SDA console and should see the following screen:

Generate a new gateway

  1. In order to set up a gateway, navigate to the Gateways pane and click "+" (Add New Device).

2. Under "Add New Device" choose "Gateway".

3. Choose a name for the Gateway and click "Save".

4. To set up a hardware gateway, please choose the tab "Ubuntu". Automatically copy the command to your clipboard by clicking on the "command window".

Please note that the command is only valid for 60 minutes.

Configure the Gateway

Connect to the Raspberry Pi via SSH

If you are not directly working on the Raspberry Pi, open a Secure Shell (SSH) using the IP address of the Raspberry Pi:

ssh pi@<IP ADDRESS>

(Optional) Install Docker

If you intend to use the Gateway Setup via Docker, you need to first install Docker on the Raspberry Pi. You can follow this guide on how to install docker on a Raspberry Pi: https://dev.to/elalemanyo/how-to-install-docker-and-docker-compose-on-raspberry-pi-1mo

Install the Gateway Agent on the Raspberry Pi

Run the previously copied connection string on the Raspberry Pi. This command downloads and executes a shell script that automatically sets up the gateway and connects it to the SDA console.

pi@SDAgateway:~ $ curl -s https://console.softwaredefinedautomation.io/gateway/ubuntu/setup.sh | ...
Starting the gateway setup
Create SSM user and configure SSH...
Congratulations, your Gateway was successfully set up.

Once you have executed the connection string, you should be able to see the connected gateway in the SDA console.

After the gateway is created and connected, you can add a control to the gateway. The gateway must be connected to the PLC via the Ethernet cable, and the PLC must have an IP address (see ).

After creating the control, the PLC should be connected. You can verify the connection by clicking "Check Connection".

Create / Upload project

After the PLC is connected, you can upload a project to the SDA console that is deployed to the PLC in the next section.

Create / Upload project

Download the following Siemens S7 file that is preconfigured for the PLC.

In the SDA console, select the IDE version (TIA Portal v17) and select the Siemens .zap17 file you just downloaded. This project, once it is deployed, will trigger the LEDs to blink from left to right. Click "Upload".

Deploy Project

In your project list you can see all the projects linked to your account. You can deploy the project by clicking "Deploy":

This will trigger a deployment job that runs in the background. You can continue with other tasks while the deployment job is running.

You can monitor the progress of the deployment in the deployment history. Once the deployment has finished, its status will change from "running" to "passed".

You should now see the LEDs of your hardware setup blinking from left to right.

Deploy a new Project

Now we can deploy a new version of the project. Download the following file:

Select file in the SDA console and click "Upload" to add this new project.

Finally, click "Deploy" to trigger the deployment job that will reconfigure the PLC. Once the deployment has passed, the LEDs blink from right to left.

Deploy via the API

You can also deploy files via the API, e.g. using the following Jupyter Notebook. Feel free to try it out!

Last updated