Cookies are important for this site to function properly, to guarantee your safety, and to provide you with the best experience. By clicking OK, you accept all cookies. For more information, please access our Privacy Policy.
Table of Contents
Tutorials / 
Exploring the Power of Online and Diagnostics Mode for Siemens PLCs in TIA Portal
Intermediate

Exploring the Power of Online and Diagnostics Mode for Siemens PLCs in TIA Portal

Siemens
TIA Portal
Hardware
Software Engineering
PLC Troubleshooting

Introduction

Usually, there are two options to establish communication with S7-1200 and S7-1500 PLCs through a computer: a LAN cable is used directly or through a network switch device. In this method, it is necessary to have a regular or industrial network card installed on the computer. However, on the PLC side, there is no need for a network card as you can utilize the Profinet port on the CPU. For a visual representation and a better understanding of the communication principles between the computer and S7-1500 PLC, refer to Figure 1.1.

Figure 1.1 - TIA Portal online & diagnostics mode | Communication between PLC and PC
Figure 1.1 - TIA Portal online & diagnostics mode | Communication between PLC and PC

Online communication with the PLC is used for the following purposes: Downloading and uploading operations, testing the program and seeing the status of the variables, troubleshooting and referring to buffer information, access to some CPU information such as firmware version, serial number, amount of occupied CPU memory, comparison of online and offline program, Etc.

Prerequisites

What you will need to follow along with this tutorial:

Using Online and Diagnostics Mode

When it comes to communicating with the CPU and accessing its various information, the Online & Diagnostics mode comes into play. For this purpose, you can select the Online & Diagnostics item from the project tree structure or use the convenient Ctrl+D keyboard shortcut. As a result, the Online Access window will appear, as shown in Figure 2.1.

In the opened window, it is vital to configure the necessary settings for the communication and then click the Go Online button. In this case, communication with the selected CPU is established. You can tick the checkbox for the Flash LED to ensure the connection with the desired CPU. If the linkage with the desired CPU is launched correctly, the LED lamps on the CPU will start flashing.

Figure 2.1 - TIA Portal online & diagnostics mode | Online access window before communicating with the desired CPU
Figure 2.1 - TIA Portal online & diagnostics mode | Online access window before communicating with the desired CPU

After you make the online connection with the CPU, various CPU information can be accessed using the Diagnostics and Functions options provided on the left pane of the Online Access window.

Figure 2.2 - TIA Portal online & diagnostics mode | Online access window after communicating with the desired CPU
Figure 2.2 - TIA Portal online & diagnostics mode | Online access window after communicating with the desired CPU

Diagnostics Option

In the General section and within the Module area, CPU specifications such as technical code, firmware version, TIA Portal software version with which the CPU is programmed, and its rack and slot number are displayed. You can explore the Manufacturer Information area to access data such as the CPU serial number.

Figure 3.1 - TIA Portal online & diagnostics mode | General section of the diagnostics option
Figure 3.1 - TIA Portal online & diagnostics mode | General section of the diagnostics option

In the Diagnostic Status section, the status of the CPU module is shown. For example, in Figure 3.2, it is clear that the CPU is in okay condition and does not include any errors.

Figure 3.2 - TIA Portal online & diagnostics mode | Diagnostic status section of the diagnostics option
Figure 3.2 - TIA Portal online & diagnostics mode | Diagnostic status section of the diagnostics option

The Diagnostics Buffer holds significant importance as one of the most vital sections within the CPU. It serves as a repository for the historical log of events and errors associated with the CPU. When troubleshooting is required due to CPU errors, this section becomes indispensable. The Events area presents messages relevant to events and errors, providing valuable insights into system behavior. Further details about each specific event or error are displayed within the Details on Event area, aiding in comprehensive analysis and resolution.

Figure 3.3 - TIA Portal online & diagnostics mode | Diagnostics buffer section of the diagnostics option
Figure 3.3 - TIA Portal online & diagnostics mode | Diagnostics buffer section of the diagnostics option

Additionally, the Settings area allows customization of message display options within the buffer, empowering users to fine-tune their diagnostic experience and focus on relevant information effectively.

Figure 3.4 - TIA Portal online & diagnostics mode | Diagnostics buffer settings
Figure 3.4 - TIA Portal online & diagnostics mode | Diagnostics buffer settings

You can access relevant information about the CPU's scan cycle time within the Cycle Time section. It includes details such as the maximum and minimum CPU scan cycle times, the current CPU scan cycle time, and the default limit for scan cycle time set at 150 milliseconds. These insights provide a comprehensive understanding of the CPU's performance in terms of its scanning speed and help in optimizing system efficiency.

Figure 3.5 - TIA Portal online & diagnostics mode | Cycle time section of the diagnostics option
Figure 3.5 - TIA Portal online & diagnostics mode | Cycle time section of the diagnostics option

In the Memory section, you can retrieve information concerning the occupied and free capacity of each memory area of the CPU. It enables you to monitor the utilization of CPU memory resources. By accessing this data, you can effectively manage and optimize memory allocation to ensure efficient operation of the CPU.

Figure 3.6 - TIA Portal online & diagnostics mode | Memory section of the diagnostics option
Figure 3.6 - TIA Portal online & diagnostics mode | Memory section of the diagnostics option

Within the Profinet Interface section, you can access Profinet interface information in the Ethernet Address area, including details like MAC address, IP address, Subnet Mask, and more.

Figure 3.7 - TIA Portal online & diagnostics mode | Ethernet address of the CPU’s Profinet interface port
Figure 3.7 - TIA Portal online & diagnostics mode | Ethernet address of the CPU’s Profinet interface port

Additionally, in the Ports area, you can view the connection status of each CPU Profinet port and obtain relevant information about them. It allows for efficient management and troubleshooting of Profinet communication within the CPU.

Figure 3.8 - TIA Portal online & diagnostics mode | Connection status of the CPU’s Profinet interface port
Figure 3.8 - TIA Portal online & diagnostics mode | Connection status of the CPU’s Profinet interface port

Functions Option

You can assign an IP address to the CPU Within the Assign IP Address section. This option is practical when the CPU undergoes a factory reset alongside deleting its IP address. By employing this feature, you can reestablish the IP address configuration, ensuring proper network connectivity and communication for the CPU.

Figure 4.1 - TIA Portal online & diagnostics mode | Assign IP address section of the functions option
Figure 4.1 - TIA Portal online & diagnostics mode | Assign IP address section of the functions option

In the Set Time section, you can configure the date and time of the CPU. For this purpose, enable the Take From PG/PC checkbox and click the Apply button. This action synchronizes the CPU's date and time with the date and time of the computer.

Figure 4.2 - TIA Portal online & diagnostics mode | Synchronizing CPU’s date and time with the date and time of the PC
Figure 4.2 - TIA Portal online & diagnostics mode | Synchronizing CPU’s date and time with the date and time of the PC

Alternatively, if you need to set a different date and time for the CPU, you can uncheck the Take From PG/PC checkbox. By doing so, you can manually enter the desired date and time in the Module Time section. This flexibility allows for accurate time synchronization within the CPU, catering to specific requirements as needed.

Figure 4.3 - TIA Portal online & diagnostics mode | Assigning exclusive date and time for the CPU
Figure 4.3 - TIA Portal online & diagnostics mode | Assigning exclusive date and time for the CPU

Within the Firmware Update section, you can upgrade the CPU version, referred to as the Firmware Version. To perform this upgrade, you must first download the firmware version update file from the Siemens website and save it on your computer. Next, select the desired file by using the Browse button. Finally, initiate the upgrade process by left-clicking the Run Update button. It allows you to seamlessly update the CPU version and ensure compatibility with the latest features and enhancements.

Figure 4.4 - TIA Portal online & diagnostics mode | CPU’s firmware update section of the functions option
Figure 4.4 - TIA Portal online & diagnostics mode | CPU’s firmware update section of the functions option

In the Assign Profinet Device Name section, you can set the name of the Profinet equipment. This functionality proves particularly useful when deploying a new ET or drive for the first time in the Profinet network. If the connection with the desired module is established, its information will be displayed in the table at the bottom of the window. The intended name will be applied to the module by left-clicking the Assign Name button. It enables easy identification and management of the module within the Profinet network, enhancing overall network organization and administration.

Figure 4.5 - TIA Portal online & diagnostics mode | Assing Profinet device name section of the functions option
Figure 4.5 - TIA Portal online & diagnostics mode | Assing Profinet device name section of the functions option

In the Reset to Factory Settings section, you can return the CPU settings to the factory settings by clicking the Reset button. It is important to note that if the Retain IP Address option is selected from the options above the Reset button, the IP address set for the CPU will not be deleted in the reset process. However, if the Delete IP Address option is selected, the IP address assigned to the CPU will be deleted as part of the reset procedure. This feature allows for flexible resetting of the CPU settings while providing control over the retention or deletion of the IP address configuration.

Figure 4.6 - TIA Portal online & diagnostics mode | Reset to the factory settings section of the functions option
Figure 4.6 - TIA Portal online & diagnostics mode | Reset to the factory settings section of the functions option

Unique Configuration Settings of S7-1500 CPU

In addition to the aspects mentioned earlier, the S7-1500 offers extra exclusive features that set it apart from the S7-1200. Let's explore these distinct elements further.

Within the Memory section, Work Memory information is displayed through two distinct areas: Code and Data.

Figure 5.1 - TIA Portal online & diagnostics mode | S7-1500 memory section of the diagnostics option
Figure 5.1 - TIA Portal online & diagnostics mode | S7-1500 memory section of the diagnostics option

Screen information for S7-1500 CPUs is shown in the Display section, offering crucial hardware details at a glance.

Figure 5.2 - TIA Portal online & diagnostics mode | S7-1500 display section of the diagnostics option
Figure 5.2 - TIA Portal online & diagnostics mode | S7-1500 display section of the diagnostics option

Within the Firmware Update section, apart from the option to change the CPU firmware, you can also update the firmware associated with the CPU screen. It allows you to ensure that the CPU and its screen are running the latest firmware versions, providing enhanced functionality and compatibility.

Figure 5.3 - TIA Portal online & diagnostics mode | S7-1500 display firmware update section of the functions option
Figure 5.3 - TIA Portal online & diagnostics mode | S7-1500 display firmware update section of the functions option

You can format the CPU memory card within the Format Memory Card section whenever required. For instance, if the memory card has been previously used in a CPU 1200 and has not been formatted using this feature, it cannot be utilized in a CPU 1500. In such a case, an error message will be shown when attempting to download a program to the CPU.

Figure 5.4 - TIA Portal online & diagnostics mode | S7-1500 format memory card section of the functions option
Figure 5.4 - TIA Portal online & diagnostics mode | S7-1500 format memory card section of the functions option

In the Save Service Data section, you can save the desired module information in the format of a .dmp file. This file can be sent to Siemens whenever you require troubleshooting assistance for the respective module.

Figure 5.5 - TIA Portal online & diagnostics mode | S7-1500 save service data section of the functions option 
Figure 5.5 - TIA Portal online & diagnostics mode | S7-1500 save service data section of the functions option 

Conclusion

In conclusion, you learned how to use the Online and Diagnostics mode. You figured out that once you establish an online connection with the CPU, you can utilize the Diagnostics and Functions options to access a multitude of CPU information. You grasped that within the Diagnostics option, you can access CPU specifications such as technical code, status of the module, historical log of events and errors, scan cycle time, free and occupied capacity of each memory area, and information on the communication interface port. Finally, you understood that within the Functions option, you can adjust CPU elements such as IP address, date and time, firmware version, and factory reset.