A Complete Guide to SINAMICS Drive Integration in TIA Portal

In this tutorial, I provide you with a complete, step by step guide for integrating SINAMICS drives in TIA Portal projects including how to commission the standard and safety features of SINAMICS drives in Startdrive, how to integrate and control SINAMICS drives in your TIA Portal projects using standard telegrams and blocks, and how to control and visualize the status of SINAMICS drives in a WinCC HMI application.

Drive control is one of the most common forms of control encountered in industrial automation. Depending on what PLC manufacturer, drive manufacturer, and sophistication of the technology you are using, your approach to integrating a drive into a PLC project and controlling the drive will be different.

In this post, I will provide you with a complete, step by step guide, to integrating, commissioning, and controlling a SINAMICS drive in TIA Portal. In the next sections, we will cover;

  • How to add a SINAMICS drive to a TIA Portal project using online detection
  • How to set up and commission a SINAMICS G120C drive
  • How to set up local safety with a SINAMIC G120C drive
  • How to control a drive with an S7-1500 PLC
  • How to visualize the drive's control and status on a HMI

As you may have gathered, this will be a long post. If you don't have one already, I advise that you make a good cup of coffee, put your phone on silent, and fire up TIA Portal before you go any farther.

A Note on the SINAMICS Drives Portfolio

Overview of the SINAMICS Range of Drives

In this post, we will be focusing on the integration, commissioning, and control of a SINAMICS G120C drive. This drive is part of Siemens' scalable range of continuous motion drives, shown above.

As you can see from the image, all of the drives in this range, excluding the V20 Basic drive, are engineered in TIA Portal using the Startdrive package. This means that the material covered today is specific to the G120C product family, but is also relevant to higher end drives including G120P, G120, G120D, and S120 SINAMICS drives.

System Overview

System Overview

In this tutorial, we will be integrating a SINAMICS G120C drive, an S7-1500 PLC, and a WinCC Unified Comfort HMI Panel into a TIA Portal project. All of these devices will communicate with each other on  Profinet network.

Safety of the application is provided using the local safety interface of the G120C drive. With this safety interface, an emergency stop can be wired directly to the terminals of the G120C drive with no intermediate safety relay required. The emergency stop connection is used to activate the Safe Torque Off (STO) feature of the drive. When STO is activated, the drive will coast to a stop and remain in a safe state until the emergency stop is deactivated.

A Note on SINAMICS Drive Control Over Profinet

In this application example, we will be controlling a SINAMICS G120C drive over Profinet. This means that the drive and PLC exchange telegrams over an industrial Ethernet network.

SINAMICS drives support various standard telegrams for data exchange with a PLC. In this example, we will be using Telegram 1 to exchange data between the PLC and the drive. With Telegram 1, two words of data are exchanged between the PLC and drive. Specifically, the PLC sends the drive a telegram containing a drive control word and a setpoint speed and the drive sends the PLC a telegram containing the drive status word and the actual speed.

When integrating a SINAMICS drive into a TIA Portal project, you could dive into the documentation, pick apart the control and status words, and engineer your own application code to control the drive.

A much easier, and much more recommended, approach to integrating SINAMICS drives into a TIA Portal project is to use the software blocks developed by Siemens and included in TIA Portal to control the drive. By using this block, we can skip the hard work of understanding the telegrams exchanged between the drive and PLC and the process of engineering software blocks to control and interpret the status of the drive.

As you may have guessed, we will focus on the latter approach in this tutorial. Later on, you will see how to use the SinaSpeed software block to control the G120C drive. I'm a firm believer in doing the least work possible to achieve the desired result, and using an off the shelf block for drive control definitely counts as the least work possible.

If you decide to engineer your own solution, then the control part of this tutorial will not be relevant to you but you may still get some value out of the sections in this tutorial on drive integration, commissioning, and safety commissioning.

Now, let's open up TIA Portal and dive into the good stuff.

Step by Step Application Example

Upload Drive to Project

Launch TIA Portal and create a new project.

In this project, we want to add the G120C drive that we will control in this application example. We could do that by browsing for the correct part number in the Hardware Catalog but it is often faster and easier to upload the drive to the project if we are on the same Ethernet network as the drive.

To upload the drive into the TIA Portal project, we first need to search for it. To search for devices available online, expand the Online access tab of the Project Explorer. Here, you can select the correct network adapter and click on Update accessible devices. TIA Portal checks for accessible devices on this network adapter and lists the devices it found below the network adapter.

Update Accessible Devices

If the drive is accessible via this network adapter, you will see it listed below the network adapter.

You can expand the drive and double click on "Online & diagnostics" to view diagnostic information from the drive online. The "Diagnostics general" page gives a snapshot of the important data from the drive. On this page you can see the drive's type, part number, important characteristics, and firmware version.

Diagnostics General

You can upload devices that are accessible online directly into your TIA Portal project. As part of the upload process, all of the details and parameters of the drive are uploaded.

To upload an accessible device, select the device in the Online Access tree and click Online > Upload device as new station (hardware and software)

Upload Device as New Station

Once the upload is finished, switch to the Devices & Networks editor where you will see that the drive has been added to the project.

Station Uploaded

Upload PLC to Project

Next, we want to add the PLC to our project. Once again, we could add this to the project using the Hardware Catalog or we can upload the PLC data from an accessible device. To save some time, we'll do the latter.

Uploading a PLC from an accessible device is slightly different than uploading a station. To upload a PLC from an accessible device, we first need to add a generic PLC to our TIA Portal project. This effectively creates a placeholder space for a PLC in your Hardware Configuration.

To add a generic PLC to your project, double click on "Add new device" in the Project Tree. In the Add New Device dialog scroll down to "Unspecified CPU 1500", select the generic PLC catalog number and click OK. There is also a generic PLC available for S7-1200 systems.

Add Generic PLC to Project

An unspecified PLC is added to the project. You can convert this PLC to a specific PLC using the Hardware Catalog or by clicking on "detect" to upload the PLC data from an accessible device.

Click on "detect" to open the Hardware Detection dialog box.

Detect the Configuration of a Connected PLC

The Hardware Detection dialog opens. From here, you can click on "Start search" to update the list of accessible devices. Once the search has finished, you can select the PLC to be uploaded and click on "Detect" to upload the PLC data into the project and replace the unspecified CPU.

Upload PLC Data from Online Device

After uploading, the unspecified PLC is replaced by the data from the online device, in this case a 1513F-1 PN PLC. If we had a power supply or I/O modules in the rack, then these would also be uploaded.

Uploaded PLC Data

Add HMI to Project

Next, I'll add a HMI to the project. I'm importing this HMI from a library project because the focus of this post is not on developing a HMI application. As you will see later on, this is a very simple HMI application that reads basic data from the G120C drive and allows a user to start, stop, reset, and set the speed of the drive.

Add HMI to Project

Configure the Profinet Network

With all of the devices added to the project, we can configure the Profinet network. We do this in the Devices and Networks editor.

In the Devices and Networks editor, activate the Network View and create a connection between the drive and PLC by dragging and dropping from the Profinet port on the PLC to the Profinet port on the drive. After releasing, you see that a network connection is added between the two devices and that the drive is now a slave of PLC_1.

Create a Network Connection Between the PLC and Drive

For the HMI, we want to connect the HMI to the PLC's subnet and to create a HMI connection between the PLC and HMI. TIA Portal allows us to create both these connections with one action.

To create a HMI connection between the PLC and HMI, activate the Connections tool by clicking on Connections and make sure that HMI Connection is selected in the Connection Type dropdown list. Devices which support a HMI connection are shown in blue.

To create a HMI connection between the PLC and HMI, drag and drop from the PLC to the HMI. When you release your mouse, you are prompted to also connect the HMI to the PLC's subnet. Click on the name of the subnet to add the HMI to the subnet.

Create HMI and Subnet Connection

Now, our Profinet network is completely configured.

Configured Profinet Network

After configuring the Profinet network, download the Hardware Configuration to the PLC. If it was on before, the Bus Fault (BF) light on the drive should now be off indicating that the drive has a connection to its Profinet master.

Commission the Drive with Startdrive

With the hardware and Profinet network configured, we can start commissioning the G120C drive using Startdrive, Siemens' drive configuration tool which is integrated directly into TIA Portal.

To launch Startdrive, expand the drive in the Project Explorer and double click on "Commissioning".

Launch Startdrive

In this application example, we will commission the drive offline and download the updated parameters to the drive. You can also commission the drive online. In this case, you would have to upload the updated parameters from the drive to have the up to date drive parameters in your TIA Portal project.

For easy commissioning, Startdrive has a built in commissioning wizard. Launch it by clicking on the "Commissioning Wizard" node in the Startdrive tree.

Application Class

The Commissioning Wizard launches and the first step we are presented with is to specify the Application Class of the application we are using the drive for. The two application classes are Standard and Dynamic. If you are not sure which Application Class is correct for your project, there is some useful help text that describes what a Standard and Dynamic application is.

Since we are using this drive to control a continuous conveyor, we will leave the default selection of Standard Application Class. In the background, this sets a whole host of parameters for the drive. After selecting the Application Class, click Next.

In case you want more granular control over the parameters for the drive, you can also switch to expert mode and bypass the Commissioning Wizard.

Setpoint Specification

In the next screen, we specify where the drive's ramp is generated.

The bottom option is used for application's with a standalone drive. In this case, the ramp is generated in the drive and the setpoint is transferred to the drive via its analog inputs.

The middle option is the most commonly used where the ramp is generated in the drive and the setpoint is transferred to the drive over the Profinet network.

The top option is used when you want to generate the ramp in the PLC. This is for application's that used advanced controllers with technology functions.

For our conveyor control application, we will leave the default selection of ramp generation in the drive and setpoint coming from the controller over a Profinet network. Once the setpoint source is specified, click Next.

Setpoint Specification

Setpoint/Command Sources

In the next screen, we are prompted to specify where the setpoints and commands are coming from. Since we are controlling the drive over Profinet, the default option "[7] Fieldbus with data set changeover" is correct.

At the bottom of the screen, another dropdown list allows you to specify the type of telegram exchanged between the drive and the PLC. The block that we will use to control the drive, SinaSpeed, is designed to work with Telegram 1 so we will leave the default selection in this dropdown. Other telegrams are available which contain more data about drive properties like current, torque and power.

Once these options are selected, click Next.

Select Setpoint Source and Telegram Type

Drive Settings

On the next screen, you can specify the settings for your drive. Here, you can specify the type of motor being controlled and the supply voltage for the drive.

Once these settings are filled out, click Next.

Drive Settings

Drive Options

On the next screen, you can specify any optional accessories that are included in your setup. Specifically, you can specify if you are using a brake resistor and the size of the brake resistor that you are using. You can also specify if a filter is used between the drive and the motor. It's important to specify the use of a filter because a filter will add extra inductance when the drive is doing a motor identification.

When the drive options are specified, click Next.

Drive Options

Motor Details

On the next screen, you provide the details of the motor connected to the drive. If you have a complete Siemens drive train (that is a SIMATIC drive and a SIMOTIC motor), then you can select your motor from a catalog list.

To do this, click on "Select from order number list" in the "Motor configuration" dropdown.

Select From Order Number List

Now, you can select the correct motor from a list of SIMOTIC motors. After selecting the correct motor, choose the connection type and the type of temperature sensor used. Once the Motor Details are finalized, click Next.

Motor Details

Of course, if you are not using a SIMOTIC motor, you can also manually enter all of the information from the motor's data plate.

Motor Holding Brake Details

On the next screen, you can specify if a motor holding brake is used. In this application, I am not using a brake. If I was using a brake, the G120C drive supports sequence control using a digital output. With sequence control, the motor is magnetized before the holding brake is released to prevent droop in the system.

When the motor holding brake details are finalized, click Next.

Motor Holding Brake Details

Important Parameters

On the next screen, you have the chance to set some important parameters for the application like speeds and ramp times. The current limit is automatically calculated but you can modify it to a custom value if you wish.

Set the Important Application Parameters

Drive Functions

Finally, you can specify the load type that the drive is controlling. In our application, where the drive controls a conveyor, we are dealing with a constant, linear load so we can leave the default option selected here.

Below the load characteristic, we have the option to to do a motor identification. When the inverter identifies the motor, it sends out high frequency pulses at specific frequencies and voltages to the motor to create a motor model and sets some parameters in the drive based on this model. I also recommend doing a motor identification when commissioning a new motor.

Choose to do a motor identification at standstill and click Next.

Drive Functions

In the final screen of the Startdrive Commissioning Wizard, you have a summary of all of the options that have been selected. I recommend that you have a scroll through this summary to make sure that everything you have selected is correct. Once you are happy, click Finish to close the wizard.

Commissioning Wizard Summary

Download to Device

Since we have done the commissioning of the drive offline, we need to download the parameters to the drive. With the drive selected in the Project Tree, click on the download icon and download the parameters to the drive.

Download Parameters to Drive

When prompted, remember to save the parameters to the non-volatile EEPROM memory of the drive.

Save Parameters to EEPROM

At this stage, our drive is commissioned, excluding the integrated safety part. Before commissioning safety, let's check that everything is working as expected by using the integrated Control Panel in TIA Portal to run the motor.

Running with the Integrated Control Panel

To use the integrated drive control panel in TIA Portal, I need to Go Online with the drive. Once online, you can open the control panel by clicking on "Control panel" in the Startdrive tree.

To enable manual control of the drive, you have to activate Master Control. You can do this by clicking on the Activate button under the "Master control" section.

Activate Master Control

Read the warning that pops up carefully and click Accept to activate master control.

Accept the Master Control Warning

Once the control panel is activated, we can see that a motor measurement is active. This means that the next time we try to run the drive, the motor measurements will be done at a standstill.

Motor Measurement Warning

Click on the Forward button to start the motor measurement process. The control panel updates to indicate that the motor measurement is in process and I can hear the drive emitting high frequency noises.

Stationary Measurement in Progress

Once the measurements are finished, the drive switches to an off state.

Now, we can run the drive manually from the control panel. To do this, enable the drive by clicking on "Set" under "Drive enables". Once the drive is enabled, you can set a speed in the Speed number input and click Forward to run the motor.

Run the Drive Manually

At this stage, the motor should be turning. With this simple test, we have confirmed that the drive has been commissioned successfully.

When you are satisfied, stop the motor using the Stop button and deactivate master control with the Deactivate button.

Now that we are sure that the drive commissioning was successful, we can move onto commissioning the drive's integrated safety features.

Integrated Safety Commissioning

To start the integrated safety commissioning of the drive, open the Parameter node of the drive in the Project Tree. From here, click on the "Start Safety integrated commissioning" on the Safety Integrated screen.

Start Safety Integrated Commissioning

Once you start commissioning the safety features of the drive, you are prompted to enter the default password for the drive and to set a new, more secure password. Enter the default password, 0, for the drive and, if you wish, set a new password.

I will skip setting a new password by clicking OK after entering the default password. Obviously, this is not recommended for a drive that will be used in a production system because it means that anyone can modify the safety features of the drive.

Enter and Update the Safety Password for the Drive

The first step in commissioning the safety of the drive is to activate the safety features. In the "Selecting safety functionality" dropdown, choose the safety functions that you want to enable in the drive.

For a G120C drive, the only option available is "Basic Functions". For higher end drives, there are also extended safety functions available.

Selecting Safety Functionality

Once the safety features have been activated, some additional buttons appear. To commission the safety features of the drive, we want to visit the screens that these buttons link to in order.

Click on "Control type / Safety Integrated Functions" to begin.

Additional Buttons for Safety Commissioning

The Control Type option indicates where the drive is getting the STO signal from. The options here are from the terminals in the case of a hardwired e-stop, over Profisafe when controlled by a failsafe PLC, or a combination of both.

In this example, the STO input will come from an e-stop which is hardwired to the STO terminals of the drive. Therefore, I leave the Control Type option as "via terminals".

Control Type is Via Terminals

You can also click on the STO button to see the logic behind the STO function and select a digital output to turn on when STO is activated. This may be useful for activating a beacon or beeper when the local safety is not OK.

STO Logic and STO Active Output

The next screen to visit is the "Test stop" screen. In this screen, you specify the amount of time that is permitted between Test Stops of the drive. In a Test Stop, you activate and deactivate the STO features of the drive to verify that the safety circuit is working correctly. The time permitted between Test Stops for a drive is an output of the risk assessment that you undertake for the drive.

When this time elapses, the drive will have a warning indicating that a Test Stop is required. The drive will carry on running while this warning is active but there will be an alarm present on the drive. A Test Stop is required to clear the alarm.

Again, you can activate a digital output on the drive when a test stop is required.

Test Stop Time

On the next screen, F-DI / F-DO / PROFIsafe, you can configure some settings related to the safety inputs of the drive such as discrepancy time between the input channels and filtering time. In general, you won't need to modify these values from the default values.

F-DI Input Settings

This is the end of the safety commissioning for the drive. Finalize the settings by clicking on "End Safety Integrated commissioning".

End Safety Integrated Commissioning

When prompted, activate the safety settings by copying them from RAM to ROM.

Activate the Safety Settings

Once the safety settings are activated, you will notice that the drive is shown in fault in the Project Tree. That's because there is a warning active that we have to perform a safety acceptance test. You can read about how to do a correct safety acceptance test in the SINAMICS Safety Integrated manual.

Now that the safety commissioning is finalized, let's test what we have done so far in the integrated control panel.

Test Safety Commissioning in Integrated Control Panel

Back in the integrated control panel, we see that the drive is in fault and the reason for the fault is that an acceptance test is required. Click on "Acknowledge faults" to clear the fault.

Acknowledge Faults

With the fault cleared, run the drive via the integrated control panel and press the hardwire e-stop. The drive will coast to a stop, indicating that the STO feature of the drive is properly commissioned.

Our safety commissioning is now done online in the drive. To ensure that we have an offline backup of the most up to date parameters for the drive, click on upload and upload the drive's data to the TIA Portal project.

At this stage, we are finished with both the standard and safety commissioning of the drive. With the drive commissioning out of the way, we can focus on integrating the drive with the PLC to control the drive over Profinet.

Upload the Drive Parameters

PLC Control of the Drive

Program Conveyor Speed Control

In the PLC, I'll create a new Function Block to encapsulate the control of the conveyor called Conveyor Speed Control.

Add a New Block Called Conveyor Speed Control

Inside this block, we will create a call to the block that interfaces with the drive. This block, called SinaSpeed, is a standard block developed by Siemens for speed control applications of SINAMICS drives. Create a call to the block by dragging and dropping the block from the Instructions pane under Optional Packages > SINAMICS > SinaSpeed.

Create Call to SinaSpeed

In the Call Options dialog, choose to create a multi-instance DB for the call.

Create a Multi Instance DB

Let's look at the pins for this block while we tag it up.

The EnableAxis pin acts as a start/stop control for the drive. When this pin high, the motor will run and when the pin is low, the motor will stop.

The AckError pin is used to acknowledge and reset faults in the drive.

The SpeedSp pin is the speed that we want the drive to run at, measured in RPM.

We'll skip the RefSpeed pin for now and circle back to it when we have finished parameterizing the other pins.

The ConfigAxis is a Word who's individual bits can be used to change the behavior of the drive. For example, you could use the ConfigAxis word to activate a coast to stop function in the drive, a quick stop function, or to reverse the direction of the motor.

The HWDSTW and HWDZTW pins are hardware identifiers, which are unique, system generated identifiers for hardware in the hardware configuration. Although the block interface has room for two hardware identifiers, these will both have the same value so we can connect the same tag to both pins.

The AxisEnabled pin effectively is a drive running signal. This pin is True when the motor is running, and False when the motor is stopped.

The Lockout pin indicates that the drive cannot run. This may be because the STO function is activated or because the drive is in fault.

The ActVelocity pin indicates the actual speed that the drive is running at, measured in RPM.

Finally, we have standard pins for Error, Status, and Diagnostics.

In the Function Block, I have connected tags that don't exist to the interface of the SinaSpeed block. You can see that the tags don't exist because they all have a red error underline. I could go ahead and define these tags one by one in the block interface or, to be as efficient as possible, I can define these tags in bulk. To do that, right click in the network and click "Define tag..."

Define Tag

In the Define Tag dialog box, define the section of the interface where the tags should be defined. In this case, all of the tags on the left of the function block call should be defined as Local In and all of the tags on the right of the function block call should be defined as Local Out. Next, we can define the data types of all of the tags in the Data Type column. Finally, we could add a comment for the each tag. Since this a demo, I won't add comments. Obviously it is good practice to clearly comment all of your tags in a production system. once these details are added, click "Define" to define the tags in the list.

Bulk Define Tags

All of tags are now defined and error free.

The last pin we have to parameterize is the RefSpeed pin. Internally, the drive transmits its actual speed as a percentage of the setpoint speed. When the PLC receives this percentage, it decodes the percentage back to an RPM value using the RefSpeed value. So, the value connected to the RefSpeed pin is a constant, which was already defined in the Startdrive Commissioning Wizard Important Parameters step. The default value for the drive's reference speed is 1500 RPM, and I know I didn't change it, so I will hardcode the value 1500 to the RefSpeed pin.

RefSpeed Pin

Call Conveyor Speed Control

In the Main OB, create a call to Conveyor Speed Control with a Single Instance DB.

To provide a storage location for the interface signals between the PLC and HMI, also create a DB called HMI Interface.

In this DB, I have added the tags that are used to parameterize the Conveyor Speed Control block. With these tags created, I can drag and drop them from the DB to the interface of the Conveyor Speed Control block to parameterize the block call.

Drag and Drop Parameters

The most observant out there will notice that the SpeedSP input parameter is a Real type but we are using an integer typed tag in our HMI Interface DB. This is because on the HMI I will use a slider to set the speed of the drive, which only supports the integer data type. The good news is that since an integer can safely be converted to a Real, TIA Portal will implicitly do this conversion. You can see the TIA Portal is doing implicit conversion on a parameter because there is a small grey box on the pin that indicates that a conversion is taking place.

Implicit Conversion from Integer to Real

The last pin to parameterize on the Conveyor Speed Control block is the HWID pin. We need to interconnect this pin with the hardware ID of the drive. This can be found in the Hardware Configuration or in the PLC Tag table under System Constants. In this case, I will copy and paste the hardware ID from the Tag Table to the block call.

Copy Hardware Constant

Download and Test

After tagging up the Conveyor Speed Control block, download the changes to the PLC.

Download to the PLC

Once downloaded, go online with the PLC and monitor. While online, modify the Speed Setpoint to 1000 RPM and toggle the StartStop bit to TRUE. You should see the motor starts turning and the Speed Actual Value ramp up to 1000 RPM.

Run Motor

With the motor running, press the e-stop to check that the local safety is working correctly. The motor coasts to a stop and the Lockout parameter of Conveyor Speed Control is True.

Lockout During Emergency Stop

After releasing the e-stop, the Lockout pin becomes False again but the motor will not immediately start running. After a safety event, the drive needs to see the positive flank of the run signal to start running again. Toggle the StartStop bit from True to False and back again to start running the motor again.

At this point, automatic drive control is integrated into our application code. The last thing to do is to integrate the HMI so that we can control the drive without going online with the PLC.

Integrate the HMI

In this tutorial, I have tried to be as comprehensive as possible but this is not a HMI development tutorial so I will not show you how to put together the HMI. In the screenshot below, you see a very basic HMI that has been prepared previously. In this section, we'll go through the process of connecting the HMI components to the PLC tags and using the HMI to operate the drive.

Drive Control HMI

Tag Up Start, Stop, and Reset Buttons

When the start button is pressed, we want the drive to run continuously. To accommodate this, I select the start button and navigate to the Press event under Properties > Events. When this event is raised, we use the SetBit function to set the tag HMI Interface.StartStop to True.

Start Button Configuration

In contrast, we want to configure the Stop button to reset the same tag. When this button is pressed, the StartStop tag is reset and the motor stops running.

Stop Button Configuration

Finally, we will configure the Reset button. Unlike the previous buttons, we don't want to set or reset a tag with this button. Instead, we want it to work like a momentary pushbutton where the tag is True while the button is pressed and False when the button is released. To achieve this functionality, we can use the SetBitWhileKeyPressed function.

Reset Button Configuration

Tag Up Speed Display, Speed Display Gauge, and Speed Control Slider

With the HMI buttons configured correctly, we can shift our focus to visualizing and controlling the drive's setpoint speeds. To start, we'll connect the actual speed tag to the numeric display on the HMI. This can be done under Properties > Properties > General > Tag.

Actual Speed Numeric Display

We'll also visualize the speed relative to the drive's reference speed using a gauge control. Once again, we can connect the actual speed tag to the gauge control by selecting the component and connecting the tag under Properties > Properties > General > Process Tag.

Actual Speed Gauge

We will use a slide control to set the speed setpoint of the drive. Connect the speed setpoint tag to the slide control by selecting the component and connecting the tag under Properties > Properties > General > Process Tag.

Setpoint Speed Control Slider

Tag Up Drive Status Indicators

Next, we'll tag up the drive status display indicators. For the Drive Enabled indicator, I will set the color to green when the drive is enabled. This can be done by selecting the component and navigating to Properties > Animations > Display > Appearance and configuring the color based on the tag value.

Drive Enabled Indicator

Finally, I will do the same for the Drive Fault status indicator.

Drive Fault Status Indicator

Speed Up Acquisition Time

The last thing that I will do is speed up the HMI Acquisition time for specific tags. I'm going to increase the acquisition time from 1 second to 100 milliseconds. This faster acquisition time stops the HMI graphics from looking laggy. We can set the HMI tag acquisition time on a per tag basis in the Tag Editor.

HMI Acquisition Time

Simulate and Test the HMI

Finally, we can simulate and test the HMI. To start the simulation, click on the Start Simulation button.

Simulate HMI

Now, I can use the HMI to start the drive. Once started, I see that the motor begins to turn and the drive ramps up to the setpoint speed.

Control Drive via HMI

I can also;

  • Stop the drive
  • Modify the setpoint speed of the drive
  • Visualize faults
  • Reset faults

At this point, we can say that the drive control is now completely integrated into the HMI.

Wrap Up

In this epic post, we have covered the complete process of integrating SINAMICS drives into a TIA Portal project. Along the way, we have learned how to add drives to the hardware configuration, use Startdrive to commission standard and safety features of drives, control drives in our PLC programs using standard telegrams and blocks, and to integrate drive control into a HMI application.

It turned into quite a long post, but I'm happy with the journey we've been on - there's a ton of value in here for anyone who is getting up and running with SINAMICS drives in a new project. If you want more great content like this delivered directly to your inbox every week, be sure to subscribe to the mailing list below.

Learn Something New Every Week

Sign up to the mailing list to get a new post about industrial automation and controls engineering delivered to your inbox every week.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

PLC Bootcamp

Learn the skills you need to start your journey as a PLC programmer. Enroll in PLC Bootcamp to learn how to write and test your first PLC program for free.