Explore
First of all, we are going to take a look at the base station and make sure you can get it connected to your PLC.
Open a workspace and load the public system called “Production Line: Base station”.
Base system components
The system has some assemblies that we are going to take a look at.

The base assembly includes just the table where the rest of the components are placed.
The conveyor_1 to conveyor_3 assemblies are almost identical and they all include a little conveyor with a sensor and a DC motor. The motor is connected to a DC contactor in the control box and the conveyor. While the sensor is connected to the PLC.

Inside the control box we have the power supply, circuit breaker, safety relay, PLC and the contactors for the conveyor motors. We will take a closer look at some of these components during the course.

Finally, the assembly called HMI includes some pushbuttons, a selector and an emergency stop. The pushbuttons, their lights and the selector are connected to the PLC.

Connect to PLC
As mentioned before, inside the control assembly you will find the PLC. It has 16 digital inputs and outputs and 4 analog inputs and outputs. This PLC component uses OPCUA for communicating with real CPUs or SoftPLCs.
[If you don’t know how to connect to a PLC using OPCUA, take a look at these other courses that may be interesting for you][e]
In this stations just digital inputs and outputs are used, so you can take a look at the drawings, the port connections or the IO list below to understand how all components are connected to the PLC.
IO List:
Address | Input |
| Address | Output |
I0.0 | S01 Start button |
| Q0.0 | H01 Start light |
I0.1 | S02 Stop button |
| Q0.1 | H02 Reset Light |
I0.2 | S03 Reset button |
| Q0.2 |
|
I0.3 | S04 Manual selector |
| Q0.3 | KM01 Conveyor 1 forward |
I0.4 | S04 Automatic selector |
| Q0.4 | KM02 Conveyor 2 forward |
I0.5 | Emergency Circuit OK |
| Q0.5 | KM03 Conveyor 3 forward |
I0.6 |
|
| Q0.6 |
|
I0.7 | B01 Sensor conveyor 1 |
| Q0.7 |
|
I1.0 | B02 Sensor conveyor 2 |
| Q1.0 |
|
I1.1 | B03 Sensor conveyor 3 |
| Q1.1 |
|
I1.2 |
|
| Q1.2 |
|
I1.3 |
|
| Q1.3 |
|
I1.4 |
|
| Q1.4 |
|
I1.5 |
|
| Q1.5 |
|
I1.6 |
|
| Q1.6 |
|
I1.7 |
|
| Q1.7 |
In order to transfer the digital inputs and outputs between Simumatik and the PLC we just need to define the specific variable names. By default, these variables are called digital_input_1, digital_input_2, digital_output_1, and digital_output_2.
Check connection: Green light
Before we continue to the next step, let’s create a project for your PLC. Define the necessary variables, set up the OPCUA communication and create a program in the language you prefer. Something very simple is enough to check the communication in both ways between the PLC and Simumatik, so let’s make the Green button light (S01) switch on when the button is pressed.
The example below shows the result when programming a simple network in LADDER language using Codesys.

