Fabrik 2020 Deutsch S7-1500 EN 20220729
Fabrik 2020 Deutsch S7-1500 EN 20220729
Activity booklet
1
Contents
Introduction p. 4
Industry 4.0 New developments for Training Factory Industry 4.04.0 p. 6
Getting started p. 8
The individual factory components p. 9
Vacuum Suction Gripper 24V (VGR) p. 9
Automated high-bay warehouse 24V (HBW) p.10
Environmental sensor p.10
Multi-processing station with kiln 24V (MPO) p.11
Sorting line with colour recognition 24V (SLD) p.12
Environmental station with surveillance camera 24V (SSC) p.14
Surveillance camera in multi-processing station p.15
Environmental sensor and photo resistance in high-bay warehouse p.15
Input/output station with colour detection and NFC Reader 24V (SSC) p.15
TXT controller with adapter board p.16
Factory status display p.16
Block diagram of the factory p.17
Network structure of the factory p.18
Commissioning and adapting the SIMATIC controller CPU1512SP p.19
Commissioning and adapting the SIMATIC controller CPU1516F
with ET200SP on PROFINET IRT p.35
Connecting the Training Factory Industry 4.04.0 to the Internet p.55
Connecting the nano Router TP-Link (WR802N) in WISP mode p.55
Training Factory Industry 4.0dashboard in the fischertechnik cloud p.66
User log-in p.66
Cloud connection p.67
Factory dashboard p.69
Dashboard camera p.72
Environmental station dashboard p.73
Operating the factory with the fischertechnik cloud p.76
Task 1 p.77
Task 2 p.78
Task 3 p.81
Task 4 p.81
Task 5 p.82
Task 6 p.84
Task 7 p.85
Task 8 p.86
2
Training Factory Industry 4.0fischertechnik Node-RED dashboard p.87
Calibrating the system in the Training Factory Industry 4.0 fischertechnik
Node-RED Dashboard p.92
Component description p.98
Factory module assignment plans p.109
Programming tasks p.123
Programming task 1 p.124
Programming task 2 p.134
Programming task 3 p.136
Programming task 4 p.138
Programming task 5 p.140
Programming task 6 p.142
Programming task 7 p.145
3
Introduction
Digitisation in industrial production
calls for stronger networking and
smarter information at all levels of
production. With fischertechnik
Training Factory Industry 4.04.0,
these digitisation activities can be
simulated, learned and applied on a
small scale before they are
implemented on a large scale.
A highly flexible, modular, inexpensive and robust training and simulation model
which is extremely easy to use.
After workpieces are ordered via the dashboard in the fischertechnik cloud,
they go through the individual factory modules. The current status is shown in
the fischertechnik cloud. The integrated environmental sensor reports values
for temperature, humidity, air pressure and air quality. The camera sees the
entire system through the vertical and horizontal pan range and can thus be
used for web-based remote surveillance.
4
Individual workpieces are tracked using NFC (Near Field Communication): A
unique identification number (ID) is assigned to each workpiece. This enables
traceability and visibility of the current status of the workpieces in the
machining process.
Note: Control systems from other manufacturers may also be used. Then, the
source codes can be imported to create the programs, depending on the
controller used. These are available at:
https://github.com/fischertechnik/plc_training_factory_24v/PLC_SCL_sources
.
5
Industry 4.0 New developments for Training Factory Industry 4.04.0
The popular, fully-automated fischertechnik factory
simulation is the basis for developing Training Factory
Industry 4.04.0. Here is a link to a video for anyone
interested in the simulation, or anyone just getting started
working with it. The video provides a good overview of how
the system works:
https://youtu.be/BApxuYlsT_w
The vacuum suction gripper fits the stacker crane with workpieces. This stores
the workpieces in the high bay, sorted by colour Next, the workpieces are
brought to the multi-processing station where they are processed. Then the
machined workpieces are sorted by colour in the sorting line and transported
to storage locations. From there, the vacuum suction gripper transports the
workpieces back to the high-bay warehouse. This is a never-ending,
repetitive cycle.
fischertechnik cloud
- IoT gateway (Raspberry Pi) with Node-RED
- Using NFC/RFID to identify workpieces
- Integrated WiFi router
- Presenting and using data on a dashboard in the fischertechnik cloud
- Displaying data and calibrating the stations in a Node-RED dashboard
- Displaying the current system status via a traffic light
6
The individual innovations are explained in more detail in the following chapters.
The following variants are still available for Learning Factory 4.0 24V:
• 554868 Learning factory 4.0 24V
Learning Factory 4.0 24V without PLC and without PLC connection board.
• 560841 Learning Factory 4.0 24V with PLC connection board
Learning Factory 4.0 24V without PLC but with PLC connection board and a desktop power supply
24V, 280W. A separate PLC can be connected via the PLC connection board.
• 560840 Learning Factory 4.0 24V compl. with PLC S7-1500
Learning Factory 4.0 24V complete with PLC S7-1500 with PLC connection board and a desktop power
supply 24V, 280W.
First steps
Once you have carefully unpacked the Learning Factory 4.0 and removed
the transport lock, carry out a visual inspection to see whether any
components have become loose or damaged during transport. Attach
any loose components back in the right place. Check whether all cables
and hoses are connected. You can connect non-connected cables
correctly with the aid of the assignment diagrams.
7
554868 Learning Factory 4.0 24V
Connect the Learning Factory adapter boards to
the PLC. This can be done using either flat ribbon
cables at the corresponding 34-pole ST1
connectors or via the terminals.
Note: For further details on the assignment diagrams, see the
chapter Assignment diagrams for the factory modules.
8
560841 Learning Factory 4.0 24V with PLC connection board and
560840 Learning Factory 4.0 24V compl. with PLC S7-1500
Connect the PLC using the two cables provided. The connections are marked (I) and (II) on both the model
and the PLC connection board.
Note: For further details on the assignment of the connection cables, see the chapter Assignment diagrams
for the factory modules.
Connect the PLC SIMATIC S7-1500 to the nano router TP-link using one of the network cables provided and use
the second network cable to connect the PLC to the IOT Gateway (Raspberry Pi 4), see illustration.
9
Now prepare the 24V power supply for the Learning Factory 4.0:
560841 Learning Factory 4.0 24V with PLC connection board and
560840 Learning Factory 4.0 24V compl. with PLC S7-1500
The 24V power supply is connected via the 6-pole connection on the PLC board. Now plug the 24V power
supply into the socket.
Check the fuses on the PLC connection board. The six LEDs at the edge of the PLC connection board now
have to light up green.
Switch the PLC and the TXT controller on (ON/OFF) to test them. If everything is working, the display should
start up, the PLC and the TXT controller boot and the control lamps light up.
Finally, equip the high-bay shelf with the 9 empty black containers provided.
10
The individual factory components
This chapter introduces the individual factory components and briefly explains their function.
The Association of German Engineers (VDI) defines industrial robots in VDI Guideline 2860 as follows:
“Industrial robots are universally applicable multi-axis motion machines whose movements with respect
to movement sequence and paths or angles are freely programmable and, if necessary, sensor-guided (i.e.,
without mechanical or human intervention). They can be equipped with grippers, tools or other means of
production and can perform handling and/or manufacturing tasks”.
11
Automated high-bay warehouse 24V (HBW)
Environment sensor
The environmental sensor was built on the base plate of the high-bay warehouse for space
reasons. The electrical connections, however, are on the TXT controller.
12
Multi-processing station with kiln 24V (MPO)
Kiln
Milling
The workpiece automatically passes
Suction
Ejector through several stations that
simulate different processes in the
multi-processing station with kiln.
Mini motor
Different conveyor technologies,
Conveyor
such as a conveyor belt,
Kiln slider
Turntable
turntable and a vacuum suction gripper are used. The machining process starts with the kiln.
To initiate processing, the workpiece is placed on the oven pusher. In doing so, the
photoelectric barrier is interrupted, which causes the kiln door to open and then retract the Photo-transistor
kiln slider. At the same time, the vacuum suction gripper, which brings the workpiece to the
turntable after the firing process, is requested. Following the firing process, the kiln gate is re-
opened and the oven slide re-extended. The positioned vacuum suction gripper that is already Buttons
in place picks the workpiece up, transports it to the turntable and places it there. The turntable
positions the workpiece under the miller, lingers there for the machining time and then moves
the workpiece to the pneumatically-actuated ejector. The ejector pushes the workpiece onto
the conveyor belt, which conveys the workpiece to a photoelectric barrier and then to the Vacuum
sorting system. Passing through the photoelectric barrier causes the turntable to return to its
original position and for the conveyor belt to stop with a time delay.
The program runs in parallel. The system is divided into the three units: Kiln, vacuum suction
gripper, and turntable. The individual processes communicate with one another, ensuring,
for instance, that no collisions occur.
Compressor
For example, the kiln triggers the movement of the vacuum suction gripper at two points in
the program sequence, which ensures that the vacuum suction gripper is not only in the right
spot at the right time, but also that it does not reach into the void. Likewise, the turntable is
activated after the workpiece has been deposited by the vacuum suction gripper.
Cylinder
3/2-way solenoid
valve
13
Sorting line with colour recognition 24V (SLD)
Colour recognition
The sorting line with colour
recognition is used to
Ejector automatically separate
workpieces of different
Compressor
colours. Components with
the same geometry but of
different colours are fed to
the conveyor belt via a
Cylinder
colour sensor
Bearing locations
3/2-way solenoid
and then separated by colour. A motor drives the conveyor belt and an impulse sensor valve
measures the conveying path. Pneumatic cylinders, which are assigned to the
corresponding storage locations and operated by solenoid valves, eject the
workpieces. Several photoelectric barriers control the flow of the workpieces and
whether there are workpieces in the storage locations.
Buttons
Colour detection is carried out using an optical colour sensor that emits light, and
determines the colour of a surface based on reflections from the surface. Thus, the colour
sensor is strictly a reflection sensor that indicates how well a surface reflects light. The
measured value of the sensor is therefore not proportional to the wavelength of the
measured colour and assigning colour coordinates or colour spaces (for example RGB or Photo-transistor
CMYK) is not possible. In addition to an object’s colour, ambient light, the object’s surface
and the distance of the object from the sensor affect the quality of the reflection. This is
why it is critical that the colour sensor is protected from ambient light and the surfaces of
the objects are comparable.
Colour sensor
It is also important that the sensor is installed perpendicular to the surface of the object.
Distinguishing among the coloured workpieces is done in thresholds that compare the
measured values of the individual colours against each other. Since the value ranges of
different colour sensors differ, these limit values must be adjusted.
Mini motor
Both the process and the conveyor belt start if a workpiece is placed on the conveyor belt
and the workpiece interrupts the photoelectric barrier. For a colour to be recognised, the
workpiece passes through a darkened lock in which a colour sensor is installed. During
this time interval, the minimum value of the measured colour values is determined and
assigned to the workpiece. In the time required for the workpiece to pass the colour
sensor, the previous minimum value is compared with the current measured value, which
may then replace the earlier measured value.
The photoelectric barrier, which is located before the first ejection point, controls whether
14
a workpiece is ejected. Depending on the detected colour value, the corresponding
pneumatic cylinder is time-delayed triggered after the workpiece interrupts photoelectric
barrier. Next, the pulse button is activated. It registers the rotation of the gear that drives
the conveyor. Unlike a time-based delay, this approach is robust in withstanding conveyor
speed fluctuations. The ejected workpieces are fed through three slides to the respective
depositories.
The storage locations are equipped with photocells that recognize whether the storage
location is filled or not. However, the photocell cannot determine how many workpieces
are in a storage location.
15
Environmental station with surveillance camera 24V (SSC)
Camera
The camera can be rotated using a virtual joystick and it
can be tilted to monitor the factory. The images are also
displayed on the monitor screen.
16
Surveillance camera in the multi-processing station p
Input/output station with colour detection and NFC Reader 24V (DPS)
17
The photoelectric barrier at the input station detects whether a workpiece to be stored in
it is present. If this is the case, the information is sent to the
continuing program (vacuum suction gripper picks up the workpiece).
Before the workpiece is processed any further, the colour sensor determines of the
workpiece colour.
After colour detection, different data are assigned to the workpiece. To detect a
Colour sensor
workpiece’s colour, the vacuum suction gripper places the workpiece on the NFC reader.
First, all data in the memory is deleted and the workpiece marked
as raw. Photo-transistor
The reader then writes data relevant to the workpiece on the
NFC tag NTAG213 in the workpiece.
If one or more workpieces are ordered, they will be sent to the output area after various tasks have been carried
out. Previously, additional production data for each workpiece could be stored in the available memory on the
NFC tag.
The TXT controller and an adapter board to connect the environmental sensor and photo
resistor are also located on the input / output station. The camera is also connected here
via a USB interface. Adapter board
TXT controller
Factory status display
18
Block diagram of the factory
The block diagram shows you
how the individual factory
components communicate
with each other and how the
system is integrated with the
Internet and the fischertechnik
cloud. The block diagram also
shows which information the
user can retrieve via his PC,
tablet or smartphone.
In the Training Factory Industry 4.04.0 24V, three different controllers communicate with one another, and
are connected to one another via a Switch/Router.
• PLC (process control of the model, PLC program)
• IoT gateway (Node-RED environment as adapter between OPC/UA and MQTT, dashboard to control
the model)
• TXT controller (fischertechnik sensors and connection to the fischertechnik cloud)
The PLC (not included in the scope of delivery) contains process control for the entire Learning Factory.
Since the MQTT interface in the PLC controller is not a standard interface, an additional IoT-Gateway
(Raspberry Pi) with a Node-RED environment serves as an adapter to the MQTT interface. The PLC acts as
a server, providing the data required to the IoT Gateway via the OPC/UA standard interface in the local
network. The IoT Gateway then forwards the messages to the TXT controller.
The TXT controller serves as a gateway to the fischertechnik cloud https://www.fischertechnik-cloud.com.
In addition, the components camera, RFID/NFC reader, environmental sensor, BME680 and a brightness
sensor are connected here and deliver data to the cloud.
Users can access the dashboard for the Node-RED application in the IoT gateway via a web browser.
19
Network structure of the factory
The following image represents the network structure and the standard IP addresses used:
The Training Factory Industry 4.0can be connected to wireless WiFi via a nano router TP link (WR802N) in
WISP mode (hotspot router mode) to a wireless WAN. The Ethernet interface of the nano router must have
an IP address of: 192.168.0.252 and is connected to the PLC (IP: 192.168.0.1). The IOT gateway must have
IP:192.168.0.5, and is also connected to the PLC.
DHCP is activated on the nano router, ensuring that the TXT controller is always supplied with the same IP
address 192.168.0.10. Details on settings for the nano router are provided in the section Connecting Training
Factory Industry 4.04.0
NTP time synchronisation can also be completed via the Internet NVP server. Remote maintenance is not
possible.
20
Commissioning and adapting the SIMATIC controller CPU1512SP
The next few pages show how to connect the programmable logic controller (PLC) SIMATIC S7-1500 to the CPU
1512SP and how to load the program solution for complete factory operation.
This program solution is available as archive LearningFactory_4_0_24V_V02.zap16 for the TIA Portal V16, and is
the standard solution for the Training Factory Industry 4.04.0. However, the solution can also be adapted very
easily. for example, it can be adapted to different configurations with different CPUs in the SIMATIC ET200SP
series, or with different ET200SP input/output modules.
21
The program solutions are available at:
https://github.com/fischertechnik/plc_training_factory_24v/PLC_S7_1500_exerci
es
Note:
This section describes an example of commissioning for a SIEMENS SIMATIC S7-1500 controller with CPU1512SP.
If a different controller is used, then other software tools must be used to create, and load the programs, and to
operate the Training Factory Industry 4.04.0.
The source codes can be imported to create the programs, depending on the controller used. These are available
at:
https://github.com/fischertechnik/plc_training_factory_24v/PLC_SCL_souces
.
22
Status and error indicators
The CPU 1512SP-1 PN and Bus-Adapter BA 2xRJ45 are equipped with the following diagnostic LEDs:
Note: We recommend only inserting or removing the SIMATIC Memory Card into/from the CPU when it is powered
down.
23
Resetting the controller and setting the IP address
Before you can load program solutions to the SIMATIC S7-1500, you should reset it to default settings and set the
IP address of the CPU 1512SP.
The following steps can be used to reset the CPU 1512SP to default settings.
→ First, switch off the power supply to the controller and then remove the SIMATIC Micro Memory
Card inserted in the CPU 1512SP.
→ To delete all program data from the SIMATIC Micro Memory Card in the CPU, you can simply insert
the SIMATIC Memory Card into a common SD card reader and delete data on the card using
Windows Explorer.
→ Then, insert the SIMATIC Memory Card back into the CPU 1512SP and switch on the power supply
to the controller.
Note: We recommend only inserting or removing the SIMATIC Memory Card into/from the CPU when it is powered
down. Otherwise, it may be damaged.
Note: You should not format the SIMATIC Memory Card, just delete the data.
24
To be able to program a SIMATIC S7-1500 controller from a laptop/PC from the CPU, you will need a TCP/IP
connection.
It is important for the IP addresses of the two devices to match, to ensure the computer and SIMATIC S7-1500 can
communicate with one another via TCP/IP.
First, we will show you how to set the IP address of a computer using a Windows 10 operating system.
→ Mark the network symbol below in the task bar and then click → Network settings.
→ In the network settings window that opens, click → Ethernet and then click → Change adapter
options.
25
→ Select the desired → LAN connection you want use to connect the controller, then click →
Properties.
26
→ Now you can use the following IP address, for instance → IP address: 192.168.0.99 and enter the
following → subnet mask 255.255.255.0. Then accept the settings by pressing → OK.
Now, you can assign the IP address to the CPU1512SP as shown in the following steps.
→ Connect your laptop/PC directly to one of the three Ethernet interfaces on the CPU1512SP and
switch on the power supply to the controller.
→ Now, start the Totally Integrated Automation Portal by double clicking on it. ( → TIA Portal V16)
27
→ Select → Online&Diagnostics and then open the → Project view.
→ In the project navigation, select the previously set network card under → Online access. When
you click → Update available devices, you will see the IP address (if already set) or the MAC
address (if the IP address has not yet been assigned) for the connected SIMATIC S7-1500. Here,
select → Online&Diagnostics.
28
→ You will find → Assign IP address under → Functions. Here, enter the following IP address, for
instance: → IP address: 192.168.0.1 → Subnet mask 255.255.255.0. Now, click → Assign IP address
and your SIMATIC S7-1500 will be assigned this new address.
→ The → Info → General window provides messages on the status of address assignment.
29
Open the program solutions for the Training Factory Industry 4.04.0
Open the program solutions for the Training Factory Industry 4.04.0 using the following steps.
→ In the menu of the TIA portal, select → Project → Open and then → Search.
→ Then, click the compressed V16 project → LearningFactory_4_0_24V and select a target path on
your computer to unpack the project there.
30
Adapting the hardware configuration
The project is now open and will be displayed in the project navigation at left.
If your hardware components differ from those in the program solutions, these components must be adjusted in
the TIA portal.
→ To do so, first open the → Device configuration.
→ Mark one of the different components and then click → Exchange device.
31
→ You will then see a dialogue where you can select from compatible devices.
You must select the correct BaseUnit for the signal modules:
- Use potential group for the left module (dark BaseUnit)
- Facilitate new potential group (light BaseUnit)
→ You can change these settings under → Properties → General → Potential group.
32
Load the control program to the CPU1512SP
→ To load your entire CPU, including hardware configuration and program solutions, to the device,
mark the → PLC [CPU1512SP-1 PN] folder and click the → Load to device symbol.
33
→ The Manager will open for configuring connection properties (expanded loading). First, select the correct
interface. This involves three steps.
Then, activate the field → Display all compatible devices, and start the search for devices on the network
by clicking the → Start search button.
34
→ First, you will see a preview with information on the loading process, data security, etc... Continue with →
loading.
→ Now, select the option → Start assembly before completing the loading process with → Complete.
Finally, you can check online to ensure the configuration was loaded correctly. Then, set the time in the CPU if the
set NTP server is not available for automatic time synchronisation.
→ Mark the CPU → PLC[CPU 1512SP-1 PN] and select → Connect online.
35
Note: The symbol should be green here if there are no errors.
→ To set the time, open → Online & Diagnostics, then select → Set time under → Functions and then
→ Accept, to adopt the time from your laptop/PC.
36
Commissioning and adjusting the SIMATIC controller
CPU1516F with ET200SP on PROFINET IRT
The next few pages show how to connect the programmable logic controller (PLC) SIMATIC S7-1500 to the CPU
1516F-3 PN/DP and how to load the program solution for complete factory operation.
This solution includes a decentralised connection of system signals to an ET200SP, which communicates with the
CPU via PROFINET IRT (Isochrones Realtime). This section also describes commissioning of this ET200SP.
This program solution is available as archive LearningFactory_4_0_24V_PROFINET_V02.zap16 for the TIA Portal
V16, and is an alternative solution for the Training Factory Industry 4.04.0.
However, the solution can also be adapted very easily. for example, it can be adapted to different configurations
with different CPUs in the SIMATIC S7-1500 series, or with different ET200SP input/output modules.
37
The program solutions are available at:
https://github.com/fischertechnik/plc_training_factory_24v/PLC_S7_1500_exercises
Note:
This section describes an example of commissioning for a SIEMENS SIMATIC S7-1500 controller with CPU 1516F-3 PN/DP.
If a different controller is used, then other software tools must be used to create, and load the programs, and to
operate the Training Factory Industry 4.04.0.
The source codes can be imported to create the programs, depending on the controller used. These are available
at:
https://github.com/fischertechnik/plc_training_factory_24v/PLC_SCL_sources
.
① LED indicators for the current operating status and diagnostic status of the CPU
② Display
③ Operating buttons
38
Status and error indicators
The CPU is equipped with the following LED indicators:
① LED indicators for the current operating status and diagnostic status of the CPU
② Display connection
③ Slot for the SIMATIC Memory Card
④ Operating mode switch
⑤ LED indicators for the 3 ports on the PROFINET interfaces X1 and X2
⑥ MAC addresses of the interfaces
⑦ PROFIBUS interface (X3)
⑧ PROFINET interface (X2) with 1 port
⑨ PROFINET interface (X1) with 2 ports
⑩ Connection for supply voltage
⑪ Attachment screws
39
Note: The front flap with display can be removed and inserted while operations are ongoing.
The S7-1500 CPU has a front flap with a display and operating buttons. Controlling and status information can be
shown on different menus on the display, and a wide variety of settings can be changed. Use the operating buttons
to navigate through the menus.
The CPU display offers the following functions:
● You can select from 6 different display languages.
● Diagnostic messages are shown in clear text.
● Interface settings can be changed on site.
● A password can be assigned to operate the display via the TIA portal.
Note: We recommend only inserting or removing the SIMATIC Memory Card into/from the CPU when it is powered
down.
40
Structure and operation of the SIMATIC ET 200SP
The decentralised peripheral device SIMATIC ET 200SP is a modular, decentralised peripheral system for
connecting the process signals to a central automation system like SIMATIC S7-1500.
Decentralised peripheral devices are often used when signals need to be transmitted across a large distance, and
when this requires a large amount of wiring work. This allows signals to be collected in a decentral manner on
site and connected to the central controller via a bus system. The ET 200SP is connected via PROFINET IRT
(Isochrones Realtime) for the solution program for the Training Factory Industry 4.04.0.
The decentralised peripheral device ET 200SP is mounted on a standard profile rail ⑦ and is composed of an
interface module ① with bus adapter ⑥,up to 32/64 peripheral modules inserted on BaseUnits ②, ③ ④ and a
final server module⑤.
The decentralised peripheral devices provide inputs and outputs for on-site process connection that can be read
and written by the central assembly via PROFINET. The I/O assemblies are queried normally in the S7 program via
the input addresses (%I) and output addresses (%Q) are addressed.
Further details on the programming software and PROFINET are provided in the SIEMENS handbooks at:
http://support.automation.siemens.com.
41
Resetting the controller and setting the IP address
Before you can load program solutions to the SIMATIC S7-1500, you should reset it to default settings and set the
IP address of the CPU 1516F-3 PN/DP.
The following steps can be used to reset the CPU 1516F-3 PN/DP to default settings.
→ First, switch off the power supply to the controller and then remove the SIMATIC Micro Memory
Card inserted in the CPU 1516F-3 PN/DP.
→ To delete all program data from the SIMATIC Micro Memory Card in the CPU, you can simply insert
the SIMATIC Memory Card into a common SD card reader and delete data on the card using
Windows Explorer.
→ Then, insert the SIMATIC Memory Card back into the CPU 1516F-3 PN/DP and switch on the power supply
to the controller.
Note: We recommend only inserting or removing the SIMATIC Memory Card into/from the CPU when it is powered
down. Otherwise, it may be damaged.
Note: You should not format the SIMATIC Memory Card, just delete the data
42
To be able to program a SIMATIC S7-1500 controller from a laptop/PC from the CPU, you will need a TCP/IP
connection.
It is important for the IP addresses of the two devices to match, to ensure the computer and SIMATIC S7-1500 can
communicate with one another via TCP/IP.
First, we will show you how to set the IP address of a computer using a Windows 10 operating system.
→ Mark the network symbol below in the task bar and then click → Network settings.
→ In the network settings window that opens, click → Ethernet and then click → Change adapter
options.
43
→ Select the desired → LAN connection you want use to connect the controller, then click →
Properties.
44
→ Now you can use the following IP address, for instance → IP address: 192.168.0.99 and enter the
following → subnet mask 255.255.255.0. Then accept the settings by pressing → OK.
Now, you can assign the IP address to the CPU 1516F-3 PN/DP as shown in the following steps.
→ Connect Port 1 of the Ethernet interface [X1] on the CPU 1516F-3 PN/DP with Port 1 of the Ethernet
interface on the ET200SP. Connect your laptop directly to Port 2 of the Ethernet interface [X1] on
the CPU 1516F-3 PN/DP. Switch on the power supply to the controller. The other components of the
Training Factory Industry 4.0can be connected to Port 2 of the Ethernet interface on the ET200SP.
Note: A correct network topology is required here, since this topology was determined for PROFINET IRT
communication in the project.
→ Now, start the Totally Integrated Automation Portal by double clicking on it. ( → TIA Portal V16)
45
→ Select → Online&Diagnostics and then open the → Project view.
→ In the project navigation, select the previously set network card under → Online access. When
you click → Update available devices, you will see the IP address (if already set) or the MAC
address (if the IP address has not yet been assigned) for the connected SIMATIC S7-1500. Here,
select → Online&Diagnostics.
46
→ You will find → Assign IP address under → Functions. Here, enter the following IP address, for
instance: → IP address: 192.168.0.1 → Subnet mask 255.255.255.0. Now, click → Assign IP address
and your SIMATIC S7-1500 will be assigned this new address.
→ The → Info → General window provides messages on the status of address assignment.
47
Open the program solutions for the Training Factory Industry 4.04.0
Open the program solutions for the Training Factory Industry 4.04.0 using the following steps.
→ In the menu of the TIA portal, select → Project → Open and then → Search.
48
Adapting the hardware configuration
The project is now open and will be displayed in the project navigation at left.
If your hardware components differ from those in the program solutions, these components must be adjusted in
the TIA portal.
→ To do so, first open the → Device configuration.
49
→ Mark one of the different components and then click → Exchange device.
→ You will then see a dialogue where you can select from compatible devices.
50
→ To see an overview of associated IP addresses in a project, click the → Display addresses symbol
You must select the correct BaseUnit for the signal modules of the ET200SP:
- Use potential group for the left module (dark BaseUnit)
- Facilitate new potential group (light BaseUnit)
→ You can change this setting in the → Device view of the ET200SP under → Properties
→ General → Potential group.
51
Load the control program to the CPU 1516F-3 PN/DP
The following steps can be used to load the CPU 1516F-3 PN/DP.
→ Before you continue, you should click the → Save project button to save your project.
→ To load your entire CPU, including hardware configuration and program solutions, to the device,
mark the → PLC [CPU 1516F-3 PN/DP] folder and click the → Load to device symbol.
→ The Manager will open for configuring connection properties (expanded loading). First, select the
correct interface. This involves three steps.
Then, activate the field → Display all compatible devices, and start the search for devices on the
network by clicking the → Start search button.
52
→ First, you will see a preview with information on the loading process, data security, etc... Continue
with → loading.
53
→ Now, select the option → Start assembly before completing the loading process with → Complete.
Assign the device name for the PROFINET- IO- Device ET200SP
The device name is used by the IO-Controller CPU 1516F-3 PN/DP to detect the IO-Device ET200SP and establish
communication. Because of this, it must be assigned separately.
Use the following steps to do so.
→ In the → Network view, mark the ET200SP with the device name → factory_PROFINET and select
Note: The IP address set in the project is assigned later by the CPU 1516F-3 PN/DP controller when establishing
the communication connection.
54
→ Online access must be set correctly in the dialogue used to assign PROFINET device names. Then,
you can select the device and filter by devices of the same type. If a new device is connected, the
list must be updated. ( → PROFINET device name: factory_profinet → Type of PG/PC interface:
PN/IE → PG/PC interface: here: Intel(R) Ethernet Connection … → Only display devices of the
same kind → Update list). Determine the right device using the MAC address printed on the device
before marking it, then click → Assign name to assign the device name.
Finally, check online to ensure the configuration was loaded correctly and the PROFINET device was successfully
connected by the controller. Then, set the time in the CPU if the set NTP server is not available for automatic time
synchronisation.
55
→ Mark the CPU → PLC[CPU 1516F-3 PN/DP] and select → Connect online.
→ To set the time, open → Online & Diagnostics, then select → Set time under → Functions and then
→ Accept, to adopt the time from your laptop/PC.
56
Connecting Training Factory Industry 4.04.0 to the Internet
To connect Training Factory Industry 4.04.0 to the internet and thereby to the fischertechnik cloud, connect
the nano Router TP-Link in WISP mode (Hotspot Router Mode) to a wireless WAN.
Then, you can access the Dashboard of the fischertechnik cloud via mobile devices like a tablet,
smartphone, laptop, or PC.
PLC
Fischertechnik
Cloud
USB
alternativ
e
57
The TP-Link must be configured to connect the nano Router TP-Link in WISP
mode (Hotspot Router Mode) to a wireless WAN.
Use your PC or a tablet to do so.
Important: Unplug your computer’s (WiFi capable) existing internet connection with the router. To do so,
unplug the Ethernet LAN cable from the computer, and terminate any existing WiFi connection.
The nano Router TP-Link is permanently installed in your system. You must first perform a reset before you
integrate (configure) it into your working environment. Unplug the plug for the power supply on the TP-Link,
then plug it back in so that it restarts. The green light will flash on the TP-link. Use a pointed object (small
screwdriver) to press the reset button for 5 seconds. The lamp will go off. The TP-Link will restart. The lamp
will flash again.
58
In the next step, activate the displayed TP-link. An additional
context menu will appear. Select the→Connect button.
The next step is to check the security key and the TP-link is now
connected to your computer via WiFi.
The last pop-up window will show you that the connection is
successful.
59
Next, you need to configure the TP-link for your network. To do
this, open a WEB browser (Firefox or Chrome).
Access the page http://tplinkwifi.net Important note: Do not enter www. before the address
and go to this page. The following page will appear:
Enter “admin” as the user name and “admin” as the password, and confirm by pressing “Log In”.
60
The password should not be changed, otherwise it has to be changed on the TXT Controller. Confirm by
pressing → Next
Then, select → Operation Mode → WISP and confirm the selection with → Next.
61
For the → WAN Connection Type, select → Dynamic IP and confirm the selection with → Next.
Next, the → AP List will appear with nearby available WiFi Access Points (APs). Select your WiFi access point by
clicking → Connect
62
Adopt the → Client Settings and → AP Settings with → Next.
Note: The AP Settings should not be changed; otherwise the settings of the TXT controller will have to be adjusted.
You can take the Client Settings and Wireless Password from the configuration pages for your WiFi access point,
or request them from your network administrator.
Then you will see an overview of settings. Adopt them by clicking → Finish.
63
Confirm the following message by clicking → OK.
The settings will be saved, and the system will restart (rebooting).
64
The status screen will open once the reboot is done. You can read different values for the status of the LAN and
WiFi connection here.
65
Then, set the IP address of the nano Router on LAN and for DHCP.
To do so, select → Network in the menu at left and then → LAN. Assign the TP-Link the
→ IP address 192.168.0.252 with the → Subnet Mask 255.255.255.0.
Then, activate → DHCP by clicking → Enable and change the settings displayed here for the IP addresses. Accept
these settings with → Save.
66
Once the TXT controller is switched on, it will be displayed in the → DHCP Clients List with its MAC and IP address. If
it is not, turn on the TXT controller, wait until it has started up, and then update the view by clicking → Refresh.
The TXT controller should have a fixed IP address of 192.168.0.10. In the → Address Reservation menu, this address
can be re-assigned under → Edit and then adopted by clicking → Save.
Now, you can unplug the WiFi connection to the nano Router TP link.
67
Training Factory Industry 4.0dashboard in the fischertechnik
cloud
The dashboard can be accessed and operated via mobile devices such as tablets and
smartphones as well as laptops and PCs. It enables factory scenarios to be displayed
from three different perspectives:
Customer view
Supplier view
Production view
User login
www.fischertechnik-cloud.com
. The two best Internet browsers to use are “Firefox” or “Google Chrome”.
Enter the address (URL). It will now appear on the following screen.
Important: If this page doesn’t load, press “CTRL + F5” at the same time to reload the
page. This is a general browser problem.
68
Click “here” to log in for the first time:
After signing up, you will be able to log in using your user name and
password. As soon as you have done this, the dashboard will start
up. After carrying out the next item, the dashboard will populate with
data.
Cloud connection
Only one TXT controller will link from the Training Factory Industry 4.04.0 to the
cloud, which also controls the movable camera. The WiFi connection to the
nano Router TP-link is a default setting.
69
If the TXT controller is able to connect to the cloud, then a QR-code and
pairing code will display. You now have 30 minutes to add your TXT controller
to your account in the cloud. If this period of time elapses before you have
done this, you will have to start all over with the pairing process.
You can scan the QR code, e.g., by using the “Quick Scan” app, whereupon you
will be automatically directed to the fischertechnik cloud.
70
Factory dashboard
You can change the sequence of the individual screens to adjust your
requirements.
Click this button to close or expand the main menu for the cloud.
71
The individual windows and their functions at a glance:
Inventory
Order
72
Factory status
Production status
But you can also hang a workpiece and read out the
data of the NFC tag.
73
Dashboard camera
Camera
The “Camera” screen displays the camera
section of your factory.
Camera control
Take a snapshot
The “Snapshot for the Current Image” button lets you place the current image
in the Gallery screen.
Gallery
All the images you have created are
saved in the “Gallery” window. Use the
arrow keys to scroll through the gallery.
The current picture is displayed zoomed.
Click “Delete” to remove an image from
the gallery.
Use the command “Download” to store the image for further use. Specify a storage
location in the context menu that opens.
74
Dashboard Environmental Station
In addition to the camera function, you can view and process the information
from the environmental sensor.
The "Current air quality” window lets you see a value of the
air quality, which is indicated by the three rectangles. The
displays will be switched on depending on the quality of the
air when it is measured. Green means that the air quality is
very good; green and yellow indicate that it is good; yellow
means satisfactory; yellow and red signify that the air quality
is adequate and red means that the air quality is bad.
You will get a graphical representation of the measured values if you select “Graph”. Use the scroll
bar to scroll through all recorded data.
Current brightness
The “Current brightness” window displays a
brightness value in %, as well as the time at which the
measured value was taken. Also visible are the
brightness variations.
75
Current air pressure
Current humidity
The “Current humidity” window displays a
value for relative humidity as a %.
Current temperature
The "Current temperature" window displays
the current temperature (ambient
temperature) of the measuring sensor in ° C.
Other buttons
Use this button to zoom the current window to full screen mode.
76
This button shows and hides the left status bar.
The button shows which profile you are logged in under. Clicking on
the arrow will bring up a context menu. Here, you can select
“Profiles” or “Logout”. Selecting “Profiles” will open another context
menu in which you can set settings for your profile. Click “Logout" to
log out of the fischertechnik cloud.
A context menu for selecting the language will display if you activate the arrow
that comes after “DE”.
The status bar shows three selections that you can activate by clicking on them.
The first two buttons let you choose whether you want to work with the factory
simulation dashboard or just the environmental station dashboard.
Activating the "Settings" button will display a context menu where you can view
and change various parameters relating to your TXT controller.
77
Operating the factory with the fischertechnik cloud
To start factory operation, first load the PLC
program and then set CPU1512SP to RUN.
This is described in the section Commissioning and adapting the SIMATIC controller CPU1512SP.
Then start the application on the TXT controller as described here:
“TxtGatewayPLC”
Control at end: The program on the TXT Controller must run. This is recognizable
by the red symbol on the controller display.
Then the IOT gateway should be restarted. Do so using the “fischertechnik Node RED Dashboard”. In
the “HMI – Main” view, click in the “Factory Control via OPCUA” window to easily switch the
power supply on and off.
Once the programs on the PLC, the IOT gateway and the TXT Controller are started, the Training Factory Industry
4.04.0 will be ready for operation.
78
You will learn to operate the factory and the dashboard by carrying out the
following tasks.
Task 1
9x
79
Task 2
Then the vacuum suction gripper moves to the storage position, picks up the raw
material and moves it to the NFC reader.
At this point, all data is deleted that is located on the NFC tag for the raw
material (already described).
80
The raw material colour is determined in the next step. To
do this, the vacuum suction gripper moves the raw material
over the colour sensor. The data is then available to the
NFC reader for further processing. Before the raw material
is stored, the determined colour data and further
information such as delivery data and quality controlling data are written on
the NFC tag using the NFC reader. Since both factory modules (delivery and
vacuum pads) are still active, this will continue to be displayed in green on the
production process dashboard.
81
The “Production process” dashboard window shows the next
steps in the storage process. The icons for all active factory
modules light up in green when the factory modules are in
action.
Look at the following dashboard window - TXT: Order raw material, TXT: Inventory and TXT: Order.
TXT: Inventory
You will now see a white stone displayed in the storage system in the
“TXT: Inventory status” dashboard window This means that you can
order this workpiece as a customer and have it processed.
82
Task 3
Task 4
Store additional raw materials for storage in the high-bay warehouse. You
still need two white and one red workpieces.
83
Task 5
Put yourself in the position of a customer, who, for example, would like to
order a white workpiece. Order a white workpiece.
To do this, click on the blue “Purchase order” button in the “TXT: PO”
dashboard window.
84
On the way to the sorting device, the workpiece
undergoes colour detection.
Raw material is taken from the high-bay warehouse and fed to the processing
process.
A machined workpiece is sorted by colour and the NFC reader provides it with
workpiece-relevant data.
The workpiece is ready for delivery and can be removed from the system.
85
Task 6
A white stone has accidentally fallen off the high bay and you want to know
what data was written on the NFC tag.
The system must be at rest to do this. Place the workpiece on the NFC
reader and activate the “Read NFC” button in the “TXT: NFC Reader”
dashboard window.
If necessary, you can delete the data using the “Delete NFC”
button.
86
Task 7
Evaluate data from your environmental station. To do this, first show the data
in the graph area of the dashboard view. Save the data as a
.csv file and use it in a spreadsheet program.
Determine data on
brightness of the environment in
your factory.
87
Task 8
Use the built-in camera to monitor your factory. Move the camera around your
factory and take 2 pictures of the factory. Save an image for documentation.
Delete unnecessary pictures from the gallery.
The buttons used for this task have already been explained
previously in the description of the dashboard.
Move the camera around your factory. Move the vertical and
horizontal axes of your camera using the “blue arrow buttons”.
Select 1 picture from the gallery, one that you would like to further
process in an image editing program. To do this, click on the
“Download” button
. A context menu appears in which you specify the storage
location and the file name.
88
Training Factory Industry 4.0fischertechnik Node-RED dashboard
The fischertechnik Node-RED dashboard is designed to be a local HMI operating interface (Human
Machine Interface) in a local network (LAN). It can be started easily in a web browser (recommended:
Firefox or Chrome) by entering:
192.168.0.5:1880/ui
(IP address of the IoT gateway: Port 1880 / ui as the name of the application)
In the “Factory Control via OPCUA” window, you can click to reset assignment of the high-bay
warehouse.
Click to restart the IOT gateway. This is required when the PLC program has been restarted.
89
HMI – HBW Positions
The positions of the stacker crane in the automated high-bay warehouse station (HBW) can be calibrated
and monitored in this menu.
90
HMI – SSC Positions
The positions of the camera in the sensor station with camera (SSC) can be calibrated and monitored in
this menu.
HMI - Calibration
The colour sensors in the sensor station with camera (SSC) and the colour sensor and positions on the
sorting line with colour detection (SLD) can be calibrated in this menu.
91
HMI – Config Data
After calibrating the colour sensors and positions, the data in the “Save Data” window from the PLC can
be stored in a *.csv file in this menu.
The calibration data from a *.csv file can be loaded to the PLC in the “Load Data” window.
ft Cloud
The fischertechnik cloud can be accessed in this menu. There must be an internet connection to do so.
92
Training Factory Industry 4.04.0 – Overview
The camera image and the sensor data are displayed in this menu.
In addition, a camera controller is available in the “Camera Control” window.
An order for a white, red, or blue workpiece can be executed in the “Order” window.
Errors can be acknowledged and commands to delete, read and write NFC tags can be executed in the
“Factory Control” window.
93
Calibrating the system in the Training Factory Industry 4.0fischertechnik Node-RED Dashboard
If positions in the individual factory modules are no longer correct, or if the colour sensors need to be
recalibrated, this can be completed in the fischertechnik Node-RED dashboard of the Learning Factory.
94
Calibrating positions on the sorting line with colour detection (SLD):
The positions to push out the workpieces in the sorting line with colour detection (SLD) are calibrated in
the “SLD push out counter” window in the dashboard under “HMI - calibration”.
The process is started by activating “Calibrate
push out” .
Then, first test whether the current positions are
correct for all 3 colours (white/red/blue).
Do so by placing the workpieces on the start of the
conveyor belt. The conveyor belt will then
transport the workpiece past the colour sensor to
the set positions on the relevant ejection point. The
part is ejected there.
If the position is not correct, it can be corrected and adopted by clicking . Then the test
should be completed again. Repeat this process as long as necessary for all 3 colours
(white/red/blue) until the positions are correct.
95
Calibrating a position on the sensor station with camera (SSC):
The camera positions in the sensor station with camera (SSC) are calibrated in the windows “move to
position”, “Position Centre” and “Position HBW” in the dashboard under “HMI - SSC Positions”.
The process is started by activating
“Activate pos. move” .
Then, one of the two positions “Centre”
(central position looking toward the vacuum
suction gripper) or “HBW” as shown here
(position with view of the high-bay
warehouse) can be selected.
If one of the positions is not correct, it can be corrected in the “Position Centre” or “Position HBW”
windows. Then the test should be completed again.
Repeat this process until all positions are correct.
96
Calibrating a position for the vacuum suction gripper (VGR):
The positions of the 3-axis robot in the vacuum suction gripper station (VGR) are calibrated in the
dashboard under “HMI - VGR Positions”. Here, there are the window “move to position” and 13 windows
for the positions
“Position Colour Reader”, “Position DSI
collect”, “Position DSI discard”,
“Position DSO collect”, “Position DSO
discard”, “Position HBW collect”,
“Position HBW discard”, “Position
MPO”, “Position NFC”, “Position NOK”,
“Position SLD white”, “Position SLD red”
and “Position SLD blue”.
97
If one of the positions is not correct,
it can be corrected in the position
windows, here for example “Position
DSO”. Then the test should be
completed again.
Repeat this process until all positions
are correct.
Only the positions Rack A1, Rack B2 and Rack C3 are approached and calibrated in the warehouse.
The other 6 position values are calculated on this basis.
98
The process is started by activating “Activate pos.
move” .
Then one of the positions, for example position “Rack
B2” (position B2 in the warehouse) can be selected.
99
Components description
The most important components of the factory modules are described on the following pages.
Actuators
Both encoder motors and fischertechnik-specific mini motors are installed in
the individual stations.
Encoder motor:
100
Mini motor
Compressor:
101
3/2-way solenoid valve:
3/2-way solenoid valves are used to control the pneumatic cylinders. These
switching valves have three connections and two switching states. A coil (a)
that works against a spring (c) carries out the switching operations. When a
voltage is applied to the coil, the coil’s mounted core (b), which is mounted so
that it can slide, moves against the spring and thereby opens the valve due to
the Lorentz force.
In this case, opening means that the compressed air
connection (current designation: 1, old name: P) is connected
to the cylinder port (2, formerly A). If this voltage drops, the
spring pushes the core back and closes the valve again. In
this position, the cylinder port (2, formerly A) is connected to
the vent (3, formerly R). The figure shows a schematic
representation of the 3/2-way solenoid valve.
102
Pneumatic cylinders:
The factory has a total of 5 single-acting cylinders with spring installed. These are
controlled by the 3/2-way solenoid valves. A piston divides the volume of the
cylinder into two chambers on pneumatic cylinders. A pressure difference
between these two chambers results in a force that acts on the piston, thereby
displacing it. This shift corresponds to a volume change in both chambers.
Installing a return spring saves on a second air connection with 3/2-way valve.
When the 3/2-way solenoid valve is opened, the air produced in the compressor
flows to port 1 on the cylinder and pushes the piston forward against the spring
force. To do this, the piston rod extends forwards. When the solenoid valve closes
the air supply, the spring pushes the piston back to the initial position.
Vacuum cups:
The suction function on the vacuum suction device is achieved by using two
pneumatic cylinders which are controlled by means of a 3/2-way solenoid valve.
In order to generate a negative pressure, i.e., a pressure which is lower than the
ambient pressure, two cylinders are mechanically coupled in the vacuum gripper.
If a cylinder is then subjected to overpressure, both piston rods extend, resulting
in an increase in volume in the chamber that the vacuum closes. This increase in
volume causes a pressure drop in this chamber.
Mini-button:
Mini-pushbuttons are used as reference switches. They are used for position
determination using a point-to-point movement, for example, at the turntable. The
miniature pushbutton used here is equipped with a changeover contact and can
be used both as a normally closed contact and as a make contact.
Pressing the button creates a conductive connection between
contact 1 and contact 3, whereas the connection between contact 1
and contact 2 is disconnected. The figure shows the schematic circuit
diagram of the mini-pushbutton.
103
LED
An LED is an electronic component which converts electrical energy into light. The abbreviation LED stems
from the English “Light Emitting Diode”.
This LED’s light frequency controls a photo-resistor. The "+" and "L” identify the module.
Another feature is the vitreous body. It bundles rays, so that the light beams hit the photo-
transistor in parallel to one another, and not scattered.
Sensors
Photo-transistor
Photo-resistor
sensors
104
Environment sensor
The data is continuously measured and stored in a CSV file that can be opened in Excel, for example. The
values can be viewed in the fischertechnik cloud.
Colour sensor
Colour sensors are used in the automation technology to check the colour or
a colour print. For example, this is done to ensure that the correct components
were installed. The fischertechnik colour sensor emits white light, which
different colour surfaces reflect to different degrees. The photo-transistor is
used to measure the intensity of reflected light and
a voltage value between 0 V and 9 V is output. The measured value depends on
the ambient brightness as well as the distance of the sensor from the coloured
surface. The connection is made via three cables. The red cable is attached to a
9V output (generated from 24V), the green cable is connected to ground, and the
black cable for the measured value is connected to a 0-10V analogue input on the
PLC. This measured value (0-9 V) is digitised into a whole number between 0 and
24883.
105
NFC-Tags NTAG213 22mm
Each workpiece has its own unique ID and displays the following data: Status,
colour and time stamp from delivery to dispatch. This information is saved on the
tags. The tags are integrated into the workpiece, which lets them be used directly.
PN532 V3 NFC-reader
Personal data is protected in an account with password access that uses extremely secure "OAuth2"
industry standard. All data sent to the cloud is transmitted encrypted with certificates (https standard, green
lock in web browser).
Camera
106
TXT controller
The complete performance data for the TXT controller can be viewed at
www.fischertechnik.de/simulieren, here are the most important features:
107
24V adapter board
There is an adapter board on every Factory module for connecting to the PLC; it is structured as follows:
V1 V2 V3 V4
Relay for
Terminals for Bi-directional
Valves Motors
If a different controller besides a PLC SIMATIC S7-1500 is used, such as an Arduino, the following requirements
must be fulfilled.
- Interface to the adapter board compatible with 24V
- Maximum cycle time of 10 ms
108
Assigning the 17x2 header (ST1) for PLC connection:
Terminals
+24V (actuators) 1 2 +24V (sensors)
0V (GND) 3 4 0V (GND)
I1 5 6 I2
I3 7 8 I4
I5 9 10 I6
I7 11 12 I8
… 13 14 …
15 16
Q1 17 18 Q2
Q3 19 20 Q4
Q5 21 22 Q6
Q7 23 24 Q8
… 25 26 …
27 28
29 30
31 32
GND 33 34 GND
109
Pulse width modulation:
Bi-directional motors are converted via a relay and can be supplied either via 24V (actuators) or the associated
PWM terminal.
High-bay Vacuum suction Processing station Sorting line Sensor station with
warehouse gripper (VGR) (MPO) (SLD) camera (SSC)
(HBW)
PWM 1 Conveyor belt Y(Vertical) Turntable - not assigned - - not assigned -
PWM 2 X(Horizontal) Z(Horizontal) - not assigned - - not assigned - Camera height
PWM 3 Y(Vertical) X(Turn) - not assigned - - not assigned - Turn camera
PWM 4 Cantilever Suction (Horizontal) - not assigned - - not assigned -
110
Factory module assignment plans
Assignment plan for the vacuum suction gripper
111
Model wiring
Header ST2
7 Turn reference 1
I3
2 24V (Sensor) 2
21 Turn clockwise 3
Q5/Q6 (M3)
22 Turn anti-clockwise 4
3.4 GND 5
Encoder power supply
2 24V (Sensor) 6
Signal A
13 A 7 Signal B
14 B 8
3.4 GND 9
Q7 (compressor)
23 Compressor 10
3.4
Terminal V4
24 Q8 (Valve vacuum)
red = power supply
yellow = Motor poles reversible via relay
112
Assignment plan for automated high-bay warehouse (HBW)
Q5/Q6 + B3/B4
I4
Q1/Q2
I5
Q7/Q8
I5
Q3/Q4 + B1/B2
I2
113
Model wiring
114
Assignment plan for the multi-processing station with kiln (MPO)
Q10
I9 Q4
I1
O14
I8
Q7/Q8
I4 Q3
I1
I2
I3
Not shown: Q1, Q2, Q5, Q6, Q9, Q11, Q12, Q13, I4, I5, I6, I7
115
Terminal Function Designation Clamp I/O address Variable name
no. (ST1) SPS S7-1500 S7-1500
Power supply (+)
1 24V DC
actuators
Power supply (+)
2 24V DC
sensors
3 Power supply (-) 0V
4 Power supply (-) 0V
Reference switch
5 turntable (suction I1 DI1.7
position) %I1.7 IX_MPO_RefSwitchTurnTable_PosVac_I1
Reference switch
6 turntable (conveyor I2 DI2.0
belt position) %I2.0 IX_MPO_RefSwitchTurnTable_PosBelt_I2
Light barrier end of
7 I3 DI2.1
conveyor belt %I2.1 IX_MPO_LightBarrierEndOfConBelt_I3
Reference switch
8 turntable (saw I4 DI2.2
position) %I2.2 IX_MPO_RefSwitchTurnTable_PosSaw_I4
Reference switch
9 suction (turntable I5 DI2.3
position) %I2.3 IX_MPO_RefSwitchVac_PosTurnTable_I5
Reference switch
10 I6 DI2.4
oven feeder inside %I2.4 IX_MPO_RefSwitchOvenFeederInside_I6
Reference switch
11 I7 DI2.5
oven feeder outside %I2.5 IX_MPO_RefSwitchOvenFeederOutside_I7
Reference switch
12 I8 DI2.6
vacuum (kiln position) %I2.6 IX_MPO_RefSwitchVac_PosOven_I8
13 Light barrier kiln I9 DI2.7 %I2.7 IX_MPO_LightBarrierOven_I9
Turn motor turntable
17 Q1 (M1) DO3.0
clockwise %Q3.0 QX_MPO_M1_TurnTableClockwise_Q1
Turn motor slewing
18 Q2 (M1) DO3.1
ring anti-clockwise %Q3.1 QX_MPO_M1_TurnTableCounterclockwise_Q2
Conveyor belt motor
19 Q3 (M2) DO3.2
forwards %Q3.2 QX_MPO_M2_ConveyorBeltForward_Q3
20 Motor saw Q4 (M3) DO3.3 %Q3.3 QX_MPO_M3_Saw_Q4
Retract oven feeder
21 Q5 (M4) DO3.4
motor %Q3.4 QX_MPO_M4_OvenFeederRetract_Q5
Extend oven feeder
22 Q6 (M4) DO3.5
motor %Q3.5 QX_MPO_M4_OvenFeederExtend_Q6
Vacuum towards oven
23 Q7 (M5) DO3.6
motor %Q3.6 QX_MPO_M5_VacuumTowardsOven_Q7
Vacuum towards
24 Q8 (M5) DO3.7
turntable motor %Q3.7 QX_MPO_M5_VacuumTowardsTurnTable_Q8
25 Lamp kiln Q9 DO4.0 %Q4.0 QX_MPO_LightOven_Q9
26 Compressor Q10 DO4.1 %Q4.1 QX_MPO_Compressor_Q10
27 Valve vacuum Q11 DO4.2 %Q4.2 QX_MPO_ValveVacuum_Q11
28 Valve lowering Q12 DO4.3 %Q4.3 QX_MPO_ValveLowering_Q12
29 Valve kiln door Q13 DO4.4 %Q4.4 QX_MPO_ValveOvenDoor_Q13
30 Valve feeder Q14 DO4.5 %Q4.5 QX_MPO_ValveFeeder_Q14
31 PWM turntable PWM (M1) DO9.0 %QW23 QW_MPO_PWM_TurnTable_M1
32 PWM vacuum PWM (M5) DO9.1 %QW25 QW_MPO_PWM_Vacuum_M5
116
Model wiring
Terminal Header ST1 Ribbon cable Sensors + actuators on model
5 Turntable reference button 1
I1
2 24V (Sensor) 2
6 Turntable reference button 3
I2
2 24V (Sensor) 4
7 Light barrier end of conveyor belt 5
I3
2 24V (Sensor) 6
17 Turn motor turntable clockwise 7
Q1/Q2 (M1)
18 Turn turntable anti-clockwise 8
3.4 GND 9
2 24V (Sensor) 10 Light barrier lamp
9 Vacuum reference button 11
I5
2 24V (Sensor) 12
8 Turntable reference button pos. saw 13
I4
2 24V (Sensor) 14
3.4 GND 15
Q3 (M2)
19 Conveyor belt 16
3.4 GND 17
Q4 (M3)
20 Saw 18
not assigned 19
not assigned 20
ST2
not assigned 1
not assigned 2
21 Retract oven feeder 3
Q5/Q6 (M4)
22 Extend oven feeder 4
10 Oven feeder inside 5
I6
2 24V (Sensor) 6
11 Oven feeder outside 7
I7
2 24V (Sensor) 8
12 Vacuum on oven 9
I8
2 24V (Sensor) 10
23 Vacuum to oven 11
Q7/Q8(M5)
24 Vacuum to turntable 12
3.4 GND 13
Q9 (oven light
25 Lamp kiln 14
3.4 GND 15
Q10 (compressor)
26 Compressor 16
13 Oven light barrier 17
I9
2 24V (Sensor) 18
3.4 GND 19
Light barrier lamp
2 24V (Sensor) 20
117
3.4
Terminal V1 Q11 (Valve vacuum)
27
3.4
Terminal V2 Q12 (lower valve)
28
3.4
Terminal V3 Q13 (oven door valve)
29
3.4
Terminal V4 Q14 (feeder valve)
30
118
Assignment plan for the sorting line using colour recognition (SLD)
I3
A4
Q2
I2
I1 I7
I6
I5
Coupling to the multi-
processing station
119
Model wiring
Terminal Header ST1 Ribbon cable Sensors + actuators model
5 Pulse key 1
I1
2 24V (Sensor) 2
6 Light barrier input 3
I2
2 24V (Sensor) 4
7 Light barrier after colour sensor 5
I3
2 24V (Sensor) 6
3.4 GND 7
Q2 (compressor)
18 Compressor 8
3.4 GND 9
Q1 (Conveyor belt)
17 Conveyor belt 10
3.4 GND 11
2 9V (generated from 24V ) 12
Colour sensor (A4)
9 Colour sensor (0-10V) 13
not assigned 14
3.4 GND 15
Light barrier lamp
2 24V (Sensor) 16
3.4 GND 17
Light barrier lamp
2 24V (Sensor) 18
not assigned 19
not assigned 20
Header ST2
not assigned 1
not assigned 2
10 Light barrier white 3
I5
2 24V (Sensor) 4
12 Light barrier blue 5
I7
2 24V (Sensor) 6
11 Light barrier red 7
I6
2 24V (Sensor) 8
3.4 GND 9
Light barrier lamp
2 24V (Sensor) 10
3.4 GND 11
Light barrier lamp
2 24V (Sensor) 12
3.4 GND 13
Light barrier lamp
2 24V (Sensor) 14
3.4
Terminal V1 Q3 (Valve first ejector, white)
20
3.4
Terminal V2 Q4 (Valve second ejector, red)
21
3.4
Terminal V3 Q5 (Valve third ejector, blue)
22
red = power supply
120
Assignment plan for sensor station with surveillance camera (SSC)
Q5
Q6
I2 M2
Q7
I1
M1
Q8
I4
A1
I3
121
Environmental sensor Photo-resistor
The NFC reader is connected to the TXT controller via the I²C interface.
The mounted surveillance camera is connected to the TXT Controller via a USB interface.
Data from the environmental sensor and photo-resistor is also read in by the TXT Controller.
TXT-Controller (TxtGatewayPLC)
122
Terminal Function Designation Clamp I/O address Variable name
no. (ST1) SPS S7-1500 S7-1500
Power supply (+)
1 24V DC
actuators
Power supply (+)
2 24V DC
sensors
3 Power supply (-) 0V
4 Power supply (-) 0V
5 Reference switch 1 I1 DI4.0 %I4.0 IX_SSC_RefSwitchVerticalAxis_I1
6 Reference switch 2 I2 DI4.1 %I4.1 IX_SSC_RefSwitchHorizontalAxis_I2
Light barrier
7 I3 DI4.2
outsourcing %I4.3 IX_SSC_LightBarrierStorage_I3
8 Light barrier storage I4 DI4.3 %I4.2 IX_SSC_LightBarrierOutsourcing_I4
Colour sensor A1
9 Analogue AI1.1
0-10VDC %IW9 IW_SSC_ColorSensor_A1
Encoder vertical
11 B1 DI5.3
pulse 1 %I5.3 IX_SSC_EncoderVerticalAxisImp1_B1
Encoder vertical
12 B2 DI5.7
pulse 2 %I5.7 IX_SSC_EncoderVerticalAxisImp2_B2
Encoder horizontal
13 B3 DI6.3
pulse 1 %I6.3 IX_SSC_EncoderHorizontalAxisImp1_B3
Encoder horizontal
14 B4 DI6.7
pulse 2 %I6.7 IX_SSC_EncoderHorizontalAxisImp2_B4
19 Vertical motor up Q1 (M1) DO6.0 %Q6.0 QX_SSC_M1_VerticalAxisUp_Q1
20 Vertical motor down Q2 (M1) DO6.1 %Q6.1 QX_SSC_M1_VerticalAxisDown_Q2
Turn motor anti- QX_SSC_M2_HorizontalAxisCounter
21 Q4 (M2) DO6.2
clockwise %Q6.2 clockwise_Q4
22 Turn motor clockwise Q3 (M2) DO6.3 %Q6.3 QX_SSC_M2_HorizontalAxisClockwise_Q3
23 LED green Q5 DO6.4 %Q6.4 QX_SSC_LED_Green_Q5
24 LED yellow Q6 DO6.5 %Q6.5 QX_SSC_LED_Yellow_Q6
25 LED red Q7 DO6.6 %Q6.6 QX_SSC_LED_Red_Q7
26 LED red online status Q8 DO6.7 %Q6.7 QX_SSC_LED_Red_Online_Q8
27 PWM vertical PWM (M1) DO9.2 %QW27 QW_SSC_PWM_Vertical_M1
28 PWM cantilever PWM (M2) DO9.3 %QW29 QW_SSC_PWM_Horizontal_M2
123
Model wiring
Stiftleiste ST1
Klemme Flachbandkabel Sensoren/Aktoren am Modell
5 Referenz Kamera vertikal 1
I1
2 24V (Sensor) 2
19 Kamera hoch 3
Q1/Q2 (M1)
20 Kamera runter 4
3,4 GND 5 Encoder vertikal
2 24V (Sensor) 6 Spannungsversorgung
Signal A
11 A 7
Signal B
12 B 8
6 Referenz Kamera horizontal 9
I2
2 24V (Sensor) 10
Stiftleiste ST2
21 Kamera links 1
Q3/Q4(M2)
22 Kamera rechts 2
3,4 GND 3 Encoder horizontal
2 24V (Sensor) 4 Spannungsversorgung
Signal A
13 A 5
Signal B
14 B 6
3,4 GND 7
Q5 LED grün
23 LED grün 8
3,4 GND 9
Q6 LED gelb
24 LED gelb 10
3,4 GND 11
Q7 LED rot
25 LED rot 12
3,4 GND 13
Q8 LED rot (Kamera)
26 LED rot(Kamera) 14
Stiftleiste ST3
124
Assignment diagrams PLC connection board (560840 and
560841)
In this chapter you will find the assignment diagrams for the two boards which are connected to one another via two
cables (I) and (II).
560841 Learning Factory 4.0 24V with PLC connection board and
560840 Learning Factory 4.0 24V compl. with PLC S7-1500
On the model side, the distributor board is connected to the individual stations in the model via 5 flat ribbon cables. These
are already included in the delivery of variant 560841 or 560840.
With variant 560840 the PLC connection board is already wired up. With variant 560841 the PLC has to be connected to the
distributor board via cables. These are divided into groups, e.g. DO1+2a, …, AI1b.
The cover can be loosened from below by undoing the four cross-head screws. When the bottom section has been
removed, the connectors can be used to connect the inputs and outputs to the PLC assemblies.
125
Assignment PLC board
Pin number 34pin model
Plug Pin Model PLC-Port Color
connector
PLC-Power 1 PLC +24V PLC red
PLC-Power 2 PLC +24V PLC red
PLC-Power 3 PLC GND PLC blue
PLC-Power 4 PLC GND PLC blue
DO1+2a 1 HBW DO1.0 brown 17
DO1+2a 2 HBW DO1.2 red 19
DO1+2a 3 HBW DO1.4 orange 21
DO1+2a 4 HBW DO1.6 yellow 23
DO1+2a 5 VGR DO2.0 green 17
DO1+2a 6 VGR DO2.2 blue 19
DO1+2a 7 VGR DO2.4 violett 21
DO1+2a 8 VGR DO2.6 gray 23
DO1+2a 9 HBW HBW_24V_1-2 white 1+2
DO1+2b 1 HBW DO1.1 brown 18
DO1+2b 2 HBW DO1.3 red 20
DO1+2b 3 HBW DO1.5 orange 22
DO1+2b 4 HBW DO1.7 yellow 24
DO1+2b 5 VGR DO2.1 green 18
DO1+2b 6 VGR DO2.3 blue 20
DO1+2b 7 VGR DO2.5 violett 22
DO1+2b 8 VGR DO2.7 gray 24
DO1+2b 9 HBW HBW_GND_3-4 white 3+4
DO3+4a 1 MPO DO3.0 brown 17
DO3+4a 2 MPO DO3.2 red 19
DO3+4a 3 MPO DO3.4 orange 21
DO3+4a 4 MPO DO3.6 yellow 23
DO3+4a 5 MPO DO4.0 green 25
DO3+4a 6 MPO DO4.2 blue 27
DO3+4a 7 MPO DO4.4 violett 29
DO3+4a 8 n.c. gray
DO3+4a 9 MPO MPO_24V_1-2 white 1+2
DO3+4b 1 MPO DO3.1 brown 18
DO3+4b 2 MPO DO3.3 red 20
DO3+4b 3 MPO DO3.5 orange 22
DO3+4b 4 MPO DO3.7 yellow 24
DO3+4b 5 MPO DO4.1 green 26
DO3+4b 6 MPO DO4.3 blue 28
126
DO3+4b 7 MPO DO4.5 violett 30
DO3+4b 8 n.c. gray
DO3+4b 9 MPO MPO_GND_3-4 white 3+4
DO5a 1 SLD DO5.0 brown 17
DO5a 2 SLD DO5.2 red 20
DO5a 3 SLD DO5.4 orange 22
DO5a 4 n.c. yellow
DO5a 5 SLD SLD_24V_1-2 white 1+2
DO5b 1 SLD DO5.1 brown 18
DO5b 2 SLD DO5.3 red 21
DO5b 3 n.c. orange
DO5b 4 n.c. yellow
DO5b 5 SLD SLD_GND_3-4 white 3+4
DO6a 1 SSC DO6.0 brown 19
DO6a 2 SSC DO6.2 red 21
DO6a 3 SSC DO6.4 orange 23
DO6a 4 SSC DO6.6 yellow 25
DO6a 5 SSC SSC_24V_1-2 white 1+2
DO6b 1 SSC DO6.1 brown 20
DO6b 2 SSC DO6.3 red 22
DO6b 3 SSC DO6.5 orange 24
DO6b 4 SSC DO6.7 yellow 26
DO6b 5 SSC SSC_GND_3-4 white 3+4
DO7a 1 HBW DO7.0 brown 25
DO7a 2 HBW DO7.2 red 27
DO7a 3 HBW HBW_24V_1-2 white 1+2
DO7b 1 HBW DO7.1 brown 26
DO7b 2 HBW DO7.3 red 28
DO7b 3 HBW HBW_GND_3-4 white 3+4
DO8a 1 VGR DO8.0 brown 25
DO8a 1 VGR DO8.1 brown 26
DO8a 2 VGR DO8.2 red 27
DO8a 3 VGR VGR_24V_1-2 white 1+2
DO8b 2 n.c. red
DO8b 3 VGR VGR_GND_3-4 white 3+4
DO9a 1 MPO DO9.0 brown 31
DO9a 2 SSC DO9.2 red 27
DO9a 3 SSC SSC_24V_1-2 white 1+2
DO9b 1 MPO DO9.1 brown 32
DO9b 2 SSC DO9.3 red 28
DO9b 3 SSC SSC_GND_3-4 white 3+4
DI1+2a 1 HBW DI1.0 brown 5
DI1+2a 2 HBW DI1.2 red 7
DI1+2a 3 HBW DI1.4 orange 15
DI1+2a 4 VGR DI1.6 yellow 5
DI1+2a 5 MPO DI2.0 green 6
DI1+2a 6 MPO DI2.2 blue 8
DI1+2a 7 MPO DI2.4 violett 10
DI1+2a 8 MPO DI2.6 gray 12
DI1+2a 9 PLC_24V white
DI1+2b 1 HBW DI1.1 brown 6
DI1+2b 2 HBW DI1.3 red 8
DI1+2b 3 HBW DI1.5 orange 16
127
DI1+2b 4 MPO DI1.7 yellow 5
DI1+2b 5 MPO DI2.1 green 7
DI1+2b 6 MPO DI2.3 blue 9
DI1+2b 7 MPO DI2.5 violett 11
DI1+2b 8 MPO DI2.7 gray 13
DI1+2b 9 PLC_GND white
DI3a 1 SLD DI3.0 brown 5
DI3a 2 SLD DI3.2 red 7
DI3a 3 SLD DI3.4 orange 11
DI3a 4 VGR DI3.6 yellow 6
DI3a 5 PLC_24V white
DI3b 1 SLD DI3.1 brown 6
DI3b 2 SLD DI3.3 red 10
DI3b 3 SLD DI3.5 orange 12
DI3b 4 VGR DI3.7 yellow 7
DI3b 5 PLC_GND white
DI4a 1 SSC DI4.0 brown 5
DI4a 2 SSC DI4.2 red 7
DI4a 3 n.c. orange
DI4a 4 n.c. yellow
DI4a 5 PLC_24V white
DI4b 1 SSC DI4.1 brown 6
DI4b 2 SSC DI4.3 red 8
DI4b 3 n.c. orange
DI4b 4 n.c. yellow
DI4b 5 PLC_GND white
DI5a 1 HBW DI5.0 brown 9
DI5a 2 HBW DI5.2 red 13
DI5a 3 HBW DI5.4 orange 10
DI5a 3 n.c. orange
DI5a 4 HBW DI5.6 yellow 14
DI5a 5 PLC_24V white
DI5b 1 HBW DI5.1 brown 11
DI5b 2 SSC DI5.3 red 11
DI5b 3 HBW DI5.5 orange 12
DI5b 4 SSC DI5.7 yellow 12
DI5b 5 PLC_GND white
DI6a 1 VGR DI6.0 brown 9
DI6a 2 VGR DI6.2 red 13
DI6a 3 VGR DI6.4 orange 10
DI6a 4 VGR DI6.6 yellow 14
DI6a 5 PLC_24V white
DI6b 1 VGR DI6.1 brown 11
DI6b 2 SSC DI6.3 red 13
DI6b 3 VGR DI6.5 orange 12
DI6b 4 SSC DI6.7 yellow 14
DI6b 5 PLC_GND white
AI1a 1 SLD AI1.0 brown 9
AI1a 2 PLC_GND red
AI1a 3 PLC_24V white
AI1b 1 SSC AI1.1 brown 9
AI1b 2 PLC_GND red
AI1b 3 PLC_GND white
128
Programming tasks
In order to handle programming tasks, you will require prior knowledge of the programming language Structured
Text (ST or SCL) and on how to handle the programming tool you are using.
The provided programming solutions have been created with the TIA Portal V16 for a programmable controller
SIMATIC S7-1500 with CPU1512SP
Alternatively, other control systems can also be used with appropriate software.
An introduction to programming with the TIA Portal is available, for instance, here from SIEMENS:
http://www.siemens.com/sce/S7-1500
https://new.siemens.com/global/en/company/sustainability/education/sce/learning-training-
documents/advanced-programming.html
The global fischertechnik library Library_LearningFactory_4_0_24V and program solutions are available at:
https://github.com/fischertechnik/plc_training_factory_24v
129
Programming task 1:
Configuring and commissioning the SIMATIC controller with CPU1512SP
Task:
The complete hardware configuration for the controller must be created, loaded and tested for the
LearningFactory_4.0_24V, with all input and output modules.
A non-specified CPU will be created in order to determine all components.
This project with hardware configuration serves as the basis for all subsequent programming tasks.
Planning
1. Wire a START button as normally open contact (NO) and a STOP button as normally closed contact (NC) to
two free inputs on the controller. Connect the LearningFactory_4_0_24V to the PLC and switch on the
controller.
3. In the TIA portal project LearningFactory_4_0_24V_Task01_HWConf, add a controller SIMATIC ET 200SP CPU
or SIMATIC S7-1500 as a new device. Do so as a non-specified CPU, as described in the following
programming information.
4. Connect the programming device to the CPU and determine the configuration of the connected device
according to the programming information.
5. Set the input/output addresses of the detected modules according to the programming information and
configure the module.
130
Programming information:
Information on connecting the START and STOP buttons:
Two buttons are required for the following programming tasks. A START button as a NO contact
(NormallyOpen) and a STOP button as a NC contact (NormallyClosed). Fischertechnik mini-buttons can be
used for this purpose.
The mini-buttons are equipped with changeover contacts and can be used as both normally closed and
normally open contacts. The figure shows a circuit diagram of the mini-pushbuttons.
Contacts 1 and 2 are wired to a digital input on the PLC for use as NC contacts (NormallyClosed).
Contacts 1 and 3 are wired to a digital input on the PLC for use as NO contacts (NormallyOpen).
131
Information on configuring a non-specified CPU1512SP:
Before a SIMATIC S7-1500 PLC can be configured, its hardware must be configured.
The fastest way to do so is to create a non-specified CPU and then have all components detected.
To do so, the programming device must be connected to the controller via Ethernet, and the IP addresses must be
set so that both devices are in the same subnet.
Setting the IP address is described in this document in the section Commissioning and adjusting the SIMATIC
controller CPU1512SP.
The configuration for our Training Factory Industry 4.04.0 can be completed using the following steps.
→ First, start the Totally Integrated Automation Portal by double clicking on it. ( → TIA Portal V16)
→ In the portal view, click → Start → and then Create new project. Change the project name, path,
author and comment accordingly and then click → Create
132
→ Then select → Start → Devices & Networks → and Add new device in the portal.
Create a new CPU. To do so, use a non-specified model of the SIMATIC ET200 CPU with order number
6ES7 5XX-XXXXX-XXXX.
(Controller → SIMATIC ET200 CPU → ET 200SPCPU → Non-specified ST200SP CPU → 6ES7 5XX-XXXXX-
XXXX → V2.8)
Assign a device name (device name → PLC), select Open device view and then click → Add.
→ The TIA Portal will switch automatically to the project view, and will display a notification that this device
is not specified. To have the hardware configuration identified automatically, start the detection by
clicking Identify in the yellow info box. ( → identify)
133
→ First, select the type of PG/PC interface you are using and the network card you want to use to
create a connection to the PLC via Ethernet. (→ Type of PG/PC interface: PN/IE → PG/PC interface:
Intel(R) Ethernet …)
Now, start the search for devices on the network by clicking the → Start search button
Then, all available devices will be detected and listed. If you have selected the right CPU, then
clicking → Detect will cause the CPU in question and connected modules to be detected.
Note: If your CPU is not in the list, ensure you have selected the right network card and that your
laptop and CPU are connected.
134
→ The TIA portal will now show the complete device configuration for the selected CPU. Now, you
can configure the CPU and the input/output assemblies according to your specifications.
135
Information on configuring the input/output assemblies
The addresses of the assemblies should be set as shown here.
Pulse width modulation (PWM) should be set as the operating mode for the output modules with addresses DO 7
- DO 30.
136
Operating mode DI \ Oversampling should be set for the input modules with addresses DI 5 to DI 6 for the encoder
inputs.
The measurement type voltage should be set with a measurement range of 0-10V for the channels of the analogue
input modules.
137
Information on global libraries:
The global variable tables and a module for encoder evaluation in a compressed library
Library_LearningFactory_4_0_24V.zal16 are provided for programming tasks.
This can be opened by clicking on the symbol in Global Libraries to open a library, then selecting the
fileLibrary_LearningFactory_4_0_24V.zal16.
Elements from the library can then simply be copied to the relevant project folder via drag & drop.
138
Information on observation tables:
Observation tables can be created to test the function of factory modules and to determine position values later
on. Variables can then easily be moved to the observation tables via drag & drop from the detailed view of variable
tables.
In the expanded view , the inputs and outputs used in the program can also be controlled continuously. If
there are no buttons for the START and STOP functions, then these can be simulated in this manner.
139
Programming task 2:
Sensor station with camera (SSC), colour detection with colour sensor
Task:
The colour sensor on the input/output station should be used in the sensor station with camera (SSC) to detect different
blue/white/red workpieces.
When there is a workpiece on the colour sensor, the measured value of the colour sensor is evaluated, and the
result is displayed on an assigned LED. The evaluation only runs for as long as the START button is pressed.
Colour assignment:
Blue green LED (Q5)
White yellow LED (Q6)
Red red LED (Q7)
No colour detected red LED online status (Q8)
The program should be created in the programming language Structured Text (ST or SCL).
Planning
1. In the TIA Portal, open the projectLearningFactory_4_0_24V_Task01_HWConf and save it under the name
LearningFactory_4_0_24V_Task02_SensorsSSC.
2. Copy the global variable table SSC Sensor Station, as shown in programming task 1, from the library
Library_LearningFactory_4_0_24V and insert it into your project.
3. As shown in programming task 1, expand the observation table, determine value ranges for the 3 colours
blue/white/red there by placing the different workpieces on the sensor, and check the function of the buttons
and sensors.
4. Create a library-capable code module in the programming language structured text (ST or SCL).
5. Create a new organisational module Main [OB1] in the programming language Structured Text (ST or SCL),
access the library-capable code module there and connect these with global variables.
6. Load the complete program to the controller.
7. Test the program on the sensor station using a camera (SSC).
8. Monitor the program online and correct any errors.
9. Save and archive the project LearningFactory_4_0_24V_Task02_SensorsSSC.
140
Programming information
Library-capable code modules are preferred for structured programming of PLC programs. This means that the
input and output parameters of a function or function module are determined generally in local variables, and are
only assigned current global variables (inputs/outputs) when using the module.
The advantage of this is that the module can be accessed multiple times.
The fischertechnik colour sensor emits white light, which different colour surfaces reflect to different degrees.
The photo-transistor measures the intensity of the reflected light and measures read as a voltage value ranging
between 0 V and 9 V on an analogue input 0-10V on the PLC. This measured value (0-9 V) is digitised into a whole
number between 0 and 24883 by the analogue input assembly.
The measured value depends on the ambient brightness as well as the distance of the sensor from the coloured
surface.
Therefore, the values for the 3 different workpieces in blue/white/red should be determined through multiple
measurements.
This makes it possible to calculate an average value for each colour. For the analysis, you should also stipulate a
tolerance range around this average value, since measurement results always involve a certain amount of
inaccuracy.
141
Programming task 3:
Sensor station with camera (SSC), camera movement without pulse width modulation (PWM)
Task:
The camera movement should be activated via the outputs directly in the sensor station with camera (SSC),
without pulse width modulation (PWM).
Press the START button to start a reference run. The camera will move horizontally and clockwise to the position
of the reference switch, horizontally and vertically down to the reference position for the vertical axis.
Press the STOP button to move the camera up for 2 seconds horizontally in an anti-clockwise direction, and
vertically up.
If START or STOP are pressed while the camera is moving, the direction will be reversed.
The program should be created in the programming language Structured Text (ST or SCL).
Planning
1. In the TIA Portal, open the projectLearningFactory_4_0_24V_Task01_HWConf and save it under the name
LearningFactory_4_0_24V_Task03_CameraSSC.
2. Copy the global variable table SSC Camera Station, as shown in programming task 1, from the library
Library_LearningFactory_4_0_24V and insert it into your project.
3. Insert the jumpers to provide a power supply to the bi-directional motors, so that the motors are fed directly
via the +24V actuators.
4. Add to the monitoring table as shown in programming task 1, and check the function of I/O signals.
5. Create a library-capable code module in the programming language structured text (ST or SCL).
6. Create a new organisational module Main [OB1] in the programming language Structured Text (ST or SCL),
access the library-capable code module there and connect these with global variables.
7. Load the complete program to the controller.
8. Test the program on the sensor station using a camera (SSC).
9. Monitor the program online and correct any errors.
10. Save and archive the project LearningFactory_4_0_24V_Task02_CameraSSC.
11. Insert the jumpers for the power supply to the bi-directional motors so that they are fed via the associated PWM
terminals 2 and 3.
142
Programming information
Programming information
Since the positive signal flank of the START button should be analysed in this task, and a timer is used, a function
block (FB) must be programmed here as a coding module.
143
Programming task 4:
Sorting line with colour detection (SLD); sequence with simple positioning function without
colour detection
Task:
Workpieces should be transported in the sorting line with colour detection (SLD) from the start of the belt to the
second storage location, regardless of their colour.
If there is a workpiece on the belt at the entrance to the light barrier, and if the second storage location is free,
press the START button to switch on the belt. The pulse button counts the pulses from the light barrier to the colour
sensor, in order to detect position. The belt should be stopped once the workpiece is in front of the second
extension cylinder.
There, the workpiece is moved to the second storage position by the second extension cylinder.
The workpiece must then be removed manually there.
Press the STOP button to stop the process. Workpieces must be removed from the system before the sorting line
can be started once again.
The program should be created in the programming language Structured Text (ST or SCL).
Planning
1. In the TIA Portal, open the projectLearningFactory_4_0_24V_Task01_HWConf and save it under the name
LearningFactory_4_0_24V_Task04_SortingSLD.
2. Copy the global variable table SLD Sorting Line with Detection, as shown in programming task 1, from the
library Library_LearningFactory_4_0_24V and insert it into your project.
3. Add to the monitoring table as shown in programming task 1, and check the function of I/O signals.
4. Create a library-capable code module with the sequence in the programming language structured text (ST or
SCL).
5. Create a new organisational module Main [OB1] in the programming language Structured Text (ST or SCL),
access the library-capable code module there and connect these with global variables.
6. Load the complete program to the controller.
7. Test the program on the sorting line with colour detection (SLD).
8. Monitor the program online and correct any errors.
9. Save and archive the project LearningFactory_4_0_24V_Task04_SortingSLD.
144
Programming information
Information on programming sequences in the programming language structured text (ST or SCL).
In addition to other options for programming a process control or a sequence in the programming language
Structured Text (ST or SCL), the control or sequence can be programmed, for instance, in a case instruction.
The number of the step that is currently being completed is always in the statistical variable #Step_number.
Only the commands programmed for the relevant step number are executed.
The system transitions to the next step by incrementing the variable #Step_number in the step by +1.
The variable #Step_number is set to 0 to transition from the last step to step 0 and reset the sequence.
Since statistical variables are also required in the sequence, a function block (FB) must be programmed here as
a code module.
Information on positioning
Since the conveyor belt does not move very quickly, and since the position in front of the extension cylinder does
not have to be very exact, it is enough to detect signals from the pulse sensor in the normal cyclical organisational
block OB1 for this simple positioning function.
A simple counter can be used to count the pulses in the program. The value can then be compared.
You can determine the number of required pulses by activating the conveyor belt motor and observing the counter
value.
145
Programming task 5:
Vacuum suction gripper (VGR); sequence with pulse width modulation (PWM) and simple
positioning function
Task:
The vacuum suction gripper station (VGR) should be used to transport workpieces independent of their colour
from the material storage to the material scrap area.
The motors for gripper movements are controlled via a relay and supplied with power via the associated PWM
terminals. The motor speed can be set using the output signals from pulse width modulation (PWM). The speed
should be set fairly low in this task, so that positioning is simpler.
Press the START button to start the process. First, the suction gripper moves back horizontally to the reference
switch, then up vertically, and finally in a clockwise direction to the reference position at the material storage.
Then, it positions the vacuum down vertically to the pick-up position at the material storage,
then switches the vacuum on and moves back up to the reference switch.
Now the suction gripper turns anti-clockwise to set down material scrap, then vertically down to the discharge
position, where it switches the vacuum off again.
Press the STOP button to stop the process.
The program should be created in the programming language Structured Text (ST or SCL).
Planning
1. In the TIA Portal, open the projectLearningFactory_4_0_24V_Task01_HWConf and save it under the name
LearningFactory_4_0_24V_Task05_VacuumGripperVGR.
2. Copy the global variable table VGR Vacuum Gripper Robot, as shown in programming task 1, from the library
Library_LearningFactory_4_0_24V and insert it into your project.
3. Check whether the jumpers for the power supply to the bi-directional motors are inserted so that they are fed
via the associated PWM terminals 1, 2 and 3.
4. Add to the monitoring table as shown in programming task 1, and check the function of I/O signals.
5. Create a library-capable code module with the sequence in the programming language structured text (ST or
SCL).
6. Create a new organisational module Main [OB1] in the programming language Structured Text (ST or SCL),
access the library-capable code module there and connect these with global variables.
7. Load the complete program to the controller.
8. Test the program using the vacuum suction gripper (VGR).
9. Monitor the program online and correct any errors.
10. Save and archive the project LearningFactory_4_0_24V_Task05_VacuumGripperVGR.
146
Programming information
You can specify whole numbers (integer format) on the outputs for the PWM signals in the PLC program, and
thereby control the speed. A low speed should be specified here for all axes with a value of 400.
147
Information on positioning
Due to the low speed of the 3 axes, it is enough to detect pulse 1 from the respective encoder in the normal cyclical
organisational block OB1 for positioning.
A simple counter can be used to count the pulses in the program. The value can then be compared.
You can determine the number of pulses for the required positions by activating the individual axes and observing
the counter value.
Programming task 6:
Multi-processing station with oven (MPO); sequence with pulse width modulation (PWM) and
parallel actions
Task:
In the multi-processing station with oven (MPO), workpieces should undergo a burning process before they are
sawed and then transported to the next station.
The motors for vacuum suction and turntable movements are controlled via a relay and supplied with power via
the associated PWM terminals. The motor speed can be set using the output signals from pulse width modulation
(PWM).
The program should be created in the programming language Structured Text (ST or SCL).
To shorten the time for a production cycle, complete multiple actions at the same time in a single step if possible.
The signals for pulse width modulation (PWM) and for the compressor should not be specified in the steps of the
sequence, but rather in subsequent ongoing operation.
148
Planning
1. In the TIA Portal, open the projectLearningFactory_4_0_24V_Task01_HWConf and save it under the name
LearningFactory_4_0_24V_Task06_MultiProcessingMPO.
2. Copy the global variable table MPO-Multi-Processing station with oven, as shown in programming task 1,
from the library Library_LearningFactory_4_0_24V and insert it into your project.
3. Check whether the jumpers for the power supply to the bi-directional motors are inserted so that they are fed
via the associated PWM terminals 1 and 3.
4. Add to the monitoring table as shown in programming task 1, and check the function of I/O signals.
5. Create a library-capable code module with the sequence in the programming language structured text (ST or
SCL).
6. Create a new organisational module Main [OB1] in the programming language Structured Text (ST or SCL),
access the library-capable code module there and connect these with global variables.
7. Load the complete program to the controller.
8. Test the program using the vacuum suction gripper (VGR).
9. Monitor the program online and correct any errors.
10. Save and archive the project LearningFactory_4_0_24V_Task06_MultiProcessingMPO.
149
Programming information
Multi-processing station
(MPO)
PWM 1 Turntable
PWM 2 - not assigned -
PWM 3 Suction (Horizontal)
PWM 4 Oven pusher
You can specify whole numbers (integer format) on the outputs for the PWM signals in the PLC program, and
thereby control the speed.
150
Programming task 7:
Automated high-bay warehouse (HBW); sequence with pulse width modulation (PWM) and
positioning function with encoder
Task:
The automated high-bay warehouse (HBW) station is designed to move a pallet from the top front position (position
A1) and set it on the conveyor belt.
The motors for stacker crane movements are controlled via a relay and supplied with power via the associated
PWM terminals. The motor speed can be set using the output signals from pulse width modulation (PWM).
The encoder should be used to precisely position the axes.
Press the START button to start the process. First, the stacker crane moves the cantilever to the rear, then at the
same time to the reference switch horizontally and forward out of the storage area, as well as upward vertically.
In this reference position, positioning values are set to a reference value of 0.
Then the stacker crane moves to the front top position (position A1) to extend. There, the cantilever is extended
to move the vertical axis up briefly to lift the pallet. The cantilever will then move back.
Then the stacker crane will move to the discharge position on the conveyor belt. There, the cantilever is extended
once again to move the vertical axis down briefly to set down the pallet.
The cantilever then moves back, while the conveyor belt transports the pallet to the light barrier at the outside
end of the belt. The pallet must be removed manually before the process can be started once again.
Press the STOP button to stop the process.
The program should be created in the programming language Structured Text (ST or SCL).
To shorten the time for a production cycle, complete multiple actions at the same time in a single step if possible.
The signals for pulse width modulation (PWM) should not be specified in the steps of the sequence, but rather in
subsequent ongoing operation.
151
Planning
1. In the TIA Portal, open the projectLearningFactory_4_0_24V_Task01_HWConf and save it under the name
LearningFactory_4_0_24V_Task07_HighBayWarehouseHBW.
2. Copy the global variable table HBW automated high-bay warehouse, as shown in programming task 1, from
the library Library_LearningFactory_4_0_24V and insert it into your project.
3. Under programming modules, create a Positioning group and insert a wake alarm OB Cyclic Interrupt [OB30]
there according to the programming information with a cycle of 1000 µs. Read in the Encoder inputs in the
sub-process screen for this wake alarm OB.
4. Copy the library module FB_INC_DEC for encoder evaluation from the library
Library_LearningFactory_4.0_24V and insert it into your project in the Positioning group.
5. Create a global data block Positioning [DB90] in the Positioning group with a global variable for position (INT)
and direction (BOOL) for the horizontal and vertical axis.
6. Access and activate the module FB_INC_DEC for encoder evaluation in the wake alarm OB Cyclic Interrupt
[OB30] for both the horizontal and vertical axes.
7. Check whether the jumpers for the power supply to the bi-directional motors are inserted so that they are fed
via the associated PWM terminals 1, 2.3 and 4.
8. As shown in programming task 1, add all input/output signals and the values from the global data block
Positioning [DB90] to the observation tables. Check the functions of the I/O signals and encoder analysis with
the help of the observation table, and determine position values for the positions required in the program.
9. Create a library-capable code module with the sequence in the programming language structured text (ST or
SCL).
10. Create a new organisational module Main [OB1] in the programming language Structured Text (ST or SCL),
access the library-capable code module there and connect these with global variables.
11. Load the complete program to the controller.
12. Test the program using the automated high-bay warehouse (HBW).
13. Monitor the program online and correct any errors.
14. Save and archive the project LearningFactory_4_0_24V_Task07_HighBayWarehouseHBW.
152
Programming information
High-bay warehouse
(HBW)
PWM 1 Conveyor belt
PWM 2 X(Horizontal)
PWM 3 Y(Vertical)
PWM 4 Cantilever
You can specify whole numbers (integer format) on the outputs for the PWM signals in the PLC program, and
thereby control the speed.
153
Information on creating a wake alarm OB and reading in the encoder inputs
Wake alarm OBs can be used to start program components at equidistant time intervals and read in inputs
accordingly. Create a wake alarm OB with a 1ms cycle time as follows:
The settings must be changed so that inputs in the sub-process screen (TPA 1) for this wake alarm OB must be
read in for the assemblies for encoder inputs.
154
Information on positioning with the encoder and fischertechnik library module FB_INC_DEC
In this programming task, tracks A+B and pulses 1 and 2 for the encoders must be recorded for the horizontal and
vertical axes in a wake alarm organizational module with a cycle time of 1ms, in order to ensure precise positioning
even with high speed movements.
A module FB_INC_DEC has already been provided in the available library Library_LearningFactory_4_0_24V for
encoder evaluation. It can simply be copied from there into the project.
155
The module FB_INC_DEC for encoder evaluation assesses the pulses for the two channels at the inputs #inx_CHa
and #inx_CHb.
This is used to determine the direction #outx_dir and a position value #outi_cnt and provide these as outputs.
The input #inx_RST can be used to reset the position value to a reference value #ini_REF_val.
The module FB_INC_DEC for encoder evaluation should be accessed and activated in a wake alarm OB for both
the horizontal and vertical axes.
The position values can be determined for the positions required in the program by activating the individual axes
and monitoring the position values in the observation table. The reference position in each case is 0.
156
1. 2020 edition
fischertechnik GmbH
Klaus-Fischer-Straße 1
72178 Waldachtal Ph: (+49) 7443 12 - 4369
E-Mail: info@fischertechnik.de
157