You are on page 1of 153

SIEMENS OPEN LIBRARY

1 - Library Overview and Architecture


OCTOBER 11, 2016

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 1 of 19

1. Contents
1. Purpose ........................................................................................................................................................................... 5
2. Intended Use ................................................................................................................................................................. 5
3. Revision History............................................................................................................................................................ 5
4. Open Library License.................................................................................................................................................. 5
5. Hardware and Software Compatibility ................................................................................................................. 5
6. Background ................................................................................................................................................................... 6
7. Target Platforms .......................................................................................................................................................... 6
7.1. PLC Target .............................................................................................................................................................. 6
7.2. HMI Target ............................................................................................................................................................. 6
8. Testing............................................................................................................................................................................. 6
8.1. PLC Testing............................................................................................................................................................. 6
8.2. HMI Testing ........................................................................................................................................................... 6
9. Support Resources ...................................................................................................................................................... 7
9.1. Technical Support ................................................................................................................................................ 7
9.2. Documentation .................................................................................................................................................... 7
10. Library Overview ........................................................................................................................................................ 8
10.1. Motor Control ...................................................................................................................................................... 8
10.1.1. G Series VFD Control fbVFD_GSeries ................................................................................................ 8
10.1.2. Analog VFD Control fbVFD_Analog.................................................................................................. 8
10.1.3. Digital Single Speed Motor fbMotor_Reversing ........................................................................... 8
10.2. Valve Control....................................................................................................................................................... 8
10.2.1. Two State Solenoid Valve fbValve_Solenoid.................................................................................. 8
10.2.2. Analog Valve fbValve_Analog ............................................................................................................ 8
10.3. Inputs/Outputs ................................................................................................................................................... 8
10.3.1. Analog Input with Scaling and Alarms fbIO_AnalogInput......................................................... 8
10.3.2. Analog Output with Scaling fbIO_AnalogOutput ........................................................................ 8
10.4. General .................................................................................................................................................................. 8
10.4.1. System Control ............................................................................................................................................ 8
10.4.2. Interlock Function Block - fbInterlock ................................................................................................. 9
10.4.3. PID Interface fbPID_CompactInterface ........................................................................................... 9
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 2 of 19

10.4.4. Standard Alarm Interface - fbAlarmWarning ................................................................................... 9


10.5. Supplementary Blocks .................................................................................................................................... 10
11. Library Standards....................................................................................................................................................... 11
11.1. Naming Conventions ........................................................................................................................................ 11
11.1.1. Variable Prefix .............................................................................................................................................. 11
11.1.2. Data Flow Prefix .......................................................................................................................................... 11
11.2. Using Constants ................................................................................................................................................ 12
11.2.1. Constant Categories ................................................................................................................................. 12
11.3. Data and Function Block Numbering ........................................................................................................ 12
12. Program Architecture ............................................................................................................................................. 14
12.1. Modes and System Control .......................................................................................................................... 14
12.1.1. Overview ...................................................................................................................................................... 14
12.1.2. Mode Definitions ...................................................................................................................................... 14
12.1.3. Using Mode for a Small System .......................................................................................................... 14
12.1.4. Using Mode for a Medium or Large System ................................................................................... 15
12.1.5. Changing Global Mode .......................................................................................................................... 15
12.1.6. Disable Modes ........................................................................................................................................... 15
12.2. Memory Management ................................................................................................................................... 15
12.2.1. Function Block Memory ......................................................................................................................... 15
12.2.2. Using Instance Memory ......................................................................................................................... 15
12.2.3. Multi-instance Memory Model............................................................................................................ 16
12.2.4. Single Instance Memory Model .......................................................................................................... 16
12.3. HMI Display Status and Errors ..................................................................................................................... 16
12.3.1. Status ............................................................................................................................................................ 16
12.3.2. Error Codes ................................................................................................................................................ 16
13. Alarm Usage .............................................................................................................................................................. 17
13.1. General Alarms .................................................................................................................................................. 17
13.2. Excel Macro........................................................................................................................................................ 17
13.3. Alarm Special Considerations ...................................................................................................................... 17
14. Custom Modifications ............................................................................................................................................ 18
15. Contributing to the Library ................................................................................................................................... 19
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 3 of 19

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 4 of 19

1. Purpose
The purpose of this document is to provide a general overview of the library and to discuss
decisions in program architecture that make best use of the library. Additionally, this document will
discuss system compatibility, testing, and how to contribute to growing the Open Library.

2. Intended Use
This document is intended to be the starting point by anyone utilizing the Open Library for PLC
and HMI Development.

3. Revision History
Version
1.0
1.1
1.2
1.3

Date
2016-05-23
2016-06-20
2016-08-23
2016-10-11

Author
DMC
DMC
DMC
DMC

Comments
Initial Release
No Changes
Added information on Supplementary Blocks
No Changes

4. Open Library License


Copyright (c) 2016 DMC, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

5. Hardware and Software Compatibility


This library was developed in TIA Portal V13 SP1. It has been tested on the S7-1200 and S7-1500
platforms, and untested modifications have been made for compatibility with S7-300 and S7-400.
The PLC objects can be used with any HMI, however, the configuration of the faceplates is only
available using a Comfort Panel or WinCC Advanced, and have been tested on a 7 Comfort Panel.
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 5 of 19

6. Background
The Siemens Open Library was developed by DMC Inc. over many years. Through a joint
collaboration with Siemens Industry, DMC documented the library and released it as an Open
Source Library open for anyone to use and distribute. The Library is Open Source and will allow for
users to contribute content to help enhance the overall availability of functionality to the greater
Siemens User Community.

7. Target Platforms
This section covers the target platforms that apply to the library.

7.1. PLC Target


This library is targeted at S7-1200 and S7-1500 applications. Due to improvements made with the
newer processors, TIA portal allows symbolic use of UDTs on the HMI for S7-1200 and S7-1500,
which is not available on older PLC platforms. The PLC blocks will still compile and function on S7300 and S7-400 applications, but the HMI mapping will not be available.

7.2. HMI Target


The HMI used for this library will be a Siemens Comfort Panel or WinCC Advanced RT. Due to the
limitations of a Basic Panel, the HMI pop-up structures and symbolic addressing will not work on a
Basic Panel. The HMI pop-ups can be modified to be used, but will require individual mapping of
each point by the end user.

8. Testing
This section covers the testing that was completed for use of the project.

8.1. PLC Testing


The Siemens Open Library was tested on an S7-1500 using TIA Portal V13 SP1 Update 8. Most
blocks were tested using simulation, however, some of the blocks, such as G-Series VFD and PID
interface, were tested with actual hardware. DMC makes no guarantee of functionality for any
Siemens Open Library objects on a given platform.

8.2. HMI Testing


The Siemens Open Library was tested on a 7 WinCC Comfort Panel. Faceplates were tested on
actual hardware and in simulation mode to verify functionality.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 6 of 19

9. Support Resources
This section covers available support resources for use of the Siemens Open Library.

9.1. Technical Support


Since this library was not developed by Siemens, it is not supported by Siemens Technical Support.
For questions or complicated implementations, DMC is willing to provide support, however this
support is not free. Questions can be directed to the following email address or phone number:
siemens.library@dmcinfo.com
312-255-8757

9.2. Documentation
The following documents have been created to help users implement, customize, and maintain the
Siemens Open Library
1.

Library Overview and Architecture (This Document)


Overview of the Library and design considerations.

2. Initial Setup
Provides information on how to do the initial configuration required for all library objects.
3. Example Object Configuration
Walks through how to use and configure a single object and uses fbValve_Solenoid as an
example.
4. Detailed Library Block Description
Provides detailed information for the functionality, inputs, outputs, UDTs, and Faceplates
for each object.
5. Siemens HMI Alarm Generation
Provides information for how to generate alarms for use in WinCC Comfort or WinCC RT
Advanced using the automated tools.
6. PID Block Configuration
Walks through how to use and configure the PID Object, as it has special instructions.
7. Customizing Library Objects
Discusses how to modify the library to change functionality or appearance.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 7 of 19

10. Library Overview


This section outlines all objects that the library currently contains.

10.1. Motor Control


10.1.1. G Series VFD Control fbVFD_GSeries
The G Series VFD Control Function Block is utilized for use of Siemens G Series VFD or Micromaster
VFDs using Standard Telegram 1. This block does not use a technology object. This allows for a
lower CPU requirement for each drive. It utilizes Standard Telegram 1 and has been tested on a
G120, however, it will function with any drive using Standard Telegram 1 on either Profibus or
Profinet.

10.1.2. Analog VFD Control fbVFD_Analog


The fbVFD_Analog Motor Control Function Block is utilized for use of a VFD controlled with digital
and analog signals. The error UDT is kept identical to the GSeries error UDT, however, some error
outputs are not utilized by this block.

10.1.3. Digital Single Speed Motor fbMotor_Reversing


The Reversing Motor Control Function Block is utilized for motors started and stopped using digital
outputs. This block functions with single direction or reversing motors.

10.2. Valve Control


10.2.1. Two State Solenoid Valve fbValve_Solenoid
This library item is to be utilized with two state solenoid valve applications. It can be used for
spring close, spring open, or double acting solenoids.

10.2.2. Analog Valve fbValve_Analog


This library item is to be utilized with a valve controlled using an analog output. This block will work
with any valve that is controlled through an analog output from the PLC.

10.3. Inputs/Outputs
10.3.1. Analog Input with Scaling and Alarms fbIO_AnalogInput
This library object scales analog inputs and provides setups for alarms.

10.3.2. Analog Output with Scaling fbIO_AnalogOutput


This library object scales process values to be used for Analog Outputs.

10.4. General
10.4.1. System Control
This library object is a User Defined Type only that is used to provide mode information to other
Library Objects, and is controlled by HMI Faceplates.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 8 of 19

10.4.2. Interlock Function Block - fbInterlock


This library object is used to provide operator information for multiple values that are interlocking
a process. It has inputs for items that may be interlocking a process, and informs the operator of
what interlocks are preventing operation via an HMI faceplate.

10.4.3. PID Interface fbPID_CompactInterface


The S7-1200 and S7-1500 provide PID Technology objects that are best practices for use, therefore
this would not replace those blocks, but would provide an interface to the technology object on
the HMI.
The interface will allow for modification of the PID loop and for manual override of the output from
the HMI.
Unlike other library objects that are fully encapsulated, many of the outputs of this block will need
to be mapped to the PID_Compact block.

10.4.4. Standard Alarm Interface - fbAlarmWarning


The Standard Alarm Interface provides an easy way to setup additional alarms.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 9 of 19

10.5. Supplementary Blocks


Included in the library is a section for both S7-300 and S7-1500 labelled Supplementary. These
are blocks are included in library for use in auxiliary applications, but are provided as-is and
without documentation. As documentation is added for these blocks, they will be merged into the
appropriate library location. These blocks will include any user submitted blocks that are submitted
without documentation.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 10 of 19

11. Library Standards


This section discusses standards that are used in the library.

11.1. Naming Conventions


The Siemens Open Library uses a specific set of variable naming prefixes. These prefixes increase
readability and speed up the coding process once they are understood. Each item will contain two
prefixes and then a meaningful name. The first prefix is variable type. The second prefix
corresponds to the data flow (input, output, local variable) and can sometimes be blank. The
standard for Siemens S7 PLC and HMI programs is as follows:

11.1.1. Variable Prefix


TYPE

PREFIX EXAMPLE

BOOL

bInAuto

BYTE

by

byOutStatus

INT

iInMode

REAL

rActualWeight

WORD

wInModbusAddress

DWORD

dw

dwInFlow

TIME

tInUpdateTimeout

STRING

sTitle

USER DEFINED TYPE None

HMI_VFD_Control

MULTI INSTANCE
FUNCTION BLOCK

ParameterReadWrite

None

11.1.2. Data Flow Prefix


TYPE

PREFIX

EXAMPLE

FB/FC Input

In

bInAuto

FB/FC Output

Out

byOutStatus

Internal Static
Variable

<blank>

rActualWeight

Internal
Temporary
Variable

Temp

tTempElapsedTime
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 11 of 19

11.2. Using Constants


The Siemens Open Library takes advantage of the User Constants feature of PLC tag tables. These
constants should be used wherever possible instead of hardcoding values in function blocks. The
Library constants are located in the Open Library tag table in the Master Copies section.
Organization of the constants is done using dot (period) notation. The leftmost parts of constant
names are general categories; categories or names get more specific toward the end. Below is a
short description of the larger categories.

11.2.1. Constant Categories


CATEGORY NAME

DESCRIPTION

Modes

Top level system modes. See Section 12.1.2 for definitions.

Modes.PID

PID_Compact modes used in fbPID_CompactInterface block.

HMI

Any constants used for HMI display or logic.

HMI.Status

Controls color animations for HMI objects.

IoScaling

Used to scale any value read in from IO.

IoScaling.S7Analog

Contains constants for all S7 series AI cards and all sensor types.

Estop

Defines the action taken for an output when an E-Stop occurs.

DataTypes

Contains minimum and maximum limits for data types.

11.3. Data and Function Block Numbering


Each data and function block requires a unique identifying number. This number is typically set
automatically by Portal, but it can also be manually modified. In order to avoid conflicts with this
numbering system, it is suggested that the Siemens Open Library be imported before any custom
data or function blocks are created. This insures that each block has a unique identifying number. If
two or more blocks are using the same number, it is possible to resolve the conflict by changing
the assigned number. This can be done by right clicking the block and selecting properties. Under
the general tab, select a unique identifying number for that block.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 12 of 19

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 13 of 19

12. Program Architecture


This section covers overall architecture and general design decisions. While these design outlines
do not need to be adhered to for the blocks to function, they demonstrate why some design
decisions were made with the blocks.

12.1. Modes and System Control


Mode is an integer that will be an input into all library objects that allow for HMI control. This
section describes how to best use Modes inside your project.

12.1.1. Overview
The Library Utilizes a Mode architecture that is used to control a given block in Off, Auto, or
Manual modes. A single global mode is typically used for small systems, and multiple system
modes are typically used for larger systems. For example, if the system is a standalone skid, then a
single mode can apply to all objects. If the system is an entire manufacturing line with multiple
sections, then it is often best to create a mode for each subsystem, however, this is not required.

12.1.2. Mode Definitions


A typical project will have a mode for each major subsystem, so that all equipment in a given area
carries an identical mode. The library blocks will have the following modes:
Mode

Value

Description

Stop

All Outputs disabled. Nothing in the system can run.

Auto

All blocks are in Auto. Each block will use the PLC configured
values and logic for control.

Manual

All blocks are in Manual. Each block will use the HMI for
control.

Independent

10

Each block mode will be set via the HMI. This allows for some
devices to be in automatic and other to be in manual based on
HMI mode selection.
Most current industry systems maintain a global mode of
Independent, which allows for switching of devices to an
individual mode independent of the mode of other devices.

12.1.3. Using Mode for a Small System


For a small system a single global mode will need to be created. This mode will be passed into
each Library Object that is created, and will be controlled by the HMI. There is no Function Block
for controlling the mode, as that will be done from the HMI Pop-up faceplate.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 14 of 19

12.1.4. Using Mode for a Medium or Large System


For a medium or large system, there will usually be multiple modes configured, where each mode
corresponds to a subsystem of the application. This mode will be passed into each Library Object
that is part of that subsystem, and will be controlled by the HMI. There is no Function Block for
controlling the mode, as that will be done from the HMI Pop-up faceplate, which will need to be
added to the HMI for each subsystem.
The values for Mode should be passed into the function block that corresponds to that subsystem
and controlled from the customer created function block.

12.1.5. Changing Global Mode


If Global Mode Changes To:
Auto
Manual
Independent

Stop

Then Function Block Mode Changes To:


All function blocks change to Auto mode
All function blocks change to Manual mode
All function blocks maintain their previous mode, however, each
block mode can now be changed independently via the HMI
interface.
All function blocks change to Stop mode

12.1.6. Disable Modes


For some systems, the HMI should always be in control of the mode for each object. This can be
accomplished by using the constant Modes.Independent as the input for each library block, which
will allow the HMI pop-up to control the mode for a given object.

12.2. Memory Management


This Section will cover information pertaining to standard storage of memory required for the
Library Objects.

12.2.1. Function Block Memory


All Function Blocks require instance memory in order to be utilized, as they contain many variables
that need to be retained across multiple scans. Function Block memory can be allocated as Multiinstance or Single Instance, however, Siemens best practices would recommend the use of a Multiinstance. The library will utilize a single instance for the PID interface, which is done to preserve all
of the built in functionality for PID_Compact.

12.2.2. Using Instance Memory


The Siemens Open Library was designed to provide all required information as part of the HMI or
Error UDTs or outputs from the Function Block. No memory contained inside of the instance
memory of the Function Block should be used. This is to ensure proper operation of the block.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 15 of 19

12.2.3. Multi-instance Memory Model


All documentation will utilize Multi-instance usage of Function Blocks. This is done to reduce
overall number or instance data blocks that will need to be created, and to improve overall layout
of the project structure.

12.2.4. Single Instance Memory Model


All blocks can be utilized as part of a single instance call of the block. This increases the overall
number of instance data blocks, but will not impair the functionality of any of the Library Blocks.

12.3. HMI Display Status and Errors


Most Library function blocks take advantage of standard HMI display dynamics. The two
commonly used in the Library are for actuator status and error displays.

12.3.1. Status
Status is indicated on the HMI by changing the color of the actuator or device. HMI indication is
done through an integer in the HMI control structure named iStatus. Status is not used for device
control popups. The iStatus integer is meant for HMI indication only and is therefore not
recommended to be used in PLC logic.

12.3.2. Error Codes


Error codes are used to display dynamic text error messages in the device popup faceplates. The
Library function blocks utilize fbErrorScroller to scan through active alarms. Scrolling is
accomplished using the iErrorCode integer in the HMI structure. Because this value is scrolling,
iErrorCode is for HMI display only and should not be used in PLC logic. Boolean status bits
should be used for logic instead.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 16 of 19

13. Alarm Usage


Siemens Comfort Panels and WinCC Advanced Runtime use bits out of words to trigger alarms,
and there are no methods to configure Boolean alarms. This library, however, utilizes bits for all
alarms. To automate this process, the Siemens Open Library includes a Microsoft Excel macro that
takes a data block of Booleans and generates alarms in the WinCC format. For detailed
information, please see 5- Siemens Open Library- Siemens Alarm Generation.

13.1. General Alarms


Section 10, as well as other supporting documents, contains instructions on adding error structures
to error data blocks for each device. This same process should be used for creating individual
alarms that are not covered within the scope of a device (e.g. high temperature, path blocked,
door open, etc.). Single error bits should be placed within dbErrors data blocks and given
descriptive comments. These error bits may be placed inside structures for organization or just
within the data block top level. Individual error bits may be alarms or warnings. These bits should
then be written to in system-level logic using fbAlarmWarning. It is important to note that all autogenerating alarm tools will mark any error bit as an Error in the HMI. Any warning bits will need
to be manually changed to Warning after import.

13.2. Excel Macro


The Excel macro uses the Data Block definition from TIA Portal to automatically generate alarms.
All of the source code is included as part of the Excel macro and can be edited in VBA for custom
applications. The Excel macro will work with any non-optimized data block containing Booleans.
The Booleans can be placed directly in the Data Block, nested in User Defined Types, or nested in
Structs.

13.3. Alarm Special Considerations


The included Excel macro has the following special considerations in order for the system to
function:
1.

The Data Block must be non-optimized (applies to 1200/1500 only and is accessible via the
properties of the Data Block).
2. The User Defined Type, Struct, and/or individual Boolean comments will be utilized for the
alarm text, so it is important to put in meaningful comments on each alarm.
3. The Excel macro will work with nested User Defined Types and Structs.
4. The Excel macro works only with data blocks containing only Booleans, so all automatically
generated alarms will need to be Boolean alarms, and should be concentrated in Data
Blocks.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 17 of 19

14. Custom Modifications


Once blocks are pulled into the Project Library they can be modified to add or remove functionality
or change appearance on the HMI. Additionally, it is possible to create a new global library, or add
to the Siemens Open Library any block modifications that need to be used across multiple projects.
There are special considerations for modifying UDTs that are used with S7-300 or S7-400
processors, and details for how to modify the library can be found in Siemens Open Library
Custom Modifications document.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 18 of 19

15. Contributing to the Library


The Siemens Open Library is an open source library, and contributions, improvements, and
changes are welcome from anyone who has improved or added to the library. Please submit any
custom objects to DMC by emailing them to Contribute@OpenPLCLibrary.com.
Library objects may not be added immediately, but will be added as additional versions of the
library are released.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 19 of 19

SIEMENS OPEN LIBRARY


2 Initial Setup
OCTOBER 11, 2016

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 1 of 6

Contents
1. Purpose ........................................................................................................................................................................... 3
2. Intended Use ................................................................................................................................................................. 3
3. Revision History............................................................................................................................................................ 3
4. Open Library License.................................................................................................................................................. 3
5. Hardware and Software Compatibility ................................................................................................................. 3
6. System and Clock Memory Bytes ........................................................................................................................... 4
7. Retrieve Open Library ................................................................................................................................................ 5
8. Add Tag Table .............................................................................................................................................................. 6

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 2 of 6

1. Purpose
The purpose of this document is to provide a guide for the initial use of the Siemens Open Library.
The steps contained in this document should be done before attempting to use any library object,
or the compilation of the project will result in errors.

2. Intended Use
This document is intended to be the starting point by anyone utilizing the Open Library for PLC
and HMI Development.

3. Revision History
Version
1.0
1.1
1.2
1.3

Date
2016-05-23
2016-06-20
2016-08-23
2016-10-11

Author
DMC
DMC
DMC
DMC

Comments
Initial Release
No Changes
No Changes
No Changes

4. Open Library License


Copyright (c) 2016 DMC, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

5. Hardware and Software Compatibility


This library was developed in TIA Portal V13 SP1. It has been tested on the S7-1200 and S7-1500
platforms, and untested modifications have been made for compatibility with S7-300 and S7-400.
The PLC objects can be used with any HMI, however, the configuration of the faceplates is only
available using a Comfort Panel or WinCC Advanced, and have been tested on a 7 Comfort Panel.
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 3 of 6

6. System and Clock Memory Bytes


The Open Library Blocks utilize the System and Clock memory bits, which will need to be enabled
for the library objects to compile. This will need to be done for each processor that uses the
Siemens Open Library. To enable the System and Clock Memory Bytes, complete the following
steps.
1.

Open the Hardware configuration and select the processor that will be using the library
objects.
2. Right click and select Properties
3. In the Properties, find the System and clock memory settings and click the Enable check
box for both the System memory bits and the Clock memory bits
4. The addresses can be changed, as all items are accessed symbolically.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 4 of 6

7. Retrieve Open Library


The provided library is an archive file and needs to be retrieved and opened. This only needs to be
done once for any computer being used for development. Complete the following steps to open
the library:
1.

In the file menu of TIA Portal, select Options -> Global libraries ->Retrieve library

2. Select a place on the development machine to store the library. This will be the place any
changes made will also be saved.
3. By default, the Open Library will open as read only. If edits need to be made, close the
library, open it again, and deselect the Read-only checkbox.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 5 of 6

8. Add Tag Table


The Open Library uses many constants to provide meaningful names to values that are regularly
used. The library will not compile without the tag table added into the project. To add the tag
table, complete the following steps:
1.

Inside the Master copies of the Open Library, navigate to the Open Library tag table.

2. Drag the Open Library tag table from the Master copies into the PLC tags of the
controller using the Open Library.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 6 of 6

SIEMENS OPEN LIBRARY


3 Example Object Configuration
OCTOBER 11, 2016

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 1 of 24

Contents
CONTENTS ......................................................................................................................................................................... 2
1. PURPOSE......................................................................................................................................................................... 3
2. INTENDED USE ............................................................................................................................................................. 3
3. REVISION HISTORY ..................................................................................................................................................... 3
4. OPEN LIBRARY LICENSE ............................................................................................................................................ 3
5. HARDWARE AND SOFTWARE COMPATIBILITY ................................................................................................ 4
6. EXAMPLE SETUP .......................................................................................................................................................... 5
6.1. Initial Setup............................................................................................................................................................. 5
6.2. PLC ........................................................................................................................................................................... 5
6.2.1. Adding PLC Library Objects to Project ................................................................................................. 5
6.2.2. Create Required Data Blocks and User Defined Types ................................................................. 10
6.2.3. Create PLC Code........................................................................................................................................ 13
6.3. HMI Development ............................................................................................................................................. 16
6.3.1. Special considerations for S7-300/S7-400 PLCs .............................................................................. 16
6.3.2. HMI Pop-up Creation and Configuration .......................................................................................... 16
6.3.3. HMI Icon Creation and Configuration ............................................................................................... 22

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 2 of 24

1. Purpose
The purpose of this document is to walk through the steps required to setup an object in the
Siemens Open Library. Each object has a different interface, as defined in the detailed block
description for that object, however, all of the objects are setup and configured using the methods
outlined in this document.

2. Intended Use
This document is intended to be used by anyone utilizing the Open Library for PLC and HMI
Development. This document should be used after reviewing the following documents:
1. 1- Siemens Open Library Library Overview and Architecture
2. 2- Siemens Open Library Initial Setup

3. Revision History
Version
1.0
1.1
1.2
1.3

Date
2016-05-23
2016-06-20
2016-08-23
2016-10-11

Author
DMC
DMC
DMC
DMC

Comments
Initial Release
No Changes
No Changes
No Changes

4. Open Library License


Copyright (c) 2016 DMC, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 3 of 24

5. Hardware and Software Compatibility


This library was developed in TIA Portal V13 SP1. It has been tested on the S7-1200 and S7-1500
platforms, and untested modifications have been made for compatibility with S7-300 and S7-400.
The PLC objects can be used with any HMI, however, the configuration of the faceplates is only
available using a Comfort Panel or WinCC Advanced.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 4 of 24

6. Example Setup
This tutorial walks through the process of using one of the blocks from the Open Library. The
example object is the Solenoid Valve, but the same method is utilized for any other object block,
with special consideration and separate document for use of the PID Interface block. For detailed
information for each individual object, see the documentation pertaining to that object in 4Siemens Open Library Detailed Block Overview.

6.1. Initial Setup


Before starting this document please make sure you have set up your project following the steps in
2- Siemens Open Library - Initial Setup. Each library object block is dependent on global constants
and clock memory bits and will not compile without correctly completing the initial setup. The
following steps need to be performed:
1.
2.
3.
4.

Enable system and clock memory bytes on the CPU.


Retrieve the Open Library.
Pull the Open Library PLC tags into the project.
Setup Mode Control, or understand how Open Library Modes function. Additionally
information can be found in 1- Siemens Open Library - Library Overview and Architecture

6.2. PLC
This section covers the steps required to configure the PLC project. It utilizes the best practices
standard with this library, but different methods can be used to store the Function Block Instance
memory and the User Defined Types.

6.2.1. Adding PLC Library Objects to Project


This section walks through the required steps to add an individual library object to a project. The
entire PLC library can be added to the project by dragging and dropping the entire folder into the
project Program Blocks. The following steps will demonstrate adding fbValve_Solenoid to the
project.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 5 of 24

1.

In the controllers Program blocks, we have created example groups and blocks used in this
tutorial, as seen below. A similar structure is suggested for your project. Notice the Library
Blocks group is empty now because this is where the library blocks will be placed.

2. Copy the desired Function Block from the Open Library Types group of the library into the
Library Blocks group created in our project. This is done by dragging and dropping from

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 6 of 24

the library into the Program Blocks of your PLC. In this case we will demonstrate
fbValve_Solenoid. This will need to be done for each PLC in the project that uses this block.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 7 of 24

3. Notice that several other function calls and


function blocks were added automatically into
our project. This happens because
fbValve_Solenoid is dependent on fcHMIBit,
fcSetHMIStatus, fbErrorScroller, udtError_Valve,
and udtHMI_ValveControl. When pulling in a
library block, it will automatically pull in all
required block dependencies and user defined
types. The auxiliary blocks will also be
automatically added to the project based on
the folder structure of the Open Library.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 8 of 24

4. The library blocks are added to the Project


library. Any library blocks that need to be
changed for a particular project can be
modified here. Additionally, new versions can
be created here, depending on the required
application.

5. Reorganize the Program blocks after the


library blocks have been automatically
added so that navigation is easier. This is
not a required step and should be
organized based on personal preference
or company standards. The organization
of the blocks will not affect performance.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 9 of 24

6.2.2. Create Required Data Blocks and User Defined Types


The following section contains the information pertaining to the addition of the required data
blocks to contain the User Defined Types in the Siemens Open Library. Blocks can be named or
organized in whatever way is best for the individual project, but this section will outline the creation
of an HMI Data Block to contain the User Defined Types that map to the Faceplates and an Error
Data block to contain the User Defined Types that contain alarms.
1.

Create global Data Blocks for housing of the User Defined Types for the HMI and the
Errors. In this example, the HMI data will be contained in dbWaterSystem and the error
data will be contained in dbErrors_WaterSystem.

2. The Error Data block needs to be non-optimized to utilize the Excel Macro to automatically
generate alarms. To setup non-optimized access, right click on the data block and select
Properties. Under the Attribute tab, verify the Optimized block access is not checked.
For additional details see 5- Siemens Open Library - Siemens HMI Alarm Generation.

3. Repeat step 2 for the HMI data block if using an S7-300 or S7-400.
4. In the Data Block that will contain the HMI interface, dbWaterSystem in this example, add
the HMI control structure for the device by naming the structure and assigning it the

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 10 of 24

proper Data type. In this example, the UDT is named SOL_MainWater (SOL derives from
Solenoid and is a DMC naming standard for Solenoid devices) but any name can be used.

5. The User Defined Type has a large number of variables, with full details provided in the
documentation for the specific Library Object that is being used. It can be expanded to see
the variables available inside the UDT.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 11 of 24

6. Add the error structure to error data block. In this example it is added to
dbErrors_WaterSystem.

The Error Data Block needs to be non-optimized, for which the setting is available via the
Data Block Properties by right clicking on the data block. For additional details see 5-

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 12 of 24

Siemens Open Library - Siemens HMI Alarm Generation.

6.2.3. Create PLC Code


1.

Create the function block that will contain the logic for the Solenoid valve. In this case we
created a Function Block called fbWaterSystem. Add the inputs and outputs that
correspond to the required logic for the water system.
2. Inside the function block that will contain the logic, add a Static Variable to contain the
instance memory for the Library Object. In this example, SOL_MainWater is added with
data type fbValve_Solenoid.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 13 of 24

3. Drag and drop the Object from the project tree Program blocks into the ladder logic where
it will be used.

4. Choose to use this block as a multiple instance call and select the instance created in the
static memory of fbWaterSystem. Alternatively, you can provide a name for the instance
memory and TIA Portal will automatically add it to the static variables section of the block.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 14 of 24

5. Assign tags to the inputs and outputs of the object. Detailed information for the meanings
of each input and output can be found in the 4- Siemens Open Library - Detailed Block
Overview document.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 15 of 24

6.3. HMI Development


This section covers the use of the HMI Icon and the HMI Pop-up screen. The HMI library can be
used as a fully functioning library, or it can be used as a building block for custom HMI Icons and
Pop-ups.

6.3.1. Special considerations for S7-300/S7-400 PLCs


If an S7-300 or S7-400 PLC is used in the project, the faceplates and UDTs created specifically for
the S7-300 series PLC need to be used. The below instructions can still be followed, however, the
separate faceplates need to used where applicable.

6.3.2. HMI Pop-up Creation and Configuration


This section covers how to use the Pop-up faceplates on a pop-up screen. Each object will have a
separate pop-up screen.
1.

Create a new Pop-up screen for the Solenoid Valve. This is done by clicking the Add new
pop-up screen button in the Pop-up screens section. Give a name that identifies the
specific object being used.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 16 of 24

2. Drag the Pop-up Faceplate, fpValve_Solenoid_Popup in this example, from the library onto
the new Pop-up screen. The faceplate can be resized to best fit the size of the HMI that is
being used, however, increasing text size requires making a new version of the object with
larger text. Be sure that the Pop-up screen size is equivalent to the size of the faceplate. If
the screen size is smaller than the faceplate, it will be cut off. If the screen size is larger than
the faceplate, there will be a white boarder around the Pop-up.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 17 of 24

3. Create an HMI tag for the object in the HMI Tag Table and map it to the HMI UDT that was
created on the PLC, in this case: dbWaterSystem.SOL_MainWater. As an additional option,
the tag can be automatically created by dragging and dropping the UDT directly from the
PLC into the HMI Interface.
Below shows the method for creating the object tag from the HMI Tag Table:

And below shows how to have Portal automatically have the tags created for you, by
dragging and dropping the UDT directly into the interface:

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 18 of 24

4. Configure the required variables in the Interface of the faceplate. If the Interface tab is not
visible, right click on the faceplate, select properties, and the window should appear on the
bottom of the screen. Each library object has a slightly different interface. The details of
each can be seen in the documentation for the specific object. In this case, the interface
contains the following variables: HMI_ValveControl, sBottomButtonText, sTopButtonText,
and sTitle. Configure the HMI_ValveControl using the HMI tag created in step 3, or by

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 19 of 24

dragging and dropping the tag from the PLC. Configure any strings required by typing the
fixed text into the interface.

5. You will notice on the faceplate that there is a greyed-out area at the bottom of the
faceplate, typically in the bottom right area. This is for the addition of an exit button to the
popup screen, allowing you to successfully close the popup when you wish to revert back
to the original screen.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 20 of 24

6. To add this button, you need to retrieve it from the Open Library under Master Copies. It
will be named Exit Button. Drag and drop it onto the faceplate. Note: the button size will
vary depending on the faceplate, and may need to be resized to fit correctly.

7. Adding the popup functionality: We want the exit button to exit out of the popup screen.
This can be achieved by using the ShowPopupScreen function. To do this, click on the Exit
button, navigate to the button properties tab (either by right-clicking and selecting
properties, or alternatively just pressing Alt + Enter). In the Properties sub-tab click over to
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 21 of 24

the Events tab. There should already be a ShowPopupScreen Function added to the
function list. You will need to simply add the name of the screen that you wish to exit, in
this case it is Solenoid Valve. Now the button is set up to turn the popup screen off when
pressed.

6.3.3. HMI Icon Creation and Configuration


This section covers how to configure the HMI Icon. The library contains several predefined HMI
Icons. Many more can be created, or existing icons can be modified using the Symbol Object
Library. For details on customizing objects, see 7- Siemens Open Library Library Customization.
Details regarding the functionality, colors, and interface to each HMI Icon can be found in the
documentation for that object.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 22 of 24

1.

Navigate to the correct HMI Icon Faceplate in the Open Library. In this case we will use
fpValve_Solenoid_Horizontal

2. Pull the Icon Faceplate into the desired screen. If the device is rotated, the I will be at the
angle of the device. There is a Horizontal and Vertical version of all devices to allow for
vertical alignment with a correctly oriented interlock symbol.

3. Configure the Interface to the Icon Faceplate using the tag configured in the HMI Pop-up,
or by dragging and dropping the UDT from the PLC.

4. Create an event that will open the Pop-up window in runtime when the valve on the HMI
screen is clicked.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 23 of 24

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 24 of 24

SIEMENS OPEN LIBRARY


4 Detailed Blocks Overview
OCTOBER 11, 2016

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 1 of 58

Contents
1. Purpose ......................................................................................................................................................................................................... 3
2. Intended Use ............................................................................................................................................................................................... 3
3. Revision History.......................................................................................................................................................................................... 3
4. Open Library License................................................................................................................................................................................ 3
5. Hardware and Software Compatibility ............................................................................................................................................... 3
6. Section Overview ....................................................................................................................................................................................... 4
6.1. Function Block ..................................................................................................................................................................................... 4
6.2. HMI_Devicetype User Defined Type ............................................................................................................................................ 4
6.3. ERROR_Devicetype User Defined Type ....................................................................................................................................... 4
6.4. HMI Icon Faceplate ........................................................................................................................................................................... 4
6.5. HMI Pop-up Faceplate..................................................................................................................................................................... 4
7. Devices .......................................................................................................................................................................................................... 5
7.1. G Series Motor Control fbVFD_GSeries ................................................................................................................................... 5
7.2. Analog VFD Control fbVFD_Analog ....................................................................................................................................... 13
7.3. Digital Single Speed Motor fbMotor_Reversing ................................................................................................................ 18
8. Valve Control ........................................................................................................................................................................................... 24
8.1. Two State Solenoid Valve fbValve_Solenoid ...................................................................................................................... 24
8.2. Analog Valve fbValve_Analog................................................................................................................................................. 29
9. Input/Output Control ............................................................................................................................................................................ 34
9.1. Analog Input with Scaling and Alarms fbIO_AnalogInput ............................................................................................. 34
9.2. Analog Output with Scaling fbIO_AnalogOutput ............................................................................................................ 39
10. General Control ..................................................................................................................................................................................... 44
10.1. System Control ............................................................................................................................................................................... 44
10.2. Interlock Function Block fbInterlock.................................................................................................................................... 47
10.3. PID Interface - fbPID_CompactInterface ................................................................................................................................ 51
10.4. Standard Alarm Interface fbAlarmWarning ...................................................................................................................... 58

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 2 of 58

1. Purpose
This document details the inputs, outputs, user defined types, and functionality of the Siemens Open Library
Function Blocks and HMI Faceplates. It should be used as a reference when using or configuring any of the blocks.

2. Intended Use
This document is intended to be used by anyone utilizing the Open Library for PLC and HMI Development. This
document should be used after reviewing the following documents:
1. 1- Siemens Open Library Library Overview and Architecture
2. 2- Siemens Open Library Initial Setup
3. 3- Siemens Open Library Example Object Configuration

3. Revision History
Version
1.0
1.1
1.2

Date
2016-05-23
2016-06-20
2016-08-23

Author
DMC
DMC
DMC

1.3

2016-10-11

DMC

Comments
Initial Release
Updates to Faceplates, function blocks, and datatypes
Updating information regarding S7-1200 use of the GSeries
VFD.
No Changes

4. Open Library License


Copyright (c) 2016 DMC, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

5. Hardware and Software Compatibility


This library was developed in TIA Portal V13 SP1. It has been tested on the S7-1200 and S7-1500 platforms, and
untested modifications have been made for compatibility with S7-300 and S7-400. The PLC objects can be used
with any HMI, however, the configuration of the faceplates is only available using a Comfort Panel or WinCC
Advanced.
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 3 of 58

6. Section Overview
This section provides a general overview of the library objects and what it contains.

6.1. Function Block


Each library object will have a Function block associated with it. This function block will have various inputs and
outputs for the control of the device. Each block has a unique interface which will be outlined below. If the
functionality of the block does not meet the requirements of your system, then it can be used as a starting point
for developing custom libraries.

6.2. HMI_Devicetype User Defined Type


Each function block will have an In/Out UDT for the HMI interface and will be named HMI_DeviceType. This UDT
serves as the interface with the HMI and can be used to control logic in the PLC. Each function block is connected
to a specific version of the UDT, so if items are added to the UDT for custom development, the Function Block and
HMI objects will need to be updated to reference the new UDT version.
A Global Data Block variable will need to be created with this UDT for each instance of the device type function
block.

6.3. ERROR_Devicetype User Defined Type


Each function block that has errors will pass out a UDT named ERROR_DeviceType. A Global Data Block variable
will need to be created with this UDT for each instance of the device type function block. Error UDT variables are
intended to be grouped with other error structures and errors so that the data block can be used by an Excel
macro to automatically generate alarms for the HMI. Errors inside this UDT should be used for appropriate PLC
logic, and is the easiest way to interface to the alarms from a given device.

6.4. HMI Icon Faceplate


Most objects have an associated Icon Faceplate in the library. The Icon faceplate provides basic information on the
main HMI screen and will contain images of objects like valves, pumps, and motors. Many of these objects utilize
the built-in WinCC Symbol Library, so if different appearances are required for an application, it is quick to
duplicate the type, rename it, and change the visual appearance of the object. Please note that the appearance for
new objects will need to be set to Shaded or Solid in order for the color animations to function.

6.5. HMI Pop-up Faceplate


Each object has an associated Pop-up faceplate in the library. Each device in the programmed system will need to
be configured with a separate Pop-up to prevent the need to multiplex tags. In addition to pop-up screens, these
faceplates can be displayed on any screen desired. Custom versions of the pop-ups can also be created to add or
remove functionality or diagnostic information as desired.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 4 of 58

7. Devices
This section covers all objects that are in the Devices Folder of the open library.

7.1. G Series Motor Control fbVFD_GSeries


7.1.1. Description
The G Series VFD Control Function Block controls Siemens G Series VFD or Micromaster VFDs using Standard
Telegram 1. A technology object is not used by this block, which allows for a lower CPU requirement for each
drive and avoids technology object count limitations. It utilizes Standard Telegram 1 and has been tested on a
G120, however, it will function with any drive using Standard Telegram 1 on either Profibus or Profinet. NOTE: Due
to a limitation of the S7-1200 processor, there are certain functions, detailed below, that are only supported on the
S7-1500 processor.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 5 of 58

7.1.2. Function Block Interface


7.1.2.1. Input Parameters
Input Variables

Type

Description

tInTimeout

Time

The amount of time before an error condition triggers an error

iInMode

Int

Device mode input. See Section 12.1.2 of the Library Overview and
Architecture document of the Library Overview and Architecture document
for further details

bInEstop

Bool

Emergency stop input

iInAddress

Int

The VFD IO start address. Input and Output IO addresses need to start at
the same value

bInSignalContactor

Bool

Contactor feedback. Map the Output bOutContactor if no Contactor exists.

bInEnableForward

Bool

Forward interlock. The motor is allowed to run in the forward direction if


this condition has been met. If the motor should always be able to move in
this direction, this input should be set to true. To disable the motor from
ever traveling in this direction, this input should be set to false

bInEnableReverse

Bool

Reverse interlock. The motor is allowed to run in the reverse direction if


this condition has been met. If the motor should always be able to move in
this direction, this input should be set to true. To disable the motor from
ever traveling in this direction, this input should be set to false

rInCommandSpeed*

Real

Speed set point for automatic mode in percent. (0.0-100.0%)

rInRampUpTime

Real

The ramp up time for the VFD in seconds (S7-1500 ONLY)

rInRampDownTime

Real

The ramp down time for the VFD in seconds (S7-1500 ONLY)

bInCommandForward*

Bool

This is the forward command for auto mode. If this input is set high in auto
mode the motor will run in this direction until the forward interlock
becomes false, or this input is set low

bInCommandReverse*

Bool

This is the reverse command for auto mode. If this input is set high in auto
mode the motor will run in this direction until the reverse interlock
becomes false, or this input is set low

bInResetError

Bool

If an error condition exists, the error must first be fixed, then set this bit
high to reset the internal error

bInMotorProtector

Bool

This input should be mapped directly to the motor's circuit breaker input, if
available. If not available, this input should be set to true. When false, the
motor is disabled and an error is triggered

bInLocalDisconnect

Bool

This input should be wired directly to the motor's safety disconnect switch
input, if available. If not available, this input should be set to true. When
false, the motor is disabled and an error is triggered

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 6 of 58

bInClutch

Bool

This input should be wired directly into the motors clutch overload input, if
available. If not available, this input should be set to true. When false, the
motor is disabled and an error is triggered

bInCoolingFan

Bool

This input is used to tell the VFD that the cooling fan is running, if available.
If not available, this input should be set to true. When false for 30 seconds
after VFD starts, the motor is disabled and an error is triggered

bInUseCurrentAlarm

Bool

This input enables or disables an alarm for drive overcurrent. If an


overcurrent alarm should be used, then this input should be true. If the
current alarm is to be disabled, then this input should be false, or left
unwired

bInUseMaxFrequency

Bool

This input enables or disables an alarm for max frequency. If a frequency


alarm should be used, then this input should be true. If the frequency
alarm is to be disabled, then this input should be false, or left unwired

*Only valid in Automatic Mode


7.1.2.2. InOut Parameters
In/Out Variables
HMI_VFD_Control

Type

Description

udtHMI_VF
D_Control

This in/out UDT is used to communicate to the HMI. Inside the UDT are all the
variables needed to control the motor in manual mode, including forward,
reverse, and stop commands. Also inside this UDT are all feedback signals
including actual speed, actual current, and the forward/reverse signals

7.1.2.3. Out Parameters


Output Variables

Type

Description

bOutContactor

Bool

Contactor output. Map to Output to turn on contactor if used

bOutForward

Bool

Motor running forward feedback from VFD

bOutReverse

Bool

Motor running reverse feedback from VFD

rOutSpeed

Real

Actual speed from VFD

rOutCurrent

Real

Actual current from VFD (S7-1500 ONLY)

rOutPower

Real

Actual power from VFD (S7-1500 ONLY)

bOutError

Bool

This output indicates whether theres an error condition in the VFD

bOutAuto

Bool

Output indicating whether the block is in auto mode

ERROR_VFD

udtError_VFD

This output UDT has one bit for every type of error. It should be
mapped to the HMIs error list. It can also be used for advanced
debugging of the error state

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 7 of 58

7.1.3. User Defined Types


7.1.3.1. udtHMI_VFD_Control
Data
Type

Name

Description

iMode

Int

Current mode

iErrorCode

Int

iStatus

Int

rManualSpeedSP

Real

Error code. See Section 12.3.1 of the


Library Overview and Architecture
document for further details
Status for HMI display. See Section 12.3.1
of the Library Overview and Architecture
document for further details
Speed set point for manual mode

rAutoSpeedSP

Real

Speed set point for automatic mode

rActualSpeed

Real

Actual motor speed

rActualCurrent

Real

Actual motor current

rActualPower

Real

Actual motor power

bPB_ResetError

Bool

Pushbutton Reset errors

bPB_Forward

Bool

bPB_Reverse

Bool

Pushbutton Move forward in manual


mode
Move reverse in manual mode pushbutton

bPB_Stop

Bool

Stop in manual mode pushbutton

bPBEN_ResetError

Bool

Reset errors pushbutton enabled

bPBEN_Forward

Bool

Forward pushbutton enabled

bPBEN_Reverse

Bool

Reverse pushbutton enabled

bPBEN_Stop

Bool

Stop pushbutton enabled

bForwardOn

Bool

Run forward command is on

bReverseOn

Bool

Run reverse command is on

bSignalForward

Bool

Forward signal

bSignalReverse

Bool

Reverse signal

bError

Bool

Overall error

bInterlock

Bool

VFD Interlocked

7.1.3.2. udtError_VFD
Errors

Description

Current

Motor Protector tripped

Local_Disconnect

Motor Local switch OFF


Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 8 of 58

Clutch

Clutch error

Signal_Contactor_On

No feedback from motor contactor

Signal_Contactor_Off

Contactor still ON

Signal_Forward

No SIGNAL Forward from VFD

Signal_Reverse

No SIGNAL Reverse from VFD

Not_Stopped

Motor doesn't stop

VFD_Max_Freq

Max frequency reached

VFD_Current

VFD overcurrent

VFD_Motor_Overload

Motor overload

VFD_Overload

VFD overload

VFD_Fault

VFD fault

Cooling_Fan_On

Cooling fan did not come on within 30 seconds

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 9 of 58

7.1.4. HMI Icon Display


The HMI Icon is used on the main HMI screen to provide a brief overview of the status of the device. Custom
devices can be made to match specific user application styles.
7.1.4.1. HMI Icon Display Objects
The library contains the following objects to be used on the HMI screen:
Motor Horizontal

Pump Horizontal

7.1.4.2. HMI Icon Appearance and Functionality


Indicator
Device Color

Yellow Border
Yellow Hexagon with I in center

Motor Vertical

Pump Vertical

Meaning
Blue: Stopped
Green: Running
Yellow: Start
Red: Error state
Red Flashing: E-stop pressed
Manual mode
Interlocked

7.1.4.3. HMI Icon Interface


The device interface is shown below. It requires only one property linked, the HMI_VFDControl property. The
HMI_VFDControl needs to be mapped to the same udtHMI_VFDControl used by the Function Block.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 10 of 58

7.1.5. HMI Pop-up Faceplate


The HMI pop up provides a detailed display of the status of the VFD. Additionally, it allows for control on the VFD
when the System Mode is Independent or Manual.
7.1.5.1. HMI Pop-up Display
The library contains a single pop-up faceplate shown below:

7.1.5.2. HMI Pop-up Appearance and Functionality


The table below gives a feature description for the pop up faceplate:

Object

Type

Description

Auto Mode

Button

Manual Mode

Button

Auto Mode SP

Output

Sets device to Auto Mode. Only available when global mode is


Independent. Button is green when devices is in Auto Mode. Button is
green when device is in Auto Mode.
Sets device to Manual Mode. Only available when global mode is
Independent. Button is green when devices is in Auto Mode. Button is
green when device is in Manual Mode.
Displays PLC set point to be used in Auto Mode

Manual Mode SP

Input

Adjusts the speed set point when in Manual Mode

Actual Speed

Output

Displays the current speed of the motor (%)

Actual Current

Output

Displays motor current (A)

Interlock Status Field

Output

Displays current status of device interlock (yellow for interlock, grey


when not)

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 11 of 58

Error Status Field

Output

Start Forward Button

Button

Displays current error status. Field box turns red if any errors are
present, and displays active error text. It will scroll through multiple
alarms.
Commands motor forward when in Manual Mode

Stop Button

Button

Stops the device

Start Reverse Button

Button

Commands motor in reverse when in Manual Mode

RESET Button

Button

Resets errors

EXIT Button

Button

Exits the pop up screen

7.1.5.3. HMI Pop-up Interface


The device interface is shown below. Two properties are linked in this interface: HMI_VFDControl and sTitle. The
HMI_VFDControl needs to be mapped to the same udtHMI_VFD_Control used by the Function Block. The sTitle
property requires a string by which to identify the device (such as a device name), and this value will display at the
top of the Pop-up.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 12 of 58

7.2. Analog VFD Control fbVFD_Analog


7.2.1. Description
The fbVFD_Analog Motor Control Function Block is utilized for use of a VFD controlled with digital and analog
signals. The error UDT is kept identical to the GSeries error UDT, however, some of the errors are not utilized by
the block in this revision.

7.2.2. Function Block Interface


7.2.2.1. Input Parameters
Input Variables

Type

Description

tInTimeout

Time

The amount of time before an error condition triggers an error

iInMode

Int

Device mode input. See Section 12.1.2 of the Library Overview and
Architecture document of the Library Overview and Architecture document
for further details

bInEstop

Bool

Emergency stop input

bInSignalContactor

Bool

Contactor feedback

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 13 of 58

bInSignalForward

Bool

Forward feedback bit. This tells the motor function block whether the
motor is going in the forward direction. If no feedback input is available,
wire the forward output to the forward feedback input

bInSignalReverse

Bool

Reverse feedback bit. This tells the motor function block whether the
motor is going in the reverse direction. If no feedback input is available,
wire the forward output to the forward feedback input

wInSpeedAct

Word

Actual speed feedback from an analog speed sensor. If there is no speed


feedback, then wOutSpeedSP should be mapped to this input

bInEnableForward

Bool

Forward interlock. The motor is allowed to run in the forward direction if


this condition has been met. If the motor should always be able to move in
this direction, this input should be set to true. To disable the motor from
ever traveling in this direction, this input should be set to false

bInEnableReverse

Bool

Reverse interlock. The motor is allowed to run in the reverse direction if


this condition has been met. If the motor should always be able to move in
this direction, this input should be set to true. To disable the motor from
ever traveling in this direction, this input should be set to false

rInCommandSpeed*

Real

Speed set point for automatic mode in percent (0.0-100.0%)

rInRampUpTime

Real

The ramp up time for the VFD in seconds

rInRampDownTime

Real

The ramp down time for the VFD in seconds

bInCommandForward*

Bool

This is the forward command for auto mode. If this input is set high in auto
mode the motor will continue to run in this direction until the forward
interlock becomes false, or this input is set low

bInCommandReverse*

Bool

This is the reverse command for auto mode. If this input is set high in auto
mode the motor will continue to run in this direction until the reverse
interlock becomes false, or this input is set low

bInResetError

Bool

If an error condition exists, the error must be fixed first, then set this bit
high to reset the internal error

bInMotorProtector

Bool

This input should be wired directly to the motor's circuit breaker input, if
available. If not available, this input should be set to true. When false, the
motor is disabled and an error is triggered

bInLocalDisconnect

Bool

This input should be wired directly to the motor's safety disconnect switch
input, if available. If not available, this input should be set to true. When
false, the motor is disabled and an error is triggered

bInClutch

Bool

This input should be wired directly into the motors clutch overload input, if
available. If not available, this input should be set to true. When false, the
motor is disabled and an error is triggered

*Only valid in Automatic Mode

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 14 of 58

7.2.2.2. InOut Parameters


In/Out Variables
HMI_VFD_Control

Type

Description

udtHMI_VF
D_Control

This In/Out UDT is used to communicate to the HMI. Inside the UDT are all the
variables needed to control the motor in manual mode, including forward,
reverse, and stop commands. Also inside this UDT are all feedback signals
including actual speed, actual current, and the forward/reverse signals

7.2.2.3. Out Parameters


Output Variables

Type

Description

bOutContactor

Bool

Contactor output. Map to Output to turn on contactor if used

bOutForward

Bool

Motor is running in forward. Forward running signal based on input


to block

bOutReverse

Bool

Motor is running in reverse. Reverse running signal based on input to


block

wOutSpeedSP

Word

Speed value to Map to Output to control speed. Map to analog


output.

rOutSpeedActual

Real

Actual Speed based on speed feedback signal

bOutError

Bool

This output indicates whether theres an error condition in the VFD

bOutAuto

Bool

Output indicating whether the block is in auto mode

ERROR_VFD

udtError_VFD

This output UDT has one bit for every type of error. It should be
mapped to the HMIs error list. It can also be used for advanced
debugging of the error state

7.2.3. User Defined Types


7.2.3.1. udtHMI_VFD_Control
Data
Type

Name

Description

iMode

Int

Current mode

iErrorCode

Int

iStatus

Int

rManualSpeedSP

Real

Error code. See Section 12.3.1 of the Library


Overview and Architecture document for further
details
Status for HMI display. See Section 12.3.1 of the
Library Overview and Architecture document for
further details
Speed set point for manual mode

rAutoSpeedSP

Real

Speed set point for automatic mode

rActualSpeed

Real

Actual motor speed

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 15 of 58

rActualCurrent

Real

Actual motor current

rActualPower

Real

Actual motor power

bPB_ResetError

Bool

Reset errors pushbutton

bPB_Forward

Bool

Move forward in manual mode pushbutton

bPB_Reverse

Bool

Move reverse in manual mode pushbutton

bPB_Stop

Bool

Stop in manual mode pushbutton

bPBEN_ResetError

Bool

Reset Errors pushbutton enabled

bPBEN_Forward

Bool

Forward pushbutton enabled

bPBEN_Reverse

Bool

Reverse pushbutton enabled

bPBEN_Stop

Bool

Stop pushbutton enabled

bForwardOn

Bool

Forward command is on

bReverseOn

Bool

Reverse command is on

bSignalForward

Bool

Forward signal

bSignalReverse

Bool

Reverse signal

bError

Bool

Overall error

bInterlock

Bool

VFD Interlocked

7.2.3.2. udtError_VFD
Errors

Description

Current

Motor Protector tripped

Local_Disconnect

Motor Local switch OFF

Clutch

Tool (clutch) error

Signal_Contactor_On

No feedback from motor contactor

Signal_Contactor_Off

Contactor still ON

Signal_Forward

No SIGNAL Forward from VFD

Signal_Reverse

No SIGNAL Reverse from VFD

Not_Stopped

Motor doesn't stop

VFD_Max_Freq

Part of UDT, but not used by fbVFD_Analog

VFD_Current

Part of UDT, but not used by fbVFD_Analog

VFD_Motor_Overload

Part of UDT, but not used by fbVFD_Analog

VFD_Overload

Part of UDT, but not used by fbVFD_Analog

VFD_Fault

Part of UDT, but not used by fbVFD_Analog

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 16 of 58

Cooling_Fan_On

Cooling fan did not come on within 30 seconds

7.2.4. HMI Icon Display


The HMI Icon is used on the main HMI screen to provide a brief overview of the status of the device. Custom
devices can be made to match specific applications. Note: As the VFD_Analog faceplate uses the same UDT as
VFD_GSeries they share the same faceplate.
7.2.4.1. HMI Icon Display Objects
The library contains the following objects to be used on the HMI screen:
Motor Horizontal

Pump Horizontal

Motor Vertical

Pump Vertical

7.2.4.2. HMI Icon Appearance and Functionality


The device appearance changes depending on the state it is in, see table below for description:
Indicator
Device Color

Yellow Border
Yellow Hexagon with I in center

Meaning
Blue: Stopped
Green: Running
Yellow: Start
Red: Error state
Red Flashing: E-stop pressed
Manual mode
Interlocked

7.2.4.3. HMI Icon Interface


The device interface is shown below. It requires only one property linked, the HMI_VFD_Control property. The
HMI_VFD_Control needs to be mapped to the same udtHMI_VFD_Control used by the Function Block.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 17 of 58

7.3. Digital Single Speed Motor fbMotor_Reversing


7.3.1. Description
The Reversing Motor Control Function Block is utilized for motors started and stopped using digital outputs. If the
Motor is only one direction, then map False into bInEnableReverse, and this will perform as a single direction
motor.

7.3.2. Function Block Interface


7.3.2.1. Input Parameters
Input Variables

Type

tInTimeout
iInMode

Time
Int

bInEstop
bInSignalForward

Bool
Bool

bInSignalReverse

Bool

bInEnableForward

Bool

bInEnableReverse

Bool

Description
The amount of time before an error condition triggers an error
Device mode input. See Section 12.1.2 of the Library Overview and Architecture
document for further details
Emergency stop input
Forward feedback bit. This tells the motor function block whether the motor is going
in the forward direction. If no feedback input is available, wire the forward output to
the forward feedback input
Reverse feedback bit. This tells the motor function block whether the motor is going
in the reverse direction. If no feedback input is available, wire the forward output to
the forward feedback input
Forward interlock. The motor is allowed to run in the forward direction if this
condition has been met. If the motor should always be able to move in this direction,
this input should be set to true. To disable the motor from ever traveling in this
direction, this input should be set to false
Reverse interlock. The motor is allowed to run in the reverse direction if this condition
has been met. If the motor should always be able to move in this direction, this input
should be set to true. To disable the motor from ever traveling in this direction, this
input should be set to false
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 18 of 58

bInCommandForward*

Bool

bInCommandReverse*

Bool

bInResetError

Bool

bInMotorProtector

Bool

bInLocalDisconnect

Bool

bInClutch

Bool

This is the forward command for auto mode. If this input is set high in auto mode the
motor will continue to run in this direction until the forward interlock becomes false,
or this input is set low
This is the reverse command for auto mode. If this input is set high in auto mode the
motor will continue to run in this direction until the reverse interlock becomes false, or
this input is set low
If an error condition exists, the error must be fixed first, then set this bit high to reset
the internal error
This input should be wired directly to the motors circuit breaker input, if available. If
not available, this input should be set to true. When false, the motor is disabled and
an error is triggered
This input should be wired directly to the motors safety disconnect switch input, if
available. If not available, this input should be set to true. When false, the motor is
disabled and an error is triggered
This input should be wired directly to the motors clutch input. When false, the motor
is disabled and an error is triggered

*Only valid in Automatic Mode


7.3.2.2. InOut Parameters
In/Out Variables
HMI_MotorControl

Type

Description

udtHMI_M
otorContro
l

This in/out UDT is used to communicate to the HMI. Inside the UDT are all the
variables needed to control the motor in manual mode, including forward,
reverse, and stop commands

Type

Description

7.3.2.3. Out Parameters


Output Variables
bOutForward

Bool

This output should be wired to the motors forward contact

bOutReverse

Bool

This output should be wired to the motors reverse contact

bOutError

Bool

This output indicates whether theres an error condition in the motor

ERROR_Motor

udtError_M
otor

This output UDT has one bit for every type of error. It should be mapped to
the HMIs error list. It can also be used for advanced debugging of the error
state

bOutAuto

Bool

This output indicates whether the block is in auto mode

7.3.3. User Defined Types


7.3.3.1. udtHMI_MotorControl
Data
Type

Name

Description

iMode

Int

Current mode

iErrorCode

Int

Error code. See Section 12.3.1 of the Library Overview and Architecture document for
further details
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 19 of 58

iStatus

Int

Status for HMI display. See Section 12.3.1 of the Library Overview and Architecture
document for further details

bPB_ResetError

Bool

Reset errors pushbutton

bPB_Forward

Bool

Move forward in manual mode pushbutton

bPB_Reverse

Bool

Move Reverse in manual mode pushbutton

bPB_Stop

Bool

Stop in manual mode pushbutton

bPBEN_ResetError

Bool

Reset Errors pushbutton enabled

bPBEN_Forward

Bool

Forward pushbutton enabled

bPBEN_Reverse

Bool

Reverse pushbutton enabled

bPBEN_Stop

Bool

Stop pushbutton enabled

bForwardOn

Bool

Forward command is on

bReverseOn

Bool

Reverse command is on

bSignalForward

Bool

Forward signal

bSignalReverse

Bool

Reverse signal

bError

Bool

Overall error

bInterlock

Bool

Motor interlocked

7.3.3.2. udtError_Motor
Name

Description

MotorProtectorTripped

Motor protector tripped

LocalDisconnectOff

Local disconnect off

ClutchTripped

Clutch tripped

NoSignalForward

No signal from forward contactor

NoSignalReverse

No signal from Reverse contactor

MotorNotStopped

Motor doesn't stop

7.3.4. HMI Icon Display


7.3.4.1. HMI Icon Display Objects
The library contains the following objects to be used on the HMI screen:

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 20 of 58

Motor Horizontal

Pump Horizontal

Motor Vertical

Pump Vertical

7.3.4.2. HMI Icon Appearance and Functionality


The device appearances changes depending on the state it is in, see table below for description:
Indicator
Device Color

Yellow Border
Yellow Hexagon with I in center

Meaning
Blue: Stopped
Green: Running
Yellow: Start
Red: Error State
Red Flashing: E-stop
pressed
Manual Mode
Interlocked

7.3.4.3. HMI Icon Interface


The device interface is shown below. It requires only one property linked, the HMI_MotorControl property. The
HMI_MotorControl property needs to be mapped to the same udtHMI_MotorControl used by the Function Block.

7.3.5. HMI Pop-up Faceplate


The HMI pop up provides a detailed display of the status of the motor. Additionally, it allows for control on the
motor when the System Mode is Independent or Manual modes.
7.3.5.1. HMI Pop-up display
The library contains a single pop-up faceplate shown below:

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 21 of 58

7.3.5.2. HMI Pop-up Appearance and Functionality


The table below gives a feature description for the pop up faceplate:
Object

Type

Description

Auto Mode Button

Button

Sets device to Auto Mode. Only available when global mode is Independent. Button
is green when devices is in Auto Mode.
Sets device to Manual Mode. Only available when global mode is Independent.
Button is green when device is in Manual Mode.
Displays current status of device interlock (yellow for interlock, grey when not)

Manual Mode

Button

Interlock Status Field

I/O Field

Error Status Field

I/O Field

Start Forward Button

Button

Displays current error status. Field box turns red if any errors are present, and
displays active error text. It will scroll through multiple alarms.
Drives motor forward when in Manual Mode

Stop Button

Button

Stops the device

Start Reverse Button

Button

Drives motor in reverse when in Manual Mode

RESET Button

Button

Resets errors

EXIT Button

Button

Exits the pop up screen

7.3.5.3. HMI Pop-up Interface


The device interface is shown below. Two properties are linked in this interface: HMI_MotorControl and sTitle. The
HMI_MotorControl needs to be mapped to the same udtHMI_MotorControl used by the Function Block. The
sTitle property requires a string passed into it, and this value will display at the top of the Pop-up.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 22 of 58

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 23 of 58

8. Valve Control
8.1. Two State Solenoid Valve fbValve_Solenoid
8.1.1. Description
This library item is to be utilized with two state solenoid valve applications. It can be used for spring close, spring
open, or double acting solenoids.

8.1.2. Function Block Interface


8.1.2.1. Input Parameters
Input Variables

Type

Description

tInTimeout

Time

The amount of time before an error condition triggers an error

iInMode

Int

Device mode input. See Section 12.1.2 of the Library Overview and Architecture
document for further details

bInEstop

Bool

Emergency stop input

bInSignalHome

Bool

Home position feedback

bInSignalWork

Bool

Work position feedback

bInEnable

Bool

Valve interlock. The valve is allowed to operate if this condition has been met

bInCommandWork*

Bool

Move to work position in automatic mode

bInResetError

Bool

If an error condition exists, the error must be fixed first, then set this bit high to
reset the internal error

*Only valid in Automatic Mode

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 24 of 58

8.1.2.2. InOut Parameters


In/Out Variables
HMI_CylinderControl

Type

Description

udtHMI_Cy
linderContr
ol

This in/out UDT is used to communicate to the HMI. Inside the UDT are all the
variables needed to control the cylinder in manual mode

8.1.2.3. Out Parameters


Output Variables

Type

Description

bOutHome

Bool

Output for home position

bOutWork

Bool

Output for work position

bOutAuto

Bool

This output indicates whether the block is in auto mode

bOutError

Bool

This output indicates whether there's an error condition in the cylinder

ERROR_Cylinder

udtError_Cyl
inder

This output UDT has one bit for every type of error. It should be mapped to
the HMIs error list. It can also be used for advanced debugging of the error
state

8.1.3. User Defined Types


8.1.3.1. udtError_Valve
Errors

Description

NoHomeFeedback

Home position feedback not active

NoWorkFeedback

Work position feedback not active

HomeFeedbackStillActive

Home position feedback still active when commanded to Work Position

WorkFeedbackStillActive

Work position feedback still active when commanded to Home Position

8.1.3.2. udtHMI_ValveControl
Data
Type

Name

Description

iMode

Int

Current mode

iErrorCode

Int

iStatus

Int

bPB_ResetError

Bool

Reset errors pushbutton

bPB_Home

Bool

Move to home in manual mode pushbutton

bPB_Work

Bool

Move to work in manual mode pushbutton

Error code. See Section 12.3.1 of the Library Overview and Architecture document for
further details
Status for HMI display. See Section 12.3.1 of the Library Overview and Architecture
document for further details

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 25 of 58

bPBEN_ResetError

Bool

Reset Error pushbutton enabled

bPBEN_Home

Bool

Home pushbutton enabled

bPBEN_Work

Bool

Work pushbutton enabled

bHomeOn

Bool

Home command is on

bWorkOn

Bool

Work command is on

bSignalHome

Bool

Home feedback

bSignalWork

Bool

Work feedback

bError

Bool

Error status

bInterlock

Bool

Valve interlocked

8.1.4. HMI Icon Display


The HMI Icon is used on the main HMI screen to provide a brief overview of the status of the device. Custom
devices can be made to match specific applications.
8.1.4.1. HMI Icon Display Objects
The library contains the following objects to be used on the HMI screen:
Valve Horizontal

Valve Vertical

8.1.4.2. HMI Icon Appearance and Functionality


The device appearances changes depending on the state it is in, see table below for description:
Indicator
Device Color

Yellow Border
Yellow Hexagon with I in center

Meaning
Green: Open
Yellow: Valve
Opening/Closing
Red: Error state
Red Flashing: E-stop
pressed
Manual mode
Interlocked

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 26 of 58

8.1.4.3. HMI Icon Interface


The device interface is shown below. It requires only one property linked, the HMI_ValveControl property. The
HMI_ValveControl property requires a datablock of the udtHMI_ValveControl type to be linked: in the example
below it is dbWaterSystem_HMI_SolenoidValveControl.

8.1.5. HMI Pop-up Faceplate


The HMI pop up provides a detailed display of the status of the valve. Additionally, it allows for control on the
valve when the System Mode is Independent or Manual.
8.1.5.1. HMI Pop-up Display
The library contains a single pop-up faceplate shown below:

8.1.5.2. HMI Pop-up Appearance and Functionality


The table below gives a feature description for the pop up faceplate:
Object

Type

Auto Mode Button

Button

Manual Mode

Button

Interlock Status Field

I/O Field

Error Status Field

I/O Field

HOME Button

Button

Description
Sets device to Auto Mode. Only available when global mode is Independent. Button
is green when device is in Auto Mode.
Sets device to Manual Mode. Only available when global mode is Independent.
Button is green when device is in Manual Mode.
Displays current status of device interlock (yellow for interlock, grey when not)
Displays current error status. Field box turns red if any errors are present, and
displays active error text. It will scroll through multiple alarms
Sets valve to HOME position

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 27 of 58

WORK Button

Button

Sets valve to WORK position

RESET Button

Button

Resets errors

EXIT Button

Button

Exits the pop up screen

8.1.5.3. HMI Pop-up Interface


The device interface is shown below. The HMI_ValveControl property The HMI_ValveControl needs to be mapped
to the same udtHMI_ValveControl used by the Function Block.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 28 of 58

8.2. Analog Valve fbValve_Analog


8.2.1. Description
This library item is to be utilized with a valve controlled using an analog output. This block will work with any valve
that is controlled through an analog output from the PLC.

8.2.2. Function Block Interface


8.2.2.1. Input Parameters
Input Variables

Type

Description

tInTimeout

Time

The amount of time before an error condition triggers an error

iInMode

Int

Device mode input. See Section 12.1.2 of the Library Overview and Architecture
document for further details

iInEstopFunction

Int

Enumerated value of E-Stop response constant. Estop.MinSetPoint sets


rOutCommand to the minimum set point (0%), Estop.MaxSetPoint sets to the
maximum set point (100%), and Estop.HMISetPoint sets to an HMI-specified
value that can be in between the min and max.

bInEstop

Bool

Emergency stop input

bInEnable

Bool

Valve interlock. The valve is allowed to operate if this condition has been met

rInSignalCommand

Real

Actual % open from valve (-1 to disable)

rInAutoCommand

Real

Auto mode set point command

bInResetError

Bool

If an error condition exists, the error must be fixed first, then set this bit high to
reset the internal error

8.2.2.2. InOut Parameters


In/Out Variables

Type

Description

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 29 of 58

HMI_CylinderControl

8.2.2.3. Out Parameters


Output Variables

udtHMI_Analo
gValveControl

This in/out UDT is used to communicate to the HMI. Inside the UDT are all
the variables needed to control the cylinder in manual mode and provide
status for the HMI

Type

Description

wOutCommand

Word

Value to be mapped to output used to control cylinder

rOutCommand

Real

Output value from 0-100% used for other PLC logic

bOutAuto

Bool

This output indicates whether the block is in auto mode

bOutError

Bool

This output indicates whether there's an error condition in the cylinder

ERROR_AnaValve

udtError_An
aValve

This output UDT has one bit for every type of error. It should be mapped to
the HMIs error list. It can also be used for advanced debugging of the error
state

8.2.3. User Defined Types


8.2.3.1. udtHMI_VFD_Control
Data
Type

Name

Description

iMode

Int

Current mode

iErrorCode

Int

iStatus

Int

rManualSP

Real

Set point for manual mode

rAutoSP

Real

Set point for automatic mode

rEstopSP

Real

Set point for an e-stop condition, if selected

rActual

Real

Actual value

bPB_ResetError

Bool

Reset errors pushbutton

bPBEN_ResetError

Bool

Reset errors pushbutton enable

bError

Bool

Overall error

bInterlock

Bool

Valve Interlocked

iEstopFunction

Int

Enumerated value of E-Stop response constant.

Error code. See Section 12.3.1 of the Library Overview and Architecture document for
further details
Color status for HMI. See Section 12.3.1 of the Library Overview and Architecture
document for further details

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 30 of 58

8.2.3.2. udtError_AnalogValve
Name
Invalid

Data
Type
Bool

Description
Invalid input given

8.2.4. HMI Icon Display


8.2.4.1. HMI Icon Display Objects
The library contains the following objects to be used on the HMI screen:
Analog Valve Horizontal

Analog Valve Vertical

8.2.4.2. HMI Icon Appearance and Functionality


The device appearances changes depending on the state it is in, see table below for description:
Indicator
Device Color
Yellow Border
Yellow Hexagon with I in center

Meaning
Green: Opening
Red: Error state
Manual mode
Interlocked

8.2.4.3. HMI Icon Interface


The device interface is shown below. It requires only one property linked, the HMI_AnalogValveControl property.
The HMI_AnalogValveControl needs to be mapped to the same udtHMI_AnalogValveControl used by the
Function Block.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 31 of 58

8.2.5. HMI Pop-up Faceplate


The HMI pop up provides a detailed display of the status of the valve. Additionally, it allows for control on the
valve when the System Mode is Independent or Manual.
8.2.5.1. HMI Pop-up Display
The library contains a single pop-up faceplate shown below:

8.2.5.2. HMI Pop-up Appearance and Functionality


The table below gives a feature description for the pop up faceplate:
Object

Type

Description

Auto Mode Button

Button

Manual Mode

Button

Auto Mode SP

Output

Sets device to Auto Mode. Only available when global mode is Independent. Button
is green when devices is in Auto Mode.
Sets device to Manual Mode. Only available when global mode is Independent.
Button is green when device is in Manual Mode.
Displays PLC setpoint to be used in Auto Mode.

Manual Mode SP

Input

Adjusts the speed set point when in Manual Mode

Estop SP

Output

Displays the current speed of the motor

Actual

Output

Displays ratio of valve opened

Interlock Status Field

I/O Field

Displays current status of device interlock (yellow for interlock, grey when not)

Error Status Field

I/O Field

RESET Button

Button

Displays current error status. Field box turns red if any errors are present, and
displays active error text. It will scroll through multiple alarms
Resets errors

EXIT Button

Button

Exits the pop up screen

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 32 of 58

8.2.5.3. HMI Pop-up Interface


The device interface is shown below. Four properties are linked in this interface:

HMI_VFDControl: requires requires to be linked to the same udtHM_AnalogValveControl used by the


Function Block.
sFormatPattern: Changes data format of values, setting amount of leading and trailing zeros of outputs.
Adjusted directly in table
sTitle: Sets title of the pop up display. Adjusted directly in table
sUnit: sets the units used in the display

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 33 of 58

9. Input/Output Control
9.1. Analog Input with Scaling and Alarms fbIO_AnalogInput
9.1.1. Description
This library object scales analog inputs and provides setups for alarms.

9.1.2. Function Block Interface


9.1.2.1. Input Parameters
Input Variables

Type

Description

iInMode

Int

Mode input. See Section 12.1.2 of the Library Overview and Architecture
document for further details

wInValue

Word

Raw input signal from hardware input

rInEngUnitsMin

Real

Minimum Value for Engineering Units

rInEngUnitsMax

Real

Maximum Value for Engineering Units

rInLowLow

Real

Value for Low Alarm to trigger. Use IoScaling.S7Analog.iRawMin to disable

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 34 of 58

rInLow

Real

Value for Low Warning to trigger. Use IoScaling.S7Analog.iRawMin to disable

rInHigh

Real

Value for High Warning to trigger. Use IoScaling.S7Analog.iRawMax to disable

rInHighHigh

Real

Value for High Alarm to trigger. Use IoScaling.S7Analog.iRawMax to disable

rInLowLowDeadband

Real

Deadband for Low Low Alarm. Use 0 to disable

rInLowDeadband

Real

Deadband for Low Warning. Use 0 to disable

rInHighDeadband

Real

Deadband for High Warning. Use 0 to disable

rInHighHighDeadband

Real

Deadband for High High Alarm. Use 0 to disable

bInResetError

Bool

If an error condition exists, the error must be fixed first, then set this bit high to
reset the internal error

*Only valid in Automatic Mode


9.1.2.2. InOut Parameters
In/Out Variables

Type

Description

udtHMI_An
alogInput

This In/Out UDT is used to communicate to the HMI. Inside the UDT are all the
variables needed to configure additional settings and provide status to the HMI

9.1.2.3. Out Parameters


Output Variables

Type

Description

rOutEngUnitsValue

Real

Engineering units scaled value

bOutLowLow

Bool

Low low alarm is active

bOutLow

Bool

Low warning is active

bOutHigh

Bool

High warning is active

bOutHighHigh

Bool

High high alarm is active

bOutAuto

Bool

Input is in auto mode

HMI_IO_AnalogInput

bOutError

Bool

Error Exists

ERROR_IO_AnalogIn

udtError_An
alogInput

This output UDT has one bit for every type of error. It should be mapped to
the HMIs error list. It can also be used for advanced debugging of the error
state

9.1.3. User Defined Types


9.1.3.1. udtHMI_VFD_Control
Data
Type

Name
iMode

Int

Description
Current mode

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 35 of 58

Error code. See Section 12.3.1 of the Library Overview and Architecture document for
further details
Overall HMI Status. See Section 12.3.1 of the Library Overview and Architecture
document for further details

iErrorCode

Int

iStatus

Int

rActiveValue

Real

Used Value, Input or Override

rInputValue

Real

Input Value

rManualValue

Real

Manual mode simulated value

bPB_ResetError

Bool

Reset errors pushbutton

bPBEN_ResetError

Bool

Reset error pushbutton enabled

bError

Bool

Overall error

9.1.3.2. udtError_AnalogInput
Errors

Description

LowLowAlarm

Value below low low set point

HighHighAlarm

Value above high high set point

Invalid

Invalid input

9.1.4. HMI Icon Display


9.1.4.1. HMI Icon Display Object
The library contains the following display to be used on the HMI screen:

9.1.4.2. HMI Icon Interface


The device interface is shown below. The following three properties need to be assigned to the object:
-

HMI_AnalogInput: Control needs to be mapped to the same udtHMI_AnalogInput used by the Function
Blocks
sFormatPattern: Sets the amount of leading/trailing zeros of the display value
sUnit: Sets the unit the value is displayed in (i.e. amps, centimeters etc.)

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 36 of 58

9.1.5. HMI Pop-up Faceplate


The HMI pop up provides a detailed display of the status of the Analog Input device. Additionally, it allows for
override control of the device reading when the System Mode is Independent or Manual.
9.1.5.1. Pop Up Object
The library contains a single pop-up faceplate shown below:

9.1.5.2. HMI Pop-up Appearance and Functionality


The table below gives a feature description for the pop up faceplate:

Object

Type

Description

Auto Mode Button

Button

Manual Mode

Button

Override Value

Input

Sets device to Auto Mode. Only available when global mode is Independent. Button
is green when devices is in Auto Mode.
Sets device to Manual Mode. Only available when global mode is Independent.
Button is green when device is in Manual Mode.
Adjusts the current value of the device

Input Value

Output

Displays the current reading of the device

Active Value

Output

Error Status Field

I/O Field

RESET Button

Button

Displays the value being currently used the Override Value in Manual Mode, or
Input Value in Auto Mode
Displays current error status. Field box turns red if any errors are present, and
displays active error text. It will scroll through multiple alarms
Resets errors

EXIT Button

Button

Exits the pop up screen

9.1.5.3. Interface
The device interface is shown below. Four properties are linked in this interface:

HMI_AnalogInput: Needs to be mapped to the same udt_HMI_AnalogInput used by the Function Block
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 37 of 58

sFormatPattern: Changes data format of values, setting amount of leading and trailing zeros of outputs.
Adjusted directly in table
sTitle: Sets title of the pop up display. Adjusted directly in table
sUnits: Sets the units used in the display. Adjusted directly in table

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 38 of 58

9.2. Analog Output with Scaling fbIO_AnalogOutput


9.2.1. Description
This library object scales process values to be used for Analog Outputs.

9.2.2. Function Block Interface


9.2.2.1. Input Parameters
Input Variables

Type

Description

iInMode

Int

Mode input. See Section 12.1.2 of the Library Overview and Architecture document
for further details

iInSensorType

Int

Enumerated value of sensor types (IoScaling.S7Analog.Types)

iInEstopFunction

Int

Enumerated value of E-Stop response constant. Estop.MinSetPoint sets wOutValue


to the minimum set point (rInEngUnitsMax), Estop.MaxSetPoint sets to the
maximum set point (rInEngUnitsMin), and Estop.HMISetPoint sets to an HMIspecified value that can be in between the min and max.

bInEstop

Bool

Emergency stop input

bInEnable

Bool

Interlock for the Analog Output. If this bit is false, then output will be 0.

rInValue*

Real

Auto mode value of output

rInEngUnitsMin

Real

Engineering units scale min

rInEngUnitsMax

Real

Engineering units scale max

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 39 of 58

bInResetError

If an error condition exists, the error must be fixed first, then set this bit high to reset
the internal error

Bool

*Only valid in Automatic Mode


9.2.2.2. InOut Parameters
In/Out Variables
HMI_IO_AnalogOut

Type

Description

udtHMI_An
alogOutpu
t

This In/Out UDT is used to communicate to the HMI. Inside the UDT are all the
variables needed to configure additional settings and provide status to the HMI

Type

Description

9.2.2.3. Out Parameters


Output Variables
bOutAuto

Bool

Block in auto mode

bOutError

Bool

Error exists

wOutValue

Word

Value to output to Analog Output

ERROR_IO_AnalogOut

udtError_An
alogOut

This output UDT has one bit for every type of error. It should be mapped to
the HMIs error list. It can also be used for advanced debugging of the error
state

9.2.3. User Defined Types


9.2.3.1. udtHMI_AnalogOutput

Name

Type

Description

iMode

Int

Current mode

iErrorCode

Int

rValue

Real

Error code. See Section 12.3.1 of the Library Overview and


Architecture document for further details
Output Value

rAutoValue

Real

Auto mode value

rManualValue

Real

Manual mode value

rEstopValue

Real

Estop condition custom value

bPB_ResetError

Bool

Reset errors pushbutton

bPBEN_ResetError

Bool

Reset error pushbutton enabled

bError

Bool

Overall error

bInterlock

Bool

Analog output is interlocked

iEstopFunction

Int

Enumerated value of E-Stop response constant.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 40 of 58

9.2.3.2. udtError_AnalogOutput
Errors

Description

Out_Of_Range

Input Value is outside range of Engineering Units

Configuration_Error

Engineering Units are not properly configured

9.2.4. HMI Icon Display


The HMI Icon is used on the main HMI screen to provide a brief overview of the status of the device. Custom
devices can be made to match specific applications.
9.2.4.1. HMI Icon Display Objects
The library contains the following object to be used on the HMI screen:

9.2.4.2. HMI Icon Appearance and Functionality


The device appearances changes depending on the state it is in, see table below for description:
Indicator
I/O Field Value
Yellow Border

Meaning
Current value sent to device
Device interlocked

9.2.4.3. HMI Icon Interface


The device interface is shown below. It requires three properties to be linked:

HMI_Analog_Output: Needs to be mapped to the same udtHMI_AnalogOutput used by the Function


Block
sFormatPattern: Changes data format of values, setting amount of leading and trailing zeros of outputs.
Adjusted directly in table
sUnit: Sets the units used in the display

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 41 of 58

9.2.5. HMI Pop-up Faceplate


The HMI pop up provides a detailed display of the status of the Analog Output device. Additionally, it allows for
control of the device when the System Mode is Independent or Manual.

9.2.5.1. HMI Pop-up Display


The library contains a single pop-up faceplate shown below:

9.2.5.2. HMI Pop-up Appearance and Functionality


The table below gives a feature description for the pop up faceplate:
Object

Type

Description

Auto Mode Button

Button

Manual Mode

Button

Auto Mode SP

Output

Sets device to Auto Mode. Only available when global mode is


Independent. Button is green when devices is in Auto Mode.
Sets device to Manual Mode. Only available when global mode is
Independent. Button is green when device is in Manual Mode.
Displays PLC set point to be used in Auto Mode.

Manual Mode SP

Input

Adjusts the speed set point when in Manual Mode

EStop Value

I/O Field

Displays the current value of the Estop reading

Interlock Status Field

I/O Field

Error Status Field

I/O Field

RESET Button

Button

Displays current status of device interlock (yellow for interlock, grey


when not)
Displays current error status. Field box turns red if any errors are
present, and displays active error text. It will scroll through multiple
alarms
Resets errors

EXIT Button

Button

Exits the pop up screen

9.2.5.3. HMI Pop-up Interface


The device interface is shown below. Two properties are linked in this interface:

HMI_AnalogOutput: Needs to be mapped to the same udt_HMI_AnalogOutput used by the Function


Block
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 42 of 58

sFormatPattern: Changes data format of values, setting amount of leading and trailing zeros of outputs.
Adjusted directly in table
sTitle: Sets title of the pop up display. Adjusted directly in table
sUnit: Sets the units used in the display

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 43 of 58

10. General Control


10.1. System Control
10.1.1. Description
The System Control Library Object consists of a UDT, HMI Icon, and HMI Faceplate.

10.1.2. User Defined Types


10.1.2.1. udtHMI_SystemControl
Data
Type

Name

Description

iMode

Int

System mode

bEStop

Bool

System hardware E-Stop

bError

Bool

Actuators error present

bAuto

Bool

All actuators in auto mode

bIndependentEnable

Bool

Independent mode enabled

bPB_ResetError

Bool

Reset error push button

10.1.3. HMI Icon Display


10.1.3.1. HMI Icon Display Objects
The library contains the following object to be used on the HMI screen:

10.1.3.2. HMI Icon Appearance and Functionality


The status text and color updates according to the current running state of the device:
Device Mode
Stop
Auto
Manual
Independent

System Color
Grey
Green
Blue
Yellow

10.1.3.3. HMI Icon Interface


The device interface is shown below. The following properties are required to be linked:

HMI_SystemMode: Needs to be mapped to the udt_HMI_SystemControl for the given system.


sTitle: Sets title of the pop up display. Adjusted directly in table.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 44 of 58

10.1.4. HMI Pop-up Faceplate


The HMI pop up provides a display of the systems status. Additionally, it provides operator control for the overall
system mode.
10.1.4.1. HMI Pop-up Display
The library contains a single pop-up faceplate shown below:

10.1.4.2. HMI Pop-up Appearance and Functionality


The table below gives a feature description for the pop up faceplate:
Object

Type

Description

Auto Mode

Button

Sets system to Auto Mode

Manual Mode

Button

Sets system to Manual Mode

Independent Mode

Button

Sets system to Independent Mode

Stop Mode

Button

Sets system to Stop Mode

Interlock Status Field

I/O Field

Displays current system alarm status (red for alarm, grey for System Ok)

E-Stop Status Field

I/O Field

RESET Button

Button

Displays current E-stop status. Field box turns red if an E-stop error is present, and
displays active error text.
Resets errors

EXIT Button

Button

Exits the pop up screen

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 45 of 58

10.1.4.3. HMI Icon Interface


The device interface is shown below. The following properties are required to be linked:

HMI_SystemMode: Needs to be mapped to the udt_HMI_SystemControl for the given system


sTitle: Sets title of the pop up display. Adjusted directly in table

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 46 of 58

10.2. Interlock Function Block fbInterlock


10.2.1. Description
This library object is used to provide operator information for multiple values that are interlocking a process. It has
inputs for items that may be interlocking a process, and provides operator information to inform the operator of
what interlocks are preventing operation.

10.2.2. Function Block Interface


10.2.2.1. Input Parameters
Input Variables

Type

Description

bInInterlock_01

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_02

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_03

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_04

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_05

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_06

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 47 of 58

bInInterlock_07

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_08

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_09

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_10

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_11

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_12

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_13

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_14

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_15

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

bInInterlock_16

Bool

Interlock for the system. When value is 1, system is okay to operate. Disable
input by not mapping or putting in a value of True

10.2.2.2. InOut Parameters


In/Out Variables
HMI_Interlock

10.2.2.3. Out Parameters


Output Variables
bOutInterlockOK

Type

Description

udtHMI_Int
erlock

This In/Out UDT is used to communicate to the HMI. Inside the UDT are all the
variables needed to configure additional settings and provide status to the HMI

Type

Description

Bool

Value of 1 means system is okay to operate

10.2.3. User Defined Types


10.2.3.1. udtHMI_Interlock
Name
abInterlocks

Data Type
Array[1..16] of Bool

Description
Interlock statuses

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 48 of 58

asInterlockNames

Array[1..16] of
String[20]

Interlock names

bInterlockOk

Bool

System Interlock is ok

10.2.4. HMI Icon Display


The Interlock block is configured so that the Faceplate can be tied to a faceplate of another object, and allow
viewing from other library pop-ups.

10.2.4.1. HMI Icon Display Objects


The library contains the following display to be used on the HMI screen:

10.2.4.2. HMI Icon Appearance and Functionality


The device appearances changes depending on the state it is in, see table below for description:
Indicator
Device Color

Meaning
Yellow: Device interlocked
Grey: Device not interlocked

10.2.4.3. HMI Icon Interface


The device interface is shown below. Only one property is required to be linked: the HMI_Interlock property. It
needs to be mapped to the same udtHMI_Interlock used by the Function Block.

10.2.5. HMI Pop-up Faceplate


The HMI pop up provides a display of the status of each interlock in the system

10.2.5.1. HMI Pop-up Display


The library contains two pop-up faceplates shown below:

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 49 of 58

Interlock8

Interlock16

Both faceplates use the same UDT- udtHMI_Interlock. fpInterlock8 is to be used when you have 8 or fewer
devices requiring interlocks.
10.2.5.2. HMI Pop-up Appearance and Functionality
The table below gives a feature description for the pop-up faceplate:
Object

Type

Device Status Field

Output

EXIT Button

Button

Description
Device OK: Displays OK in a green box
Device Interlocked, unable to run: Displays Interlock displayed in Red Box
Exits the pop-up screen

10.2.5.3. HMI Pop-up Interface


The device interface is shown below. Two properties are linked in this interface: HMI_Interlock and sTitle. The
HMI_Interlock needs to be mapped to the same udtHMI_Interlock used by the Function Block. The sInterlockTitle
property requires a string passed into it, and this value will display at the top of the Pop-up.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 50 of 58

10.3. PID Interface - fbPID_CompactInterface


10.3.1. Description
The S7-1200 and S7-1500 provide PID Technology objects that are best practices for use, therefore this would not
replace the blocks, but would provide an interface to the technology object on the HMI.
The interface will allow for modification of the PID loop and for manual override of the output from the HMI.
Unlike other library objects that are fully encapsulated, many of the output of this block will need to be mapped to
the PID_Compact block.

This block is used to handle HMI mode selection and control as well as scale inputs, handle e-stop conditions, and
allow manual and automatic tuning from the HMI.
The PID_Compact block must still be called from a cyclic interrupt OB. The interface tags used here should be
passed from the output of the fbPID_CompactInterface block with the exception of the ErrorAck bit, which must
be reset in the cyclic interrupt.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 51 of 58

10.3.2. Function Block Interface


10.3.2.1. Input Parameters
Input Variables
Type
iInMode

Int

bInEstop
iInEstopFunction

Bool
Int

rInSetpoint*
rInInput
wInInputPER
rInManualValue*

Real
Real
Word
Real

bInManualEnable*
iInPIDModeActual

Bool
Int

iInPIDModeRequest

Int

bInPIDModeActivate

Bool

bInResetError

Bool

Description
Sets the mode of the block. When the block is in auto mode, it utilizes rInSetpoint.
When the block is in manual mode, it reads commands from the HMI through
HMI_PIDInterface. . See Section 12.1.2 of the Library Overview and Architecture
document for further details
Emergency stop input
Enumerated value of E-Stop response constant. Estop.MinSetPoint sets Output to
the minimum set point (PID output maximum), Estop.MaxSetPoint sets to the
maximum set point (PID output minimum), and Estop.HMISetPoint sets to an HMIspecified value that can be in between the min and max.
PID set point
Scaled Process value (0-100%) Use this value or wInInputPer
Raw Process value. Use this value or rInInput
Used by automation logic to override PID and provide a manual value through PLC
logic
rInManualValue is used to override the PID output value when this is true
Actual mode of the PID_Compact technology object. This should be mapped from
the technology object data block
PID_Compact Mode as described by the PID compact. Used by automation logic to
enable the override of the PID_Compact mode
PID_Compact Mode will change on a rising edge of this bit based on
iInPIDModeRequest
If an error condition exists, the error must be fixed first, then set this bit high to reset
the internal error
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 52 of 58

dwInPIDCompactError

DWord

PID_Config

PID_Comp
actConfig

This is the output from the PID Compact Block and is used to create meaningful
alarms. This should be mapped from the technology object data block
PID_Compact structure used to provide configuration data. This should be mapped
from the technology object data block.

*Only valid in Automatic Mode


10.3.2.2. InOut Parameters
In/Out Variables

Type

Description

HMI_PID

udtHMI_PIDInt
erface

This in/out UDT is used to communicate to the HMI. Inside the UDT are all
the variables needed to control the PID in manual mode

PID_CompactControlPara
ms

PID_CompactC
ontrolParams

PID_Compact structure used to reference and modify tuning parameters.


This should be mapped from the technology object data block

10.3.2.3. Out Parameters


Output Variables

Type

Description

ERROR_PID

udtError_PI
D

This output UDT has one bit for every type of error. It should be mapped to
the HMIs error list. It can also be used for advanced debugging of the error
state

OUT_PIDInterface

udtOUT_PID
Interface

The output UDT is used to map standard variables to the inputs of the
PID_Compact block

10.3.3. User Defined Types


10.3.3.1. udtHMI_PIDControlParameters
Name

Type

Description

rProportionalGain

Real

Proportional gain coefficient

rIntegralTime

Real

Integral control time

rDerivativeTime

Real

Derivative control time

rProportionalWeight

Real

Proportional control weighting

rDerivativeWeight

Real

Derivative control weighting

10.3.3.2. udtOUT_PIDInterface
Name

Type

Description

rProcessValue

Real

Process value

wProcessValue

Word

Peripheral process value

rSetPoint

Real

PID control set point

rManualValue

Real

PID manual override value

iModeRequest

Int

Requested PID_Compact override mode


Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 53 of 58

bManualEnable

Bool

Enable PID manual override value

bModeChangeRequest

Bool

Request a PID_Compact mode change

10.3.3.3. udtHMI_PIDInterface
Name

Type

Description

iMode

Int

Current mode

iPIDMode

Int

PID compact mode

iErrorCode

Int

Error code. See Section 12.3.1 of the Library Overview and Architecture
document for further details

iEstopFunction

Int

Enumerated value of E-Stop response constant.

rEstopValue

Real

PID value for an e-stop if custom value is selected

rManualSP

Real

PID set point for manual mode

rAutoSP

Real

PID set point for automatic mode

rActualInput

Real

Actual PID input value

wActualInputPeripheral

Word

Actual PID input peripheral value

rOutput

Real

PID output value

wOutputPeripheral

Word

PID output peripheral value

bPB_ResetError

Bool

Reset errors pushbutton

bPB_Pretune

Bool

Start pretuning pushbutton

bPB_FineTune

Bool

Start finetuning pushbutton

bPB_AutomaticMode

Bool

Switch to automatic mode pushbutton

bPB_ManualMode

Bool

Switch to manual mode pushbutton

bPB_ManualTuning

Bool

Switch to manual PID tuning pushbutton

bTOG_ManualTuning

Bool

TOG Manual tuning enabled

bPBEN_ResetError

Bool

Reset errors pushbutton enabled

bPBEN_Pretune

Bool

Pretuning pushbutton enabled

bPBEN_FineTune

Bool

Fine tuning pushbutton enabled

bPBEN_AutomaticMode

Bool

Automatic mode pushbutton enabled

bPBEN_ManualMode

Bool

Manual mode pushbutton enabled

bError

Bool

Overall error

bErrorAck

Bool

PID_Compact Error Reset Command

10.3.3.4. udtError_PID
Name

Description

InputOutOfRange

Input value is out of the configured range

InputPERInvalid

InputPER value is invalid


Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 54 of 58

ValueOscillationFailed

Fine tuning - process value oscillation could not be maintained

ProcessValueCloseToSetPoint

Pre-tuning - process value is too close to set point

SetPointChangedDuringTuning

PID set point was changed during tuning

PretuningDuringFineTuning

Pre-tuning not allowed while fine tuning is active

InvalidOutputValueLimits

Pre-tuning - invalid configuration of output value limits

InvalidFineTuningParameter

Fine tuning - error occurred causing invalid parameters

InputInvalidFormat

Input value has an invalid number format

OutputCalculationError

Output value calculation error occurred

SamplingTimeError

PID_Compact not called within sampling time of cyclic interrupt OB

SetPointInvalidFormat

Set point value has an invalid number format

ManualInvalidFormat

Manual value has an invalid number format

SubstituteOutputInvalidFormat

Substitute output value has an invalid number format

DisturbanceInvalidFormat

Disturbance value has an invalid number format

10.3.4. HMI Pop-up Faceplate


The HMI pop up provides a detailed panel for PID control. There are two pop-up faceplates available:
fpPID_CompactInterface_Popup and fpPID_CompactInterface_Popup_Graph.

10.3.4.1. HMI Pop-up display


The library contains two pop-up faceplates, shown below:
PID Control Pop-up

PID Control Pop-up w/Trend Graph

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 55 of 58

10.3.4.2. HMI Pop-up Appearance and Functionality


The table below gives a feature description for the pop up faceplates:
Object

Type

Description

Auto Mode Button

Button

Manual Mode

Button

Auto Mode SP

Output

Sets device to Auto Mode. Only available when global mode is


Independent. Button is green when devices is in Auto Mode.
Sets device to Manual Mode. Only available when global mode is
Independent. Button is green when device is in Manual Mode.
Displays PLC set point to be used in Auto Mode.

Manual Mode SP

Input

Adjusts the speed set point when in Manual Mode

Actual Input

I/O Field

Displays the current speed of the motor (%)

Peripheral

I/O Field

Displays motor current (A)

Estop Value

I/O Field

Displays the current value of the Estop reading

PID Auto Button

Button

Sets PID control to Auto

PID Manual Button

Button

Sets PID control to Manual

P Field

I/O Field

Proportional gain value

I Field

I/O Field

Integral gain value

D Field

I/O Field

Derivative gain value

PW Field

I/O Field

Proportional Weight

DW Field

I/O Field

Derivative Weight

PreTune Button

Button

Initializes a pre-tune in the PID_Compact Block

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 56 of 58

Fine Tune Button

Button

Initializes a fine tune in the PID_Compact Block

Manual Tune Button

Button

Initializes a manual tune in the PID_Compact Block

RESET Button

Button

Resets the device

EXIT Button

Button

Exits the pop up screen

10.3.4.3. HMI Pop-up Interface


The device interface is shown below. The following properties are linked to the interface:

HMI_PIDInterface: Needs to be mapped to the same udtHMI_PIDInterface used by the Function Block
rLeftY-AxisEndValue: Maximum value for the left Y-Axis of the Trend Graph. This will typically be the
maximum value of the variable that is being controlled, water temperature for this example. Adjusted
directly in table. Note: This is only used for the PID Control pop-up with Trend Graph
rLeftY-AxisStartValue: Minimum value for the left Y-Axis of the Trend Graph. This will typically be the
minimum value of the variable that is being controlled, water temperature for this example. Adjusted
directly in table. Note: This is only used for the PID Control pop-up with Trend Graph
rTimeAxisRangeInSeconds: Defines the number of seconds being shown on the Trend graph. Adjusted
directly in table. Note: This is only used for the PID Control pop-up with Trend Graph
sFormatPattern: Changes data format of values, setting amount of leading and trailing zeros of outputs.
Adjusted directly in table
sTitle: Sets title of the pop-up display. Adjusted directly in table
sUnit: Sets the units used in the display. Adjusted directly in table
Trend: This is configured by right clicking on the trend on the pop up and adding the relevant tags to the
trend. Note: This is only used for the PID Control pop-up with Trend Graph

*Note: If custom values are required for both the right and left Y-Axis, use the PID control without the Trend
Graph and add a new one in manually. The right Y-Axis for the pop-up with the Trend Graph is set to default
to values between 0 and 100, representing the percentage of the PID control.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 57 of 58

10.4. Standard Alarm Interface fbAlarmWarning


10.4.1. Description
The Standard Alarm Interface provides an easy way to setup additional alarms. Alarms will latch until reset.

10.4.2. Function Block Interface


10.4.2.1. Input Parameters
Input Variables
Type

Description

bInWarning
bInAlarm

Bool
Bool

Warning Signal. Provides warning when signal is true


Alarm Signal. Provides alarm when signal is true

bInResetError

Bool

If an error condition exists, the error must be resolved first, then set this bit high to
reset the internal error

10.4.2.2. Out Parameters


Out Variables

Type

Description

bOutWarning

Bool

Signal used to show warning is active

bOutAlarm

Bool

Signal used to show alarm is active and has not been reset

10.4.3. HMI Icon Display


The HMI interface is done through the Alarm banner. There is no faceplate for this object. For information on how
to utilize alarms, see Siemens Open Library Siemens Alarm Generation document.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 58 of 58

SIEMENS OPEN LIBRARY


5 HMI Alarm Generation
OCTOBER 11, 2016

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 1 of 14

Contents
Contents .............................................................................................................................................................................. 2
1. Purpose ........................................................................................................................................................................... 3
2. Intended Use ................................................................................................................................................................. 3
3. Revision History............................................................................................................................................................ 3
4. Open Library License.................................................................................................................................................. 3
5. Hardware and Software Compatibility ................................................................................................................. 3
6. General Overview ........................................................................................................................................................ 5
6.1. Excel Macro ............................................................................................................................................................ 5
6.2. Alarm Special Considerations.......................................................................................................................... 5
7. Verify Non-Optimized Data Blocks........................................................................................................................ 6
8. Alarm Naming Conventions..................................................................................................................................... 7
8.1. Macro Alarm String Creation ........................................................................................................................... 7
9. Excel Macro ................................................................................................................................................................... 8
10. Importing Alarms to a Comfort Panel .............................................................................................................. 12

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 2 of 14

1. Purpose
This document walks through automatically generating HMI alarms for Siemens HMIs. This
overview covers tools included in the Open Library. Note that these tools are designed for use
with Open Library structures and architecture only. Specifically, these may only be used to
generate alarms for bit-packed Data Blocks. Use with any other alarm setup may not work.

2. Intended Use
This document is intended to be used by anyone utilizing the Open Library for PLC and HMI
Development after the PLC code has been complete and alarms are ready to be generated.

3. Revision History
Version
1.0
1.1
1.2
1.3

Date
2016-05-23
2016-06-20
2016-08-23
2016-10-11

Author
DMC
DMC
DMC
DMC

Comments
Initial Release
No Changes
No Changes
No Changes

4. Open Library License


Copyright (c) 2016 DMC, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

5. Hardware and Software Compatibility


This library was developed in TIA Portal V13 SP1. It has been tested on the S7-1200 and S7-1500
platforms, and untested modifications have been made for compatibility with S7-300 and S7-400.
The PLC objects can be used with any HMI, however, the configuration of the faceplates is only
available using a Comfort Panel or WinCC Advanced, and have been tested on a 7 Comfort Panel.
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 3 of 14

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 4 of 14

6. General Overview
Siemens Comfort Panels and WinCC Advanced Runtime use bits out of words to trigger alarms,
and there are no methods to configure Boolean alarms. This library, however, utilizes bits for all
alarms. To automate this process the Siemens Open Library includes a Microsoft Excel macro that
utilizes a data block of Booleans to generate alarms.

6.1. Excel Macro


The Excel macro uses the definition of Data Blocks to automatically generate alarms. All of the
source code is included as part of the Excel macro and can be edited in VBA for custom
applications. The Excel macro will work with any non-optimized data block containing only
Booleans. The Booleans can be placed directly in the Data Block, nested in User Defined Types, or
nested in Structs.

6.2. Alarm Special Considerations


The included Excel macro has the following special considerations in order for the system to
function:
1.

2.
3.
4.

5.

The Data Block must be non-optimized (applies to 1200/1500 only and is accessible via the
properties of the Data Block). See Section 7 of this document or 2- Siemens Open Library
- Initial Setup for details about how to set up a non-optimized data block.
The User Defined Type, Struct, and/or individual Boolean comments will be utilized for the
alarm text, so it is important to put in meaningful comments on each alarm.
The Excel macro will work with nested User Defined Types and Structs.
The Excel macro works only with data blocks containing only Booleans, so all automatically
generated alarms will need to be Boolean alarms, and should be concentrated in Data
Blocks.
The Excel macro utilizes the bit comments for alarm text, so arrays are not a recommended
structure as they wont generate unique alarm text, but could be used by modifying the
Excel Macro to grab relevant information from the array.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 5 of 14

7. Verify Non-Optimized Data Blocks


To verify that a data block is non-optimized, right click on the data block and select Properties.
Under the Attribute tab, verify the Optimized block access is not checked. Choosing optimized
block access permits the TIA Portal compiler to rearrange data to optimize space on the PLC.
When using the alarm generator, however, the Macro utilizes data block position to determine
address, so non-optimized blocks need to be used for correct functionality.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 6 of 14

8. Alarm Naming Conventions


This section discusses how automated alarms are generated and how text will be created for the
HMI. Alarm text will be created using the comments contained in the Data Block.

8.1. Macro Alarm String Creation


The Excel macro will generate the alarm based on the following parameters:
1.

For alarms not in a User Defined Type or Struct, the alarm string will be the Boolean
comment string.
2. For alarms in a single or nested User Defined Types and/or Structs, the comment for each
User Defined Type and/or Struct will be a prefix for the alarm.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 7 of 14

9. Excel Macro
The instructions below use an installation of Microsoft Office, specifically Microsoft Excel. However,
the Open Library Alarm Generator is in a macro-enabled Open XML format (.xlsx) and is
compatible with several open source office platforms.
1.

Open the Open Library Alarm Generator.xlsm document and click the Enable Content
button, if prompted.

2. Open up the PLC project that contains the desired alarm data blocks.
3. Right click the Errors data block that contains the alarms and select Copy as text

4. Navigate to the DataBlocks tab in the Excel document

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 8 of 14

5. Paste the copied contents into the next available row in column A

6. Navigate to the DataBlock Numbers tab

7. Add the Data Block name, number, and HMI connection name to the list

8. Repeat steps 3-7 for each Errors data block containing HMI alarms.
9. If you are not using custom Error UDTs, you can skip to step 14.
10. Right click the custom Error UDT and select Copy as text

11. Navigate to the UDTs tab of the Excel document

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 9 of 14

12. Paste the copied contents into the next available of column A

13. Repeat steps 10-12 for each custom Error UDT used in your Errors data blocks
14. Navigate back to the Instructions tab

15. Press the Generate Alarms button

16. If you are prompted with any errors that occurred, make sure to resolve them before trying
again.
17. If alarm generation was successful, Excel will prompt you to save a file without macros
enabled. Select Yes. This will save a copy of the current workbook with an identical name
but with an .xlsx file extension instead of .xlsm. This is done so that the workbook can
be imported into TIA Portal properly.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 10 of 14

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 11 of 14

10. Importing Alarms to a Comfort Panel


Once an .xlsx alarm file has been created, it may be imported directly to TIA Portal. It is
important to note that the file format created is compatible with WinCC Comfort panels and
WinCC Advanced.
1.

Open the Show all tags section of the Comfort Panel

2. Press the Import button in the top left corner

3. Browse for the generated .xlsx file and press the Import button

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 12 of 14

4. Once completed, you will get prompted with a success dialog

5. Press Ok and check to make sure that all tags were imported correctly

6. Open the HMI Alarms section

7. Press the Import button in the top left corner

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 13 of 14

8. Again, browse for the generated .xlsx file and press the Import button

9. Once completed, you will get prompted with another success dialog

10. Press Ok and check to make sure that all alarms were imported correctly

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 14 of 14

SIEMENS OPEN LIBRARY


6 PID Configuration
OCTOBER 11, 2016

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 1 of 18

Contents
1. Purpose ........................................................................................................................................................................... 3
2. Intended Use ................................................................................................................................................................. 3
3. Revision History............................................................................................................................................................ 3
4. Open Library License.................................................................................................................................................. 3
5. Hardware and Software Compatibility ................................................................................................................. 4
6. Open Library PID Compact Setup.......................................................................................................................... 5
6.1. Initial Setup ............................................................................................................................................................ 5
6.2. PLC ........................................................................................................................................................................... 5
6.2.1. Creating PID Technology Object ............................................................................................................ 5
6.3. HMI......................................................................................................................................................................... 17

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 2 of 18

1. Purpose
The purpose of this document is to assist with configuration of the PID Open Library Object. In
order to use the features of the built in Technology Object for the PID Compact Block, the library
object requires special setup. The PID Comact Block only exists on the S7-1200 and S7-1500. The
Open Library Object was written to be compatible with PID_Compact V2.2, and capabilities cannot
be guaranteed for other versions of the PID Compact block.

2. Intended Use
This document is to be used by anyone utilizing the Siemens Open Library
fbPID_CompactInterface. This document is used to configure the PLC and HMI objects for the
library, as the configuration of these objects is not standard with the rest of the library.

3. Revision History
Version
1.0
1.1

Date
2016-05-23
2016-06-20

Author
DMC
DMC

1.2
1.3

2016-08-23
2016-10-11

DMC
DMC

Comments
Initial Release
Updated screenshots for PID_Compact and the interface
function block
No Changes
No Changes

4. Open Library License


Copyright (c) 2016 DMC, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 3 of 18

5. Hardware and Software Compatibility


This library was developed in TIA Portal V13 SP1. It was tested on the S7-1200 and S7-1500
platforms, and untested modifications have been made for compatibility with S7-300 and S7-400.
The PLC objects can be used with any HMI, however, the configuration of the faceplates is only
available using a Comfort Panel or WinCC Advanced, and have been tested on a 7 Comfort Panel.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 4 of 18

6. Open Library PID Compact Setup


The following steps walk through the configuration of the PID Open Library Object. In order to use
the features of the built-in Technology Object settings for the PID_Compact Block, the library
object requires special setup.
The benefit of using the Library Interface block are as follows:
1.

It provides a block to call and execute logic for the PID control in the Main Scan, which
limits the logic located in the Cyclic OB.
2. It provides an easy interface for operation and changes to the PID from an HMI faceplate.
3. It utilizes the technology object, so all of the PID functions built in to portal can still be
used.

6.1. Initial Setup


Before starting this document please make sure you have set up your project following the steps in
the Basic Setup document. Each block is dependent on global constants and clock memory bits,
and will not compile without correctly completing the initial setup. The following steps need to be
performed:

Enable system and clock memory bytes on the CPU.


Retrieve the Open Library.
Pull the Open Library PLC tags into the project.
Setup Mode Control, or understand of how Open Library Modes function.

6.2. PLC
This section covers the setup required for the PLC programming. The following steps are required:
1.
2.
3.
4.

Create the PID Technology object


Create a Function Block to call the fbPID_CompactInterface block (this block is typically
called in the main scan)
Create an FB and OB to call the PID_Compact Technology Object
Map the fbPID_CompactInterface to the PID_Compact Technology Object.

6.2.1. Creating PID Technology Object


1.

Start by creating a PID_Compact technology object. Expand the Technology Objects folder
and click Add new object.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 5 of 18

2. In the new object dialog box, give your object a name and select the PID_Compact v2.2
block.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 6 of 18

3. Configure your PID_Compact technology block to fit your physical system.

4. Pull fbPID_CompactInterface from the Open Library Types group into the Library Blocks
group to use it in our project.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 7 of 18

5. In a global data block (dbWaterSystem in this example), add a structure for all of your PID
related variables. The required variables are seen in the screenshot below. This structure
should include you HMI control for the PID system (udtHMI_PIDInterface). It should also
include a structure for interfacing with the PID_Compact block (udtOUT_PIDInterface).

6. Similarly, add the error structure to the errors Data Block, dbErrors_WaterSystem in this
example.

7. Add a multiple instance static memory variable for the fbPID_CompactInterface block in the
fbWaterSystem main block.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 8 of 18

8. Drag an instance of fbPID_CompactInterface into a network in fbWaterSystem.

9. When the Call options dialog appears, choose the static memory multiple instance that you
just created in the block interface.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 9 of 18

10. Fill in the interface for your fbPID_CompactInterface instance. Notice the tag references to
the PID_Compact technology data block as well as the HMI and Errors data block
structures.

11. Add a new Cyclic Interrupt OB that will call our time sensitive cyclic operations.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 10 of 18

12. Give the cyclic interrupt OB a name and set the cycle time to something appropriate for the
application. In this case, temperature does not need a fast cycle so it was set to 100ms
(100,000s).

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 11 of 18

13. Add a new function block that will call our PID_Compact and will be called from the cyclic
interrupt OB. It is recommended best practice to limit logic inside an OB, and the library
object requires instance memory, so we will use the FB to encapsulate our cyclic operation
logic.

14. Name the cyclic function block.

15. Create an instance data block to accompany the cyclic function block.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 12 of 18

16. Name the instance data block and give it the type of your cyclic function block.

17. Inside of the cyclic interrupt OB, drag in an instance of the cyclic FB you created.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 13 of 18

18. Assign the instance data block as a single instance.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 14 of 18

19. Inside of your cyclic FB, drag in an instance of PID_Compact from the Siemens library.
Assign the single instance to the data block of your technology object.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 15 of 18

20. Fill in the interface of the PID_Compact block with the dbWaterSystem variables created
earlier.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 16 of 18

6.3. HMI
This section walks through the required steps to add the HMI pop-ups for the PID Interface Block.
1. Create a new Pop-up screen for the PID Faceplate.
2. Pull the fpPID_CompactInterface_Popup_Graph into the new Pop-up screen.

3. Add a new HMI tag table called PID Controls.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 17 of 18

4. Create the Water Temperature PID tag in the new table and map it to
dbWaterSystem.WaterTemperature.PID_WaterTemperature.

5. Fill in the interface of the popup with the newly created tag as well as static values.

6. Lastly, configure the Trend view with the tags you would like to trend.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 18 of 18

SIEMENS OPEN LIBRARY


7 Library Customization
OCTOBER 11, 2016

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 1 of 14

CONTENTSCONTENTS ................................................................................................................................................... 2
1. PURPOSE......................................................................................................................................................................... 3
2. INTENDED USE ............................................................................................................................................................. 3
3. REVISION HISTORY ..................................................................................................................................................... 3
4. OPEN LIBRARY LICENSE ............................................................................................................................................ 3
5. REASONS FOR CUSTOMIZATION.......................................................................................................................... 4
6. MAINTAINING A NEW LIBRARY ............................................................................................................................. 4
7. MAKING LIBRARY EDITS............................................................................................................................................ 5
7.1. Order of Edits ........................................................................................................................................................ 5
7.2. Creating New Objects ........................................................................................................................................ 5
7.3. Duplicating a Type .............................................................................................................................................. 5
7.4. Editing User Defined Types .............................................................................................................................. 5
7.5. Editing PLC Function Blocks ............................................................................................................................. 7
7.6. Editing Faceplates................................................................................................................................................ 9
8. SPECIAL CONSIDERATIONS WITH S7-300/400 .............................................................................................. 13
8.1. User Defined Types............................................................................................................................................ 13
8.2. HMI User Data Type ......................................................................................................................................... 13
8.3. Function Block Edits .......................................................................................................................................... 13
9. CONTRIBUTING TO THE LIBRARY ....................................................................................................................... 14

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 2 of 14

1. Purpose
The purpose of this document is to provide information regarding the customization of the
Siemens Open Library in order to meet applications outside of the current functionality of the
Siemens Open Library. This document covers how to edit Function Blocks, User Defined Types, and
Faceplates.

2. Intended Use
This document is intended to be used by anyone modifying the Open Library to customize it for
applications outside of the current library functionality. This document should be used after
reviewing the following and resources:
1.
2.
3.
4.
5.
6.
7.

1- Siemens Open Library- Library Overview and Architecture


2- Siemens Open Library- Initial Setup
3- Siemens Open Library- Example Object Configuration
4- Siemens Open Library- Detailed Library Block Description
5- Siemens Open Library- Siemens HMI Alarm Generation
6- Siemens Open Library- PID Block Configuration
Siemens resources for creation and management of Global an Project Libraries

3. Revision History
Version
1.0
1.1
1.2
1.3

Date
2016-05-23
2016-06-20
2016-08-23
2016-10-11

Author
DMC
DMC
DMC
DMC

Comments
Initial Release
No Changes
No Changes
No Changes

4. Open Library License


Copyright (c) 2016 DMC, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 3 of 14

COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

5. Reasons for Customization


This library contains a subset of all the possible features that could be required for the many
different applications in order to ensure that library is easy to configure and use for the majority of
applications. For this reason, it is expected that many people will make modifications to the library
to fit the requirements of their industry and customers. This document is intended to assist with
getting started on customization. Additionally, it is important to understand how to use a global
library to help version changes and propagate them across the organization while eliminating
copying and pasting of commonly used code.

6. Maintaining a New Library


The best method to capture and version changes is to utilize a Global Library. It will provide a
version history and allow for easy distribution to multiple people. Edits can be made to the
Siemens Open Library directly or a new Library can be created. Edits are possible as long as the
library is opened with the read only checkbox deselected.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 4 of 14

7. Making Library Edits


This section will walk through the requirements needed to make edits to the Library. Any object
that is going to be edited needs to be included as part of a project that contains a PLC (for
UDT/Code edits) or an HMI (for Faceplate edits). If making edits with an S7-300 or S7-400, please
see Section 8 for special considerations for the S7-300/400.

7.1. Order of Edits


When making edits to the Library it is best to follow this order guideline to minimize effort required
to make edits.
1.
2.

3.
4.
5.

Add all Global Library Objects to a project so they become part of the Project Library, as
types can only be edited from the Project Library.
Edit the User Defined Type first, if edits are required. Since the library has versions, function
blocks and faceplates will reference a specific version of the User Defined Type, so edits to
Faceplates and Function Blocks will need an updated User Defined Type created first.
Edit the PLC Function Block, and update the type to the latest User Defined Type.
Edit the HMI Faceplate, and update the type to the latest User Defined Type.
Update the Global Library based on edits made in the Project Library.

7.2. Creating New Objects


New User Defined Types and Function Blocks can be created by first creating them on the PLC, and
then dragging/dropping them into the Project Library, and then from the Project Library into the
Global Library.
New Faceplates can be created by clicking Add New Type in the project library, or by selecting a
group of objects on the HMI, right clicking, and selecting Create Faceplate.

7.3. Duplicating a Type


If intending to create a new type based on one of the existing types, then a duplicate type can be
created rather than editing an existing type. This is accomplished by right clicking an object in the
Project Library and selecting Duplicate Type. This is now an entirely separate object and can be
utilized as a starting point to build new Library Objects.

7.4. Editing User Defined Types


This section will discuss making changes to User Defined Types.
1.

Add the User Defined Type into a project containing an S7-1200 or S7-1500, even if edits
are being done for other processors (see special considerations for using the S7-300/400
for more information).
2. Once the User Defined Type is included in the PLC project, it will be added to the Project
Library.
3. To Edit the User Defined Type, right click on the type in the Project Library and select Edit
Type. A pop-up will appear for the test environment. This is the environment that will be
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 5 of 14

used to verify that edits compile. For User Defined Types, verify the environment selected is
an S7-1200 or S7-1500.

4. The editor will open, and allow you to add or remove variables as would be possible in any
User Defined Type. Note that the project library shows a new version that is [in test]. Make
any required edits to the User Defined Type and then select release the version. (If the
yellow banner is not visible, click the exclamation point in the yellow circle).

5. A pop-up will appear where version number can be selected. Additionally, it will have a
check box for Delete unused type versions from the library. If the Function Block and
Faceplate are not part of the Project Library then it will delete the previous version of the
UDT, as it wont be used in the current Project Library, however, if the Function Block and
Faceplate have already been added to the project, then the previous version will remain as
part of the Project Library as it is still used by the other objects in the Library. If any PLC or
Chicago Boston Denver Houston New York
www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 6 of 14

HMI in the project is using the type being edited, the option Update instances in the
project will be available. Check this box to automatically upgrade all type instances in the
project as soon as the new version is released.

6. Add the modified User Defined Type to the Global Library by dragging and dropping it into
the Global Library.

7.5. Editing PLC Function Blocks


This section will discuss making changes to Function Blocks.
1.

Add the Function Block into a project containing a PLC that the object is to be used with
(S7-300, S7-400, S7-1200, and S7-1500 have different compiler requirements).
2. If a modified User Defined Type is being used, delete the User Defined Type in the PLC
Project, and add the updated User Defined Type from the Project Library.
3. To Edit the Function Block, right click on the type in the Project Library and select Edit
Type, or right click on the Function Block in the PLC Project and select Edit Type. A popup will appear for the test environment. This is the environment that will be used to verify
that edits compile.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 7 of 14

4. The editor will open, and allow you to modify code as required. Note that the project
library shows a new version that is [in test]. Make any required edits to the Function Block
and then select release the version. (If the yellow banner is not visible, click the
exclamation point in the yellow circle).

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 8 of 14

5. A pop-up will appear where version number can be selected. Additionally, it will have a
check box for Delete unused type versions from the library, and a checkbox to Update
instances in the project. If the changes made should override any previous instances of this
function block, ensure that both check boxes are checked. If it is intended to keep multiple
versions of the object, then ensure that neither check box is checked.

6. Add the modified Function Block to the Global Library by dragging and dropping it into the
Global Library.

7.6. Editing Faceplates


This section will discuss making changes to Faceplates.
1. Add the Faceplate into a project containing an HMI (Comfort Panel or WinCC Advanced)
2. To edit the Faceplate, right click on the type in the Project Library and select Edit Type, or
right click on the Faceplate in the HMI Project and select Edit Type.
3. The editor will open, and allow you to modify faceplate as required. Note that the project
library shows a new version that is [in test].
4. If a new User Defined Type is being used, select the updated version from the Properties
tab of the faceplate configuration.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 9 of 14

5. For objects utilizing the Siemens Object Library (VFDs, Motors, Solenoid Valve, Analog
Valve, etc.) the appearance of the object can be quickly edited by selecting a different
image under the General portion of the properties for the object. Any changes will need
to utilize Solid or Shaded as the Fill Style in the Appearance portion of the properties for
the color changing to function as intended.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 10 of 14

6. Make any required edits to the Faceplate and then select release the version. (If the yellow
banner is not visible, click the exclamation point in the yellow circle).
7. A pop-up will appear where version number can be selected. Additionally, it will have a
check box for Delete unused type versions from the library, and a checkbox to Update
instances in the project. If the changes made should override any previous instances of this
function block, ensure that both check boxes are check. If it is intended to keep multiple
versions of the object, then ensure that neither check box is checked.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 11 of 14

8. Add the modified Faceplate to the Global Library by dragging and dropping it into the
Global Library.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 12 of 14

8. Special Considerations with S7-300/400


The S7-300 and S7-400 were created before TIA Portal and TIA Portal Libraries were created, and
there are limitations of User Defined Types created in the context of the S7-300 and S7-400
processors. There are also limitations when using these types in combination with a Comfort Panel
or Runtime Advanced HMI. This section will cover how to make edits to the library for S7-300 and
S7-400 processors without causing issues.

8.1. User Defined Types


All User Defined Types edited for the S7-300 or S7-400 should be done in the context of an S71200 or S7-1500. If edits are made to a User Defined Type on an S7-300 or S7-400, then those User
Defined Types cannot be used with Faceplates. If edits to the User Defined Type are made on an
S7-1200 or S7-1500, then that User Defined Type can be used on S7-300, S7-400, and HMI
applications.

8.2. HMI User Data Type


In order for the Library faceplates to function with User Defined Types in an S7-300 or S7-400, the
project library must contain an HMI User Data Type that exactly matches the structure of the PLC
User Defined Type. These are included in the Library, but will need to be modified identically to
match the PLC User Defined Type.

8.3. Function Block Edits


Function Block edits for the S7-300 and S7-400 should be done in the context of the PLC that they
are intended to be used on. All of the processors have different functionality and compilers, and
not all features are available on all devices, therefore edits should be made in the context of the
PLC the code will be used on to verify that any code edits will properly compile.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 13 of 14

9. Contributing to the Library


The Siemens Open Library is an open source library, and contributions, improvements, and
changes are welcome from anyone who has improved or added to the library. Please submit any
custom objects to DMC by emailing them to Contribute@OpenPLCLibrary.com.
Library objects may not be added immediately, but will be added as additional versions of the
library are released.

Chicago Boston Denver Houston New York


www.dmcinfo.com sales@dmcinfo.com 888.DMC.4400

Page 14 of 14

You might also like