Projects 2024 Real Time Factory Overview
Projects 2024 Real Time Factory Overview
Overview
■ 14.10.2024 ■ 1
Overview
The Manufacturing Model
■ 14.10.2024 ■ 2
Overview
Schematic Overview
Transport
Transport Transport
Outgoing Ingoing
Outgoing
Modules:
2x Input
2x Output (Sorting) Storage
2x Transportation Processing
Processing
4x Work Stations
Storage Processing
Processing
Sorting Input
■ 14.10.2024 ■ 3
Overview
Overview about usage
Usage in courses
• Modules are distributed
between groups
• Each module has to be
programmed individually
and is controlled by its own
controller
■ 14.10.2024 ■ 4
Overview
Loads
RTAI Kernel PhoenixContact
modules Modbus TCP ModbusTCP coupler
for digital/analog I/Os
■ 14.10.2024 ■ 5
Overview
TCP/IP network
■ 14.10.2024 ■ 6
Overview
■ 14.10.2024 ■ 7
Overview
RTAI
Scheduler
Sync Sync
Sync
Inter-Process
Communication
handled by RTAI OS
■ 14.10.2024 ■ 8
Overview
RTAI
Scheduler
Sync Sync
Sync
■ 14.10.2024 ■ 9
Overview
Examples for Parallelity – Module internal
Ejectors Stopper
Slides
■ 14.10.2024 ■ 10
Overview
Examples for Parallelity – Between modules
■ 14.10.2024 ■ 11
Overview
Examples for Parallelity – Between modules
■ 14.10.2024 ■ 12
Real-time Factory
Module: Input
Magazines
Pusher
Height Sensor
Slide
■ 14.10.2024 ■ 13
Real-time Factory
I/Os in Input Module
■ 14.10.2024 ■ 14
Real-time Factory
Module: Distribution Center Input (Input 2)
Magazines
Height Ejector Output
Sensor Conveyor
Main Conveyor
Seperator
Seperator (main)
(side) Slide
Side Conveyor
Magazine 4
■ 14.10.2024 ■ 15
Real-time Factory
I/Os Distribution Center Input (Input 2)
Inputs Bit Address Digital Sensor Bit Address Digital Sensor Address Analog Sensor
0 8002 Conveyor (Side) Piece at end 16 8001 Magazine 3 is retracted 0 Height value
1 8002 Conveyor (Output) Piece at end 17 8001 Magazine 3 is ejected
2 8002 Conveyor (Main) Piece at begin 18 8001 Piece in Magazine 3
3 8002 Conveyor (Main) Piece between Mag 1+2 19 8001 Ejector in right position
4 8002 Conveyor (Main) Piece between Mag 2+3 20 8001 Ejector in left position
5 8002 Conveyor (Main) Piece in front of Ejector 21 8001 Ejector in middle position
6 8002 Seperator (Main) is set 22 8001 Ejector lock is set
7 8002 Seperator (Main) Piece in front 23 8001 Slide full
8 8002 Seperator (Side) is set 24 8001 Height sensor: Piece not ok
9 8002 Seperator (Side) Piece in front 25 8001 Height sensor: Measurement
correct
10 8002 Magazine 1 is retracted
11 8002 Magazine 1 is ejected
12 8002 Piece in Magazine 1
13 8002 Magazine 2 is retracted
14 8002 Magazine 2 is ejected
15 8002 Piece in Magazine 2
■ 14.10.2024 ■ 16
Real-time Factory
I/Os Distribution Center Input (Input 2)
Outputs Bit Address Digital Actuator Bit Address Digital Actuator Address Analog Actuator
0 8012 Stop Conveyor (Main) 16 8011 Move Ejector left 0 Conveyor (Output) Speed
1 8012 Slow down Conveyor (Main) 17 8011 Activte lock in Ejector (Middle pos)
■ 14.10.2024 ■ 17
Real-time Factory
Module: Processing
Checker Drill
2 3
Ejector A
Ejector B
■ 14.10.2024 ■ 18
Real-time Factory
I/Os in Processing Module
Inputs Outputs
■ 14.10.2024 ■ 19
Real-time Factory
Module: Sorting
Ejectors Stopper
Slides
■ 14.10.2024 ■
20
Real-time Factory
I/Os in Sorting Module
■ 14.10.2024 ■ 21
Real-time Factory
Module: Storage
B
A C
■ 14.10.2024 ■
22
Real-time Factory
I/Os in Storage Module
Inputs Outputs
■ 14.10.2024 ■
23
Real-time Factory
Storage
Bit Actuator
Dec Function 0-3 X coordinate**
0 Reference Position of the linear axis 4 Start movement in x direction
1-9 x/y coordinate 5-8 Y coordinate**
10 Conveyor A 9 Start movement in y direction
11 Conveyor B 10 Move gripper up
12 Conveyor C 11 Move gripper down
13 - 12 Open gripper
14 Single Step in positive direction 13 close gripper
Directly addressable positions
15 Single Step in negative direction 14 Allow movement
B 15 Turn light on
A C
■ 14.10.2024 ■
24
Real-time Factory
Modules: Transportation
■ 14.10.2024 ■
25
Real-time Factory
Switches in the Transportation Modules
■ 14.10.2024 ■
26
Real-time Factory
Conveyor belts in the Transportation Modules
Sensors
Direction
Front End
■ 14.10.2024 ■
27
Real-time Factory
Transport Input
Actuators
Sensors
I 8018 6 7 I 8001 6 7
J 8018 8 9 J 8001 8 9
L 8018 14 15 L 8001 14 15
M 8021 0 1 M 8004 0 1
P 8021 10 11 P 8004 10 11
Q 8021 12 13 Q 8004 12 13
R 8021 14 15 R 8004 14 15
U 8020 8 9 U 8003 8 9
V 8020 10 11 V 8003 10 11
■ 14.10.2024 ■
28
Real-time Factory
Transport Input
Actuators Sensors
■ 14.10.2024 ■
29
Real-time Factory
Separators in the outgoing Transportation module (inside storage)
Actuators
Separator Set Behind
1 64
Separator 1
2 67
3 70
Separator
Sensors Separator 2
In front
Separator Piece Piece in
behind front
1 65 66 Separator 3
2 68 69
3 71 72
■ 14.10.2024 ■
30
Real-time Factory
Transport Output
Transport Output
Conveyor Register Forward Backward at front end
A 8019 0 1 A 8002 0 1
Actuators
Sensors
I 8018 4 5 I 8001 4 5
K 8018 10 11 K 8001 10 11
L 8018 12 13 L 8001 12 13
N 8021 2 3 N 8004 2 3
O 8021 4 5 O 8004 4 5
P 8021 6 7 P 8004 6 7
T 8020 4 5 T 8003 4 5
U 8020 6 7 U 8003 6 7
V 8020 8 9 V 8003 8 9
W 8020 10 11 W 8003 10 11
■ 14.10.2024 ■ 31
Real-time Factory
Transport Output
Actuators Sensors
■ 14.10.2024 ■
32
ModbusTCP interface
Modbus Address Overview
■ 14.10.2024 ■
33
ModbusTCP interface
Setup
Modbus TCP
Modbus TCP
Bus coupler
ModbusTCP
ModbusTCP
Client
Module „Input“
■ 14.10.2024 ■
34
ModbusTCP interface
ModbusTCP
ModbusTCP
■ 14.10.2024 ■
35
ModbusTCP interface
ModbusTCP
ModbusTCP – Basics
■ 14.10.2024 ■
36
ModbusTCP interface
Coils
ModbusTCP – Coils
Coil Address
0 0
1 1
2 1
...
...
9999 0
■ 14.10.2024 ■
37
ModbusTCP interface
Registers
ModbusTCP – Register
Register SIze: 16 Bit (2 Byte or 1 Word)
Register Address
8001 0 1 1 0 0 1 1 0 1 1 1 0 0 0 1 0
8002 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1
8003 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1
...
...
39999 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1
■ 14.10.2024 ■
38
ModbusTCP interface
Readable Objects
■ 14.10.2024 ■
39
ModbusTCP interface
Function Codes
• Function Codes (FC) are transmitted with every request to the server, providing
him information about what to do (e.g. read, write, access to coils, access to
registers, etc.)
• Most important FCs for us:
■ 14.10.2024 ■
40
ModbusTCP interface
Connect
■ 14.10.2024 ■ 41
ModbusTCP interface
Read Request
Modbus Server
Request
8001 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1
Modbus 8002 0 0 0 0 0 1 0 0 1 1 0 1 0 1 1 1
FC: 03 - Read Multiple Holding Registers
Client Starting Address: 8001 8003 1 1 1 1 0 1 0 1 0 0 1 1 0 0 0 0
Number of Registers: 2 8004 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1
■ 14.10.2024 ■
42
ModbusTCP interface
Read Response
Modbus Server
8001 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1
Modbus 8002 0 0 0 0 0 1 0 0 1 1 0 1 0 1 1 1
Client Response 8003 1 1 1 1 0 1 0 1 0 0 1 1 0 0 0 0
8004 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1
Register content =
[0]: 0111010111010101
[1]: 0000010011010111
■ 14.10.2024 ■
43
ModbusTCP interface
Read Response
Register values =
[0]: 0111010111010101
[1]: 0000010011010111
Module/Asset „Workstation 1“
■ 14.10.2024 ■
44
ModbusTCP interface
Write Request
Modbus Server
Request
8001 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1
Modbus 8002 0 0 0 0 0 1 0 0 1 1 0 1 0 1 1 1
FC: 16 - Write Multiple Holding Registers
Client Starting Address: 8003 8003 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Number of Registers: 2 8004 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Register Values =
[0]: 0000000000000001
[1]: 0111010111010101
■ 14.10.2024 ■
45
ModbusTCP interface
Write Response
Modbus Server
8001 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1
Modbus 8002 0 0 0 0 0 1 0 0 1 1 0 1 0 1 1 1
Client Response 8003 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
8004 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1
FC: 16 - Write Multiple Holding Registers
Starting Address: 8003
Number of Registers: 2
■ 14.10.2024 ■
46
pyModbusTCP
Overview
pyModbusTCP
■ 14.10.2024 ■
47
pyModbusTCP
Connec
Client Lib
■ 14.10.2024 ■
48
pyModbusTCP
Read Request
Starting Number of
register registers
■ 14.10.2024 ■
49
pyModbusTCP
Test Bit
Bit to be
Variable to be checked Checked (0-15)
Return Value:
True: Set (1)
False: Not Set (0)
■ 14.10.2024 ■
50
pyModbusTCP
Example Read
■ 14.10.2024 ■ 51
pyModbusTCP
Write Request
■ 14.10.2024 ■
52
pyModbusTCP
Set Bit
Return Value:
Register with bit
Set at desired position
■ 14.10.2024 ■
53
pyModbusTCP
Example Write
■ 14.10.2024 ■
54