0% found this document useful (0 votes)
28 views73 pages

Network Project

The project aims to develop a communication framework that enables seamless data exchange between LabVIEW, TIA Portal, Factory IO, and the ESP32 hardware device using OPC and Modbus protocols. This framework acts as a central hub for real-time data transfer, enhancing control, monitoring, and automation capabilities in industrial environments. It also offers scalability for future expansions, ensuring adaptability to evolving automation requirements.

Uploaded by

by775471864
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views73 pages

Network Project

The project aims to develop a communication framework that enables seamless data exchange between LabVIEW, TIA Portal, Factory IO, and the ESP32 hardware device using OPC and Modbus protocols. This framework acts as a central hub for real-time data transfer, enhancing control, monitoring, and automation capabilities in industrial environments. It also offers scalability for future expansions, ensuring adaptability to evolving automation requirements.

Uploaded by

by775471864
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

REPUBLIC OF YEMEN

SANA'A UNIVERSITY

FACULTY OF ENGINEERING

MECHATRONICS ENGINEERING DEPARTMENT

Industrial Network Project

Done by:

Mohannad Abobakr Guhish (202170242)

Monther Nabil Al-Ashwal (202170258)

Hadeel Adel Al-Ariqi (202170321)


Ehab Mohammed Al-Ademi (202170330)

Group (2)

System (General)

Supervised by:
Dr. Farouq Al-Fahidi
Eng. Mohammed Alzghir
ABSTRACT
The objective of this project is to develop a communication framework that
facilitates seamless data exchange between three software programs,
LabVIEW, TIA Portal, and Factory IO, and a hardware device, ESP32. The
system leverages the OPC (Open Platform Communications) protocol and
Modbus protocol to establish efficient and reliable communication
channels.
The project focuses on creating an integrated platform that enables these
software programs and hardware to interact and share information
seamlessly. The communication framework acts as a central hub, enabling
real-time data transfer, status updates, and control commands between
LabVIEW, TIA Portal, Factory IO, and the ESP32 device.
The implementation involves setting up OPC servers to facilitate
standardized communication interfaces and configuring Modbus devices
for efficient data exchange. The OPC protocol ensures interoperability and
compatibility among the software programs and hardware, enabling
smooth integration and synchronized operation.
With the combined capabilities of LabVIEW, TIA Portal, Factory IO, and
the ESP32 device, the project offers enhanced control, monitoring, and
automation possibilities. It enables users to harness the strengths of these
software programs and hardware in a unified environment, promoting
collaboration and improving system performance.
The communication framework, based on OPC and Modbus protocols, not
only facilitates efficient data exchange but also provides a foundation for
scalability and future expansions. The system can be extended to
incorporate additional software programs or hardware devices, offering
flexibility and adaptability for evolving automation requirements.
In conclusion, this project aims to develop a communication framework
utilizing OPC and Modbus protocols to enable seamless data exchange
between LabVIEW, TIA Portal, Factory IO, and the ESP32 hardware
device. The framework enhances collaboration, control, and automation
capabilities, paving the way for efficient industrial automation and
monitoring systems.
Content of Headline
Introduction: .................................................................................. 1
The whole project:.......................................................................... 3
Student (1): .................................................................................... 3
Equipments:................................................................................... 3
Procedures:.................................................................................... 8
LABVIEW: .................................................................................... 14
ESP32: ......................................................................................... 15
Factory I\O: ................................................................................. 17
Issues & Solution: ......................................................................... 17
Student (2): .................................................................................. 19
Equipments:................................................................................. 19
Procedures:.................................................................................. 23
LABVIEW: .................................................................................... 32
Factory I\O: ................................................................................. 33
Issues & Solution: ......................................................................... 33
Student (3): .................................................................................. 35
Equipments:................................................................................. 35
Procedures:.................................................................................. 35
Issues & Solution: ......................................................................... 51
Student (4): .................................................................................. 52
Equipments:................................................................................. 52
Procedures:.................................................................................. 55
LABVIEW: .................................................................................... 63
Factory I\O: ................................................................................. 64
Issues & Solution: ......................................................................... 65
Discussion & conclusion: .............................................................. 66
References: .................................................................................. 66
Content of Figures
Figure 1 Industrial Network ..................................................................... 1
Figure 2 The whole project ....................................................................... 3
Figure 3 Push button ................................................................................ 3
Figure 4 Round Led .................................................................................. 3
Figure 5 Numeric inductor........................................................................ 4
Figure 6 Dial ............................................................................................. 4
Figure 7 Waveform Chart ......................................................................... 4
Figure 8 Thermometer ............................................................................. 4
Figure 9 Diffuse sensors ........................................................................... 5
Figure 10 Belt conveyors .......................................................................... 5
Figure 11 Emitter ..................................................................................... 5
Figure 12 Remover ................................................................................... 5
Figure 13 Push Buttons ............................................................................ 6
Figure 14 Potentiometer........................................................................... 6
Figure 15 Digital Display .......................................................................... 6
Figure 16 Capacitive Sensor ...................................................................... 6
Figure 17 Light Array (Emitter and Receiver) ........................................... 7
Figure 18 Electric Switchboard ................................................................. 7
Figure 19 Chain transfer ........................................................................... 7
Figure 20 Column ..................................................................................... 7
Figure 21 S7-PLCSIM Advanced ................................................................ 8
Figure 22 Create channel and device ......................................................... 8
Figure 23 Tags in TIA PORTAL .................................................................. 9
Figure 24 Tags in OPC srver configuration .............................................. 10
Figure 25 quick client ............................................................................. 11
Figure 26 Create I/O server .................................................................... 11
Figure 27 National Instruments.NIOPCServers.V5 ................................... 11
Figure 28 Create bound variables ........................................................... 12
Figure 29 FACTORY IO Drivers ............................................................... 12
Figure 30 FACTORY IO Configurtion ....................................................... 13
Figure 31 Fornt Panel ............................................................................. 14
Figure 32 Block diagram ......................................................................... 15
Figure 33 ESP32 hardware ..................................................................... 15
Figure 34 ESP32 Code............................................................................. 16
Figure 35 Result Factory io ..................................................................... 17
Figure 36 First issue ............................................................................... 17
Figure 37 Solution for first issue ............................................................. 17
Figure 38 Second issue ........................................................................... 18
Figure 39 Solution for second issue......................................................... 18
Figure 40 Push button ............................................................................ 19
Figure 41 Round Led .............................................................................. 19
Figure 42 Numeric inductor.................................................................... 19
Figure 43 Dial ......................................................................................... 19
Figure 44 Meter ...................................................................................... 19
Figure 45 PLC_1 [CPU 1515-2 PN]........................................................... 20
Figure 46 Diffuse sensors ....................................................................... 20
Figure 47 Belt conveyors ........................................................................ 20
Figure 48 Emitter ................................................................................... 21
Figure 49 Two-Axis Pick & Place ............................................................. 21
Figure 50 Remover ................................................................................. 21
Figure 51 Push Buttons .......................................................................... 21
Figure 52 Potentiometer......................................................................... 22
Figure 53 Digital Display ........................................................................ 22
Figure 54 Chain transfer ......................................................................... 22
Figure 55 Electric Switchboard ............................................................... 22
Figure 56 Column ................................................................................... 23
Figure 57 S7-PLCSIM Advanced .............................................................. 23
Figure 58 Create channel and device ....................................................... 23
Figure 59 Tags in TIA PORTAL ................................................................ 24
Figure 60 Tags in OPC srver configuration .............................................. 24
Figure 61 quick client ............................................................................. 25
Figure 62 Create I/O server .................................................................... 25
Figure 63 National Instruments.NIOPCServers.V5 ................................... 25
Figure 64 Create bound variables ........................................................... 26
Figure 65 Sent_Coil ................................................................................. 26
Figure 66 Sent_HoldingReg ..................................................................... 27
Figure 67 Received_Input ....................................................................... 27
Figure 68 Received_InputReg ................................................................. 28
Figure 69 MB_CLient_1 ........................................................................... 29
Figure 70 MB_Client_Data_1 .................................................................... 30
Figure 71 FACTORY IO Drivers ............................................................... 30
Figure 72 FACTORY IO Configurtion ....................................................... 31
Figure 73 Fornt Panel ............................................................................. 32
Figure 74 Block diagram ......................................................................... 32
Figure 75 Result Factory io ..................................................................... 33
Figure 76 First Error .............................................................................. 33
Figure 77 Solution for first error ............................................................. 33
Figure 78 Second Error ........................................................................... 34
Figure 79 Solution for second error ........................................................ 34
Figure 80 PLC_main [CPU 1515-2 PN] ..................................................... 35
Figure 81 S7-PLCSIM Advanced .............................................................. 35
Figure 82 Create channel and device ....................................................... 36
Figure 83 quick client ............................................................................. 37
Figure 84 Sent_Coil ................................................................................. 37
Figure 85 Sent_HoldingReg ..................................................................... 38
Figure 86 Received_Input ....................................................................... 38
Figure 87 Received_InputReg ................................................................. 39
Figure 88 MB_Client_main ...................................................................... 40
Figure 89 MB_Client_Data_main .............................................................. 40
Figure 90 Sent ........................................................................................ 41
Figure 91 Received ................................................................................. 41
Figure 92 MB_Client_PLC1 ...................................................................... 42
Figure 93 MB_Client_PLC1_DATA_SENT .................................................. 42
Figure 94 MB_Client_PLC1_DATA_RECEIVED .......................................... 43
Figure 95 Sent ........................................................................................ 43
Figure 96 Received ................................................................................. 44
Figure 97 MB_server_PLC1 ..................................................................... 44
Figure 98 MB_server_PLC1_DATA_SENT ................................................. 45
Figure 99 MB_server_PLC1_DATA_RECEIVED ......................................... 45
Figure 100 Sent ...................................................................................... 46
Figure 101 Received ............................................................................... 46
Figure 102 MB_Client_PLC2 .................................................................... 47
Figure 103 MB_Client_PLC2_DATA_SENT ................................................ 47
Figure 104 MB_Client_PLC2_DATA_RECEIVED ........................................ 48
Figure 105 Sent ...................................................................................... 48
Figure 106 Received ............................................................................... 49
Figure 107 MB_server_PLC2 ................................................................... 49
Figure 108 MB_server_PLC2_DATA_SENT ............................................... 50
Figure 109 MB_server_PLC2_DATA_RECEIVED ....................................... 50
Figure 110 First Error ............................................................................ 51
Figure 111 Solution for first error ........................................................... 51
Figure 112 Second issue ......................................................................... 51
Figure 113 Solution for second issue....................................................... 51
Figure 114 Push button .......................................................................... 52
Figure 115 Round Led ............................................................................ 52
Figure 116 Dial ....................................................................................... 52
Figure 117 Meter .................................................................................... 52
Figure 118 Tank ..................................................................................... 52
Figure 119 PLC_2 [CPU 1515-2 PN]......................................................... 53
Figure 120 Tank ..................................................................................... 53
Figure 121 Push Buttons ........................................................................ 53
Figure 122 Potentiometer....................................................................... 54
Figure 123 Digital Display ...................................................................... 54
Figure 124 Electric Switchboard ............................................................. 54
Figure 125 Column ................................................................................. 54
Figure 126 S7-PLCSIM Advanced ............................................................ 55
Figure 127 Create channel and device ..................................................... 55
Figure 128 Tags in TIA PORTAL .............................................................. 55
Figure 129 Tags in OPC srver configuration ............................................ 56
Figure 130 quick client ........................................................................... 56
Figure 131 Create I/O server .................................................................. 56
Figure 132 National Instruments.NIOPCServers.V5 ................................. 57
Figure 133 Create bound variables ......................................................... 57
Figure 134 Sent_Coil ............................................................................... 58
Figure 135 Sent_HoldingReg ................................................................... 58
Figure 136 Received_Input ..................................................................... 59
Figure 137 Received_InputReg ............................................................... 59
Figure 138 MB_CLient_2 ......................................................................... 60
Figure 139 MB_Client_Data_2 .................................................................. 61
Figure 140 FACTORY IO Drivers ............................................................. 61
Figure 141 FACTORY IO Configurtion ..................................................... 62
Figure 142 Fornt Panel ........................................................................... 63
Figure 143 Block diagram ....................................................................... 63
Figure 144 Result Factory io ................................................................... 64
Figure 145 First issue ............................................................................. 65
Figure 146 Solution for first issue ........................................................... 65
Figure 147 Second issue ......................................................................... 65
Figure 148 Solution for seconed issue ..................................................... 65
Industrial Network Project Report

Introduction:
In today's interconnected world, efficient communication and data
exchange between software programs and hardware devices play a crucial
role in various industries, including automation and control systems. This
project focuses on developing a robust communication framework that
facilitates seamless data exchange between three software programs,
LabVIEW, TIA Portal, and Factory IO, and a hardware device, ESP32. The
communication framework leverages the power of OPC (Open Platform
Communications) protocol and Modbus protocol to establish reliable and
efficient communication channels.
LabVIEW, TIA Portal, and Factory IO are widely used software programs
that offer unique capabilities for control, automation, and simulation.
However, integrating these programs with a hardware device like ESP32
requires a standardized communication approach to ensure seamless
interoperability and data exchange. OPC protocol provides a widely
accepted standard for industrial communication, allowing different
software programs and hardware devices to communicate in a unified
manner. Additionally, the Modbus protocol, a widely used serial
communication protocol, enables efficient data transmission between the
programs and the hardware.

Figure 1 Industrial Network

1
Industrial Network Project Report

The primary objective of this project is to develop a communication


framework that acts as a central hub, facilitating real-time data transfer,
status updates, and control commands between LabVIEW, TIA Portal,
Factory IO, and the ESP32 device. By leveraging OPC and Modbus
protocols, the framework ensures compatibility, reliability, and scalability,
enabling the seamless integration of these software programs and hardware
device.
Efficient communication between these systems opens up possibilities for
enhanced control, monitoring, and automation. It enables users to harness
the combined strengths of LabVIEW, TIA Portal, Factory IO, and the
ESP32 device, allowing for synchronized operation and efficient
collaboration. The framework provides a unified environment where data
can be seamlessly exchanged, enabling real-time decision-making, system
optimization, and improved productivity.
Furthermore, the communication framework developed in this project
offers scalability and flexibility. It forms a foundation for future
expansions, accommodating additional software programs or hardware
devices as per evolving automation requirements. This adaptability ensures
that the communication infrastructure remains relevant and capable of
meeting the changing needs of industrial automation systems.
In conclusion, this project aims to develop a communication framework
based on OPC and Modbus protocols, enabling seamless data exchange
between LabVIEW, TIA Portal, Factory IO, and the ESP32 hardware
device. The framework enhances collaboration, control, and automation
capabilities, paving the way for efficient industrial automation and
monitoring systems. By establishing a standardized and efficient
communication infrastructure, this project contributes to the advancement
of interconnected systems and facilitates the seamless integration of
software programs and hardware devices in industrial environments.

Objectives:
• Understanding of how to communicate between LABVIEW, TIA
PORTAL, FACTORY IO, and ESP32 using OPC and Modbus
protocol.
• Understanding the concept of OPC and Modbus protocol.
• Understanding of how to create OPC and Modbus server or client.
• Be aware of the LABVIEW, TIA PORTAL, FACTORY IO
programs.
• Implementing the OPC and Modbus protocol.
• Enabling real-time monitoring and control.
• Ensuring reliability and scalability.

2
Industrial Network Project Report

The whole project:

Figure 2 The whole project

Student (1):
Equipments:
• HMI (LABVIEW):
1. Push button: (2)

Figure 3 Push button

2. Round Led: (4)

Figure 4 Round Led

3
Industrial Network Project Report

3. Numeric inductor: (2)

Figure 5 Numeric inductor

4. Dial: (3)

Figure 6 Dial

5. Waveform Chart: (1)

Figure 7 Waveform Chart

6. Thermometer: (1)

Figure 8 Thermometer

4
Industrial Network Project Report

• Factory_main (FACTORY IO):


1. Diffuse sensors: (2)

Figure 9 Diffuse sensors

2. Belt conveyors: (3)

Figure 10 Belt conveyors

3. Emitter: (1)

Figure 11 Emitter

4. Remover: (2)

Figure 12 Remover

5
Industrial Network Project Report

5. Push Buttons: (2)

Figure 13 Push Buttons

6. Potentiometer: (3)

Figure 14 Potentiometer

7. Digital Display: (2)

Figure 15 Digital Display

8. Capacitive Sensor: (1)

Figure 16 Capacitive Sensor

6
Industrial Network Project Report

9. Light Array (Emitter and Receiver): (1)

Figure 17 Light Array (Emitter and Receiver)

10.Electric Switchboard: (1)

Figure 18 Electric Switchboard

11.chain transfer: (1)

Figure 19 Chain transfer

12.Column: (1)

Figure 20 Column

7
Industrial Network Project Report

Procedures:
• Communication between LABVIEW & TIA PORTAL using OPC
protocol:
a) Open S7-PLCSIM Advanced & and start virtual Eth. Adapter.

Figure 21 S7-PLCSIM Advanced

b) Open OPC server configuration and create channel and device.

Figure 22 Create channel and device

8
Industrial Network Project Report

c) Put all the tags you need from TIA PORTAL in the OPC server
configuration.

Figure 23 Tags in TIA PORTAL

9
Industrial Network Project Report

Figure 24 Tags in OPC srver configuration

d) Press quick client in OPC server configuration & make sure that
quality is good.

10
Industrial Network Project Report

Figure 25 quick client

e) Create I/O server & create OPC client.

Figure 26 Create I/O server

f) Choose National Instruments.NIOPCServers.V5.

Figure 27 National Instruments.NIOPCServers.V5

11
Industrial Network Project Report

g) Add all the component that you will use.

Figure 28 Create bound variables

h) At FACTORY IO choose Modbus TCP/IP Server.

Figure 29 FACTORY IO Drivers

12
Industrial Network Project Report

i) Set the configuration.

Figure 30 FACTORY IO Configurtion

13
Industrial Network Project Report

LABVIEW:
• Result of the project

Figure 31 Fornt Panel

14
Industrial Network Project Report

Figure 32 Block diagram

ESP32:
Result of the project:

Figure 33 ESP32 hardware

15
Industrial Network Project Report

Code:

Figure 34 ESP32 Code

16
Industrial Network Project Report

Factory I\O:
• Result of the project:

Figure 35 Result Factory io

Issues & Solution:


• The LABVIEW was very slow to read and write:

Figure 36 First issue

Solution:
Put update rate 100 or 10:

Figure 37 Solution for first issue

17
Industrial Network Project Report

• When I want to connect FACTORY IO it failed:

Figure 38 Second issue

Solution:
Open the FACTORY IO as administrator:

Figure 39 Solution for second issue

18
Industrial Network Project Report

Student (2):
Equipments:
• HMI (LABVIEW):
1. Push button: (5)

Figure 40 Push button

2. Round Led: (6)

Figure 41 Round Led

3. Numeric inductor: (1)

Figure 42 Numeric inductor

4. Dial: (2)

Figure 43 Dial

5. Meter: (2)

Figure 44 Meter

19
Industrial Network Project Report

• PLC_1 (TIA PORTAL):


1. PLC_1 [CPU 1515-2 PN]:

Figure 45 PLC_1 [CPU 1515-2 PN]

• Factory_1 (FACTORY IO):


1. Diffuse sensors: (1)

Figure 46 Diffuse sensors

2. Belt conveyors: (2)

Figure 47 Belt conveyors

20
Industrial Network Project Report

3. Emitter: (1)

Figure 48 Emitter

4. Two-Axis Pick & Place: (1)

Figure 49 Two-Axis Pick & Place

5. Remover: (1)

Figure 50 Remover

6. Push Buttons: (4)

Figure 51 Push Buttons

21
Industrial Network Project Report

7. Potentiometer: (2)

Figure 52 Potentiometer

8. Digital Display: (1)

Figure 53 Digital Display

9. Capacitive Sensor: (1)

Figure 54 Chain transfer

10.Electric Switchboard: (1)

Figure 55 Electric Switchboard

22
Industrial Network Project Report

11.Column: (1)

Figure 56 Column

Procedures:
• Communication between LABVIEW & TIA PORTAL using OPC
protocol:
a) Open S7-PLCSIM Advanced & and start virtual Eth. Adapter.

Figure 57 S7-PLCSIM Advanced

b) Open OPC server configuration and create channel and device.

Figure 58 Create channel and device

23
Industrial Network Project Report

c) Put all the tags you need from TIA PORTAL in the OPC server
configuration.

Figure 59 Tags in TIA PORTAL

Figure 60 Tags in OPC srver configuration

24
Industrial Network Project Report

d) Press quick client in OPC server configuration & make sure that
quality is good.

Figure 61 quick client

e) Create I/O server & create OPC client.

Figure 62 Create I/O server

f) Choose National Instruments.NIOPCServers.V5.

Figure 63 National Instruments.NIOPCServers.V5

25
Industrial Network Project Report

g) Add all the component that you will use.

Figure 64 Create bound variables

• Communication between TIA PORTAL & FACTORY IO using


Modbus protocol:
a) Create four MB_client:
1) Sent_Coil:

Figure 65 Sent_Coil

26
Industrial Network Project Report

2) Sent_HoldingReg:

Figure 66 Sent_HoldingReg

3) Received_Input:

Figure 67 Received_Input

27
Industrial Network Project Report

4) Received_InputReg:

Figure 68 Received_InputReg

28
Industrial Network Project Report

b) Create MB_CLient_1 for the four previous blocks.

Figure 69 MB_CLient_1

29
Industrial Network Project Report

c) Create MB_Client_Data_1 for the four previous blocks.

Figure 70 MB_Client_Data_1

d) At FACTORY IO choose Modbus TCP/IP Server.

Figure 71 FACTORY IO Drivers

30
Industrial Network Project Report

e) Set the configuration.

Figure 72 FACTORY IO Configurtion

31
Industrial Network Project Report

LABVIEW:
• Result of the project:

Figure 73 Fornt Panel

Figure 74 Block diagram

32
Industrial Network Project Report

Factory I\O:
• Result of the project:

Figure 75 Result Factory io

Issues & Solution:


• When I want to download the code into my plc this error accrues:

Figure 76 First Error

Solution:
Put show devices with same addresses:

Figure 77 Solution for first error

33
Industrial Network Project Report

• When I want to connect OPC with LABVIEW this error accurses:

Figure 78 Second Error

Solution:
Change the ip from the ip network to plc ip:

Figure 79 Solution for second error

34
Industrial Network Project Report

Student (3):
Equipments:
• PLC_main (TIA PORTAL):
1. PLC_main [CPU 1515-2 PN]:

Figure 80 PLC_main [CPU 1515-2 PN]

Procedures:
• Communication between LABVIEW & TIA PORTAL using OPC
protocol:
a) Open S7-PLCSIM Advanced & and start virtual Eth. Adapter.

Figure 81 S7-PLCSIM Advanced

35
Industrial Network Project Report

b) Open OPC server configuration and create channel and device.

Figure 82 Create channel and device

c) Press quick client in OPC server configuration & make sure that
quality is good.
PLC_1:

PLC_2:

36
Industrial Network Project Report

PLC_main:

Figure 83 quick client

• Communication between TIA PORTAL (PLC_main) &


FACTORY IO using Modbus protocol:
a) Create four MB_client:
1) Sent_Coil:

Figure 84 Sent_Coil

37
Industrial Network Project Report

2) Sent_HoldingReg:

Figure 85 Sent_HoldingReg

3) Received_Input:

Figure 86 Received_Input

38
Industrial Network Project Report

4) Received_InputReg:

Figure 87 Received_InputReg

b) Create MB_Client_main for the four previous blocks.

39
Industrial Network Project Report

Figure 88 MB_Client_main

c) Create MB_Client_Data_main for the four previous blocks.

Figure 89 MB_Client_Data_main

40
Industrial Network Project Report

• Communication between PLC_main & PLC_1 using Modbus


protocol:
a) Create four MB_client at PLC_main:
1) Sent:

Figure 90 Sent

2) Received:

Figure 91 Received

41
Industrial Network Project Report

b) Create MB_Client_PLC1 for the four previous blocks:

Figure 92 MB_Client_PLC1

c) Create MB_Client_PLC1_DATA_SENT for the four previous


blocks:

Figure 93 MB_Client_PLC1_DATA_SENT

42
Industrial Network Project Report

d) Create MB_Client_PLC1_DATA_RECEVIED for the four


previous blocks:

Figure 94 MB_Client_PLC1_DATA_RECEIVED

e) Create four MB_server at PLC_1:


1) Sent:

Figure 95 Sent

43
Industrial Network Project Report

2) Received:

Figure 96 Received

f) Create MB_server_PLC1 for the four previous blocks:

Figure 97 MB_server_PLC1

44
Industrial Network Project Report

g) Create MB_server_PLC1_DATA_SENT for the four previous


blocks:

Figure 98 MB_server_PLC1_DATA_SENT

h) Create MB_srever_PLC1_DATA_RECEVIED for the four


previous blocks:

Figure 99 MB_server_PLC1_DATA_RECEIVED

45
Industrial Network Project Report

• Communication between PLC_main & PLC_2 using Modbus


protocol:
a) Create four MB_client at PLC_main:
1) Sent:

Figure 100 Sent

2) Received:

Figure 101 Received

46
Industrial Network Project Report

b) Create MB_Client_PLC2 for the four previous blocks:

Figure 102 MB_Client_PLC2

c) Create MB_Client_PLC2_DATA_SENT for the four previous


blocks:

Figure 103 MB_Client_PLC2_DATA_SENT

47
Industrial Network Project Report

d) Create MB_Client_PLC2_DATA_RECEVIED for the four


previous blocks:

Figure 104 MB_Client_PLC2_DATA_RECEIVED

e) Create four MB_server at PLC_2:


1) Sent:

Figure 105 Sent

48
Industrial Network Project Report

2) Received:

Figure 106 Received

f) Create MB_server_PLC2 for the four previous blocks:

Figure 107 MB_server_PLC2

49
Industrial Network Project Report

g) Create MB_server_PLC2_DATA_SENT for the four previous


blocks:

Figure 108 MB_server_PLC2_DATA_SENT

h) Create MB_srever_PLC2_DATA_RECEVIED for the four


previous blocks:

Figure 109 MB_server_PLC2_DATA_RECEIVED

50
Industrial Network Project Report

Issues & Solution:


• When I want to read and write the TIA PORTAL just stack with one
of them:

Figure 110 First Error

Solution:
Put Clock_5Hz in the disconnect pin of the mb_client:

Figure 111 Solution for first error

• The FACTORY IO doesn't read correctly as I want:

Figure 112 Second issue


Solution:
I found that this because the offset so make sure that you turn off the
optimized block access:

Figure 113 Solution for second issue

51
Industrial Network Project Report

Student (4):
Equipments:
• HMI (LABVIEW):
1. Push button: (1)

Figure 114 Push button

2. Round Led: (1)

Figure 115 Round Led

3. Dial: (3)

Figure 116 Dial

4. Meter: (1)

Figure 117 Meter

5. Tank: (2)

Figure 118 Tank

52
Industrial Network Project Report

• PLC_2 (TIA PORTAL):


2. PLC_2 [CPU 1515-2 PN]:

Figure 119 PLC_2 [CPU 1515-2 PN]

• Factory_2 (FACTORY IO):


1. Tank: (1)

Figure 120 Tank

2. Push Buttons: (1)

Figure 121 Push Buttons

53
Industrial Network Project Report

3. Potentiometer: (3)

Figure 122 Potentiometer

4. Digital Display: (3)

Figure 123 Digital Display

5. Electric Switchboard: (1)

Figure 124 Electric Switchboard

6. Column: (1)

Figure 125 Column

54
Industrial Network Project Report

Procedures:
• Communication between LABVIEW & TIA PORTAL using OPC
protocol:
d) Open S7-PLCSIM Advanced & and start virtual Eth. Adapter.

Figure 126 S7-PLCSIM Advanced

e) Open OPC server configuration and create channel and device.

Figure 127 Create channel and device

f) Put all the tags you need from TIA PORTAL in the OPC server
configuration.

Figure 128 Tags in TIA PORTAL

55
Industrial Network Project Report

Figure 129 Tags in OPC srver configuration

g) Press quick client in OPC server configuration & make sure that
quality is good.

Figure 130 quick client

h) Create I/O server & create OPC client.

Figure 131 Create I/O server

56
Industrial Network Project Report

i) Choose National Instruments.NIOPCServers.V5.

Figure 132 National Instruments.NIOPCServers.V5

j) Add all the component that you will use.

Figure 133 Create bound variables

57
Industrial Network Project Report

• Communication between TIA PORTAL & FACTORY IO using


Modbus protocol:
a) Create four MB_client:
1) Sent_Coil:

Figure 134 Sent_Coil

2) Sent_HoldingReg:

Figure 135 Sent_HoldingReg

58
Industrial Network Project Report

3) Received_Input:

Figure 136 Received_Input

4) Received_InputReg:

Figure 137 Received_InputReg

59
Industrial Network Project Report

b) Create MB_CLient_2 for the four previous blocks.

Figure 138 MB_CLient_2

60
Industrial Network Project Report

c) Create MB_Client_Data_2 for the four previous blocks.

Figure 139 MB_Client_Data_2

d) At FACTORY IO choose Modbus TCP/IP Server.

Figure 140 FACTORY IO Drivers

61
Industrial Network Project Report

e) Set the configuration.

Figure 141 FACTORY IO Configurtion

62
Industrial Network Project Report

LABVIEW:
• Result of the project:

Figure 142 Fornt Panel

Figure 143 Block diagram

63
Industrial Network Project Report

Factory I\O:
• Result of the project:

Figure 144 Result Factory io

64
Industrial Network Project Report

Issues & Solution:


• The scale in FACTORY IO just from 1 to 10:

Figure 145 First issue

Solution:
Put the NORM_X block and SCALE_X in TIA PORTAL:

Figure 146 Solution for first issue

• When I want to connect OPC with LABVIEW the quality is bad :

Figure 147 Second issue

Solution:
Make sure that you run the PLCSIM advanced and do reinitialized:

Figure 148 Solution for seconed issue

65
Industrial Network Project Report

Discussion & conclusion:


The OPC protocol provides a standardized framework for interoperability
between software applications and devices in the industrial automation
domain. It enables efficient and reliable data exchange, making it well-
suited for the project's communication requirements. With OPC, you can
seamlessly connect LabVIEW, TIA Portal, and Factory IO, allowing
them to share data and interact with the ESP32.
Additionally, incorporating the Modbus protocol enhances the
communication capabilities of your project. Modbus is a widely used
protocol in the industrial automation field, defining a set of rules for data
exchange between devices. By utilizing Modbus, you can establish a robust
and efficient communication link between the ESP32 and the software
programs, enabling control commands, data transfer, and real-time
monitoring.
The combination of OPC and Modbus protocols enables the project to
achieve a high degree of integration, allowing LabVIEW, TIA Portal, and
Factory IO to collaborate effectively with the ESP32 hardware. The result
is a comprehensive solution that facilitates seamless communication, data
sharing, and control across all components of the project.
To summarize, your project focuses on enabling communication between
LabVIEW, TIA Portal, Factory IO, and the ESP32 hardware using OPC
and Modbus protocols. By leveraging OPC's standardized framework,
seamless data exchange and control can be achieved among the software
programs and the hardware device. The incorporation of the widely-used
Modbus protocol enhances communication reliability and facilitates
efficient data transfer. This project's success will result in streamlined
collaboration, real-time monitoring, and effective control between the
software programs and the ESP32 hardware, contributing to an integrated
and efficient system.

References:
Next-Gen PLC Training - Factory I/O (factoryio.com)
Totally Integrated Automation Portal - Automation Software - Global
(siemens.com)
ni.com/en/support/downloads/software-products/download.labview.html

66

You might also like