Back to tutorials

Downloading Programs to a Siemens PLC and HMI Using TIA Portal, SD Cards, or USBs

By
Anil Mamillapalli
Learning Path
No items found.
Table of Contents

Introduction

Siemens HMI and PLC programs can be developed in a single software application: TIA Portal. TIA Portal requires a license that most program developers/OEMs have but can be cost-prohibitive for many users. If you don’t have access to TIA Portal, it is practical to use SD cards/USB devices to download programs to the PLC and HMI. 

This tutorial covers various methods to download HMI/PLC programs and the tools needed, including :

  • TIA Portal - This software application is used to create HMI and PLC programs, configure devices with IP addresses and download the programs to devices.
  • Siemens Memory Cards - Memory cards from Siemens come in different sizes and can be expensive, but not as much as buying a TIA Portal license. So, this is an effective and popular alternative. 
  • USB - When it comes to downloading programs to HMI panels, a generic USB can be used.
  • Siemens HMI panel - When the preferred IP settings are different from the default Siemens HMI and PLC IP addresses it is necessary to change the IP settings of both PLC and HMI either from TIA Portal or from the HMI panel. This tutorial covers both options. 

One of the challenges of using these methods is establishing communications between various devices in the system which requires knowledge of IP address settings. We will cover this practice in this tutorial.   

Prerequisites

The following software applications and tools are needed :

  • Windows operating system – A Windows 7 virtual machine is used in this tutorial. 
  • TIA Portal – TIA Portal version 15 is being used in this tutorial . 
  • Siemens Memory Card – Siemens part number 6ES7954-8LC03-0AA0 is of 4 MB capacity. Pick a similar card based on the size of your PLC program. 
  • USB Device – A generic USB storage device works for this purpose.  

Note that: 

  1. The Siemens memory cards are formatted in a specific way when manufactured. Formatting these memory cards on a PC will render them useless. If the old program files need to be removed, a delete operation suffices just like with any other USB storage device.
  2. The same USB device can be used for data logging from a Siemens HMI once the HMI is configured and the program is set up the right way. 

Step 1 - Downloading the HMI/PLC program using TIA Portal and a USB

Connect the ethernet cable to the PC and the PLC X1 port. Make sure the IP address of the PLC port is on the same subnet as the PLC and HMI. Power up your PLC and HMI at this time.

Open TIA Portal and a program that has HMI and PLC devices added. Change TIA Portal to “Project View” by clicking on the button in the bottom-left part of the window.

Choose “Online” from the menu at the top of the window and select “Accessible Devices”, from here TIA Portal can connect to the available devices before proceeding to the next part.

In the project tree, right-click on the PLC device name then select “Download to device”. This brings up a window that displays a list of devices accessible, compatible, or with the same IP address based on the selection.  

Click on “Start Search” and connect to the device. 

Note that the “Flash LED” feature on the left can be used to flash the LEDs on the actual PLC device to confirm it is the correct device. 

Once the device is displayed in the list of target devices, select it. Click the Load button at the bottom of the pop-up. If asked to confirm adding an IP address in the subnet, confirm and continue. Correct any errors and click the Load button at the bottom of the new pop-up. Click the Finish button when the download is complete. 

Downloading the HMI program using TIA Portal is very similar to downloading the PLC program using TIA Portal. 

After opening a project in TIA Portal and switching to “Project View” navigate to the HMI name in the project tree. 

Choose “Online” from the menu at the top of the window and select “Accessible Devices”, from here TIA Portal can connect to the available devices before proceeding to the next step. 

In the project tree right-click on the HMI device name then select “Download to device”. This will bring up a window that displays a list of devices accessible, compatible, or with the same IP address based on the selection. 

Click on “Start Search” and connect to your device. Same as for the PLC, the “Flash LED” feature on the left can be used to flash the entire screen of the actual HMI device to confirm it is properly connected. 

Once the device is displayed in the list of target devices select it and click the Load button at the bottom of the pop-up. If asked to confirm adding an IP address in the subnet, confirm and continue. Correct any errors and click the Load button again at the bottom of the new pop-up. 

Click the Finish button when the download is complete. 

In the next sections, you will learn how to download your HMI and PLC programs to devices without TIA Portal.

Note that TIA Portal is still needed to program/configure the SD memory cards and USB devices for programming PLCs and HMIs.

Step 2 - Using a Siemens memory card to download a program to your PLC

PLCs come with firmware loaded. Just like any software, different versions of firmware have different features. If you prefer to load the PLC with a specific version of the firmware, Siemens memory cards can be configured to do that. Download the firmware to the PLC before downloading the PLC program. 

The three LED indicators to display the status of the PLC are :

  • Run/Stop
  • Error
  • Maint - Stands for maintenance

In order to load a specific firmware version into your PLC , you’ll first need to power off the PLC, insert the Siemens memory card configured for firmware, into the PLC memory card slot, andeboot the PLC. The ‘RUN’ LED on the PLC will start flashing Green and Yellow to indicate that the firmware is being copied. When the ‘RUN LED turns yellow and ‘MAINT’ LED flashes yellow, disconnect power to the PLC and remove the firmware memory card. Lastly, reboot the PLC.


Once the desired firmware is loaded onto the PLC, follow these steps to download the program. Power off the PLC and insert a Siemens memory card (that contains the PLC program) into the PLC memory card slot. Reboot the PLC. ‘RUN’ LED on the PLC flashes Green and Yellow to indicate that the software is being copied. When the ‘RUN LED turns yellow and ‘MAINT’ LED flashes yellow, shut down the PLC and remove the memory card. Reboot the PLC and confirm that the ‘RUN’ LED is solid green.

Step 3 - Using a USB to download a program to your Siemens HMI

Insert the pre-programmed USB into the HMI. Power up the HMI, and select ‘Settings’ from the menu when you see the screen below.

On the settings screen, select ‘Service & Commissioning’, then ‘Project Download’, and finally ‘Start Search’.  Select the arrow symbol as shown below, to complete steps 1 through 4. Wait for the transfer to be complete and the Runtime to start. Once the process is complete, the starting screen of the project will be displayed. 

In certain cases, even when the PLC and HMI program is successfully downloaded, if the IP addresses of the devices are not in the same network they will not communicate with each other. Therefore it is important to ensure that the devices IP addresses are in the same subnet. 

Changing the IP address for your PLC & HMI using TIA Portal is quite straightforward. However, if you don't have access to TIA Portal, you'll need to configure the settings directly from the HMI. This will be covered in the next step.

Step 4 - Setting the IP address of HMI and PLC devices from the HMI

To set the IP address of the PLC, reboot the HMI and select the Settings button from the screen. Select “Service & Commissioning” from the settings screen, and select ‘Assign IP Address’ from the left-side menu. 

Select ‘Accessible devices in target subnet’ and continue to the next step. Select the PLC (1215 DC/DC/Rly in this case) from the list and continue to the next step. Enter the desired PLC IP address parameters on the screen. Once the settings are applied successfully a message is displayed on the screen confirming that the Station name and IP suite settings could be assigned. This is how the PLC IP address is changed from the HMI. Next we’ll learn how to change the IP address of the HMI.

Once PLC IP address parameters are successfully updated go to ‘Service & Commissioning’. On the lower left side of the screen scroll down to select ‘Edit Connections’. Once the screen loads,, enter the IP address parameters and turn on Override. Note that if you get multiple results, make sure that you are editing the correct HMI.



Go back to the ‘Settings’ screen and select ‘Network Interface’. Once on the Interface PN X1 screen loads follow these steps:

  1. Verify that DHCP is off
  2. Enter HMI IP address parameters as desired.

When changes have been updated successfully select ‘Start’ and wait for the HMI to start and confirm that your devices are communicating.

Conclusion

This tutorial covered how to download your programs to a Siemens PLC and HMI, using TIA Portal, a Siemens memory card and a USB. We also covered the steps you need to take in order to change the IP addresses of your PLC and HMI from the HMI.

Back to tutorials

Ready To Learn More?

Level-up your career with unlimited access to practical, in-depth technical courses taught by industry experts. Explore our courses