DMC Overview
What is the Siemens Open Library?
How It Works & What’s Included
Making Changes/Contributing
Customization
Configuration
Faceplate/UDT Demo
3. Agenda
• DMC Overview
• What is the Siemens Open
Library?
• How It Works & What’s
Included
• Making Changes/Contributing
• Customization
• Configuration
• Faceplate/UDT Demo
• Questions
4. DMC Company Profile
Established in 1996, offices in Chicago, Denver,
Boston, Houston, and New York City
employees & growing
100+
5. Presenter Info
• B.S. in Mechanical Engineering – Notre Dame
• With DMC since 2013
• Siemens Certified Professional
• Lead developer for Siemens Open Library
• Worked in many different industries and countries around the world using a
wide variety of Siemens products
Jeff McCormick
Project Engineer (Chicago)
9. • Developed by DMC over many years
• Collaboration with Siemens to
release it
What is it?
&
10. • Developed by DMC over many years
• Collaboration with Siemens to
release it
• Collection of standard objects to
speed development
What is it?
11. • Developed by DMC over many years
• Collaboration with Siemens to
release it
• Collection of standard objects to
speed development
• Available to anyone under an Open
Source License (Modify, Redistribute,
Sell)
What is it?
27. Motor Control
• G Series VFD Control – fbVFD_GSeries
• Analog VFD Control – fbVFD_Analog
Which Blocks
28. Motor Control
• G Series VFD Control – fbVFD_GSeries
• Analog VFD Control – fbVFD_Analog
• Digital Single Speed Motor –
fbMotor_Reversing
Which Blocks
29. Motor Control
• G Series VFD Control – fbVFD_GSeries
• Analog VFD Control – fbVFD_Analog
• Digital Single Speed Motor –
fbMotor_Reversing
• Simocode Pro V Starter – fbMotor_ProV
(in beta)
• 3RW Starter – fbMotor_3RW (in beta)
Which Blocks
30. Motor Control
• G Series VFD Control – fbVFD_GSeries
• Analog VFD Control – fbVFD_Analog
• Digital Single Speed Motor –
fbMotor_Reversing
• Simocode Pro V Starter – fbMotor_ProV
(in beta)
• 3RW Starter – fbMotor_3RW (in beta)
Valve Control
• Two State Solenoid Valve –
fbValve_Solenoid
Which Blocks
31. Motor Control
• G Series VFD Control – fbVFD_GSeries
• Analog VFD Control – fbVFD_Analog
• Digital Single Speed Motor –
fbMotor_Reversing
• Simocode Pro V Starter – fbMotor_ProV
(in beta)
• 3RW Starter – fbMotor_3RW (in beta)
Valve Control
• Two State Solenoid Valve –
fbValve_Solenoid
• Analog Valve – fbValve_Analog
Which Blocks
34. Which Blocks
Inputs/Outputs
• Analog Input with Scaling and Alarms –
fbIO_AnalogInput
• Analog Output with Scaling –
fbIO_AnalogOutput
System Control
• Interlock Function Block - fbInterlock
35. Which Blocks
Inputs/Outputs
• Analog Input with Scaling and Alarms –
fbIO_AnalogInput
• Analog Output with Scaling –
fbIO_AnalogOutput
System Control
• Interlock Function Block - fbInterlock
• PID Interface – fbPID_CompactInterface
36. Which Blocks
Inputs/Outputs
• Analog Input with Scaling and Alarms –
fbIO_AnalogInput
• Analog Output with Scaling –
fbIO_AnalogOutput
System Control
• Interlock Function Block - fbInterlock
• PID Interface – fbPID_CompactInterface
• Standard Alarm Interface -
fbAlarmWarning
37. Motor Control
• G Series VFD Control – fbVFD_GSeries
• Analog VFD Control – fbVFD_Analog
• Digital Single Speed Motor –
fbMotor_Reversing
• Simocode Pro V Starter – fbMotor_ProV
(in beta)
• 3RW Starter – fbMotor_3RW (in beta)
Valve Control
• Two State Solenoid Valve –
fbValve_Solenoid
• Analog Valve – fbValve_Analog
Which Blocks
Inputs/Outputs
• Analog Input with Scaling and Alarms –
fbIO_AnalogInput
• Analog Output with Scaling –
fbIO_AnalogOutput
System Control
• Interlock Function Block - fbInterlock
• PID Interface – fbPID_CompactInterface
• Standard Alarm Interface –
fbAlarmWarning
38. • Large number of other blocks not part
of the official library
• Community submitted blocks
• Several libraries under review for
addition
Supplementary Blocks
42. • Just do it!
• If you find a bug or develop something you can share
with others, email Contribute@OpenPLCLibrary.com
• Make changes as needed for any project and
contribute as possible
• The goal is to improve the entire community together.
How/when to edit the Open Library
43. • Submit Blocks
• Report bugs
• Inform Siemens Sales if you
are using it
• Write in to suggest edits or
improvements
How can you help?
44. • Sign up to receive update
emails
Stay Connected!
45. • Sign up to receive update
emails
Stay Connected!
• Join the Siemens Open Library
User Group on LinkedIn
46. • Sign up to receive update
emails
Stay Connected!
• Join the Siemens Open Library
User Group on LinkedIn
• Share the Library with your
network if you find it helpful
49. • Built to be configurable for most
applications (designed for 90%)
Why Customize?
50. • Built to be configurable for most
applications (designed for 90%)
• Modify to fit your industry &
requirements
Why Customize?
For a more detailed version of this guide, or if you
run into errors, see the “Customizing Library Objects”
documentation downloaded with the Open Library.
51. • A Global Library are great
• Provides version history and
easy distribution
• Can edit the Open Library
directly or create a new Library
Maintaining a New Library
52. Following this order minimizes effort required for edits.
Order of Edits
1. Edits UDTs first (lowest dependency)
2. Next, FBs and Faceplates
3. Delete old versions
4. Merge back to Global Library
53. User Defined Types & Function Blocks
• First create on the PLC
• Drag/drop into the Project Library
• Drag/drop into the Global Library
Faceplates
• Click ‘Add New Type’ in project library
• Or, select group of objects on the HMI, right click,
and select ‘Create Faceplate’
Creating New Objects
54. To create new types based
on an existing type, right
click an object in the
Project Library and click
‘Duplicate Type’
Duplicating a Type
This is now an entirely separate object and can be
utilized as a starting point to build new Library Objects.
56. Add the UDT into a project containing an S7-1200 or S7-
1500, even if edits are being done for other processors.
This will add it to the Project Library.
Step 1
57. Edit the UDT by right-clicking on the type in the Project
Library and select Edit Type. Verify that S7-1200 or S7-
1500 is the environment.
Step 2
58. The editor will open, and allow you to add or remove
variables as would be possible in any User Defined Type.
Step 3
Make any required edits and then select
‘release the version.’
59. A pop-up will appear where version number can be
selected.
Step 4
60. 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, it will delete the previous version of the
UDT.
Step 4 (continued)
61. If any PLC or 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 when the new version is released.
Step 4 (continued)
62. Add the modified User Defined Type to the Global
Library by dragging and dropping it into the Global
Library.
Step 5
64. 1. Add the Function Block into a project containing a
PLC that the object is to be used
2. If a modified UDT is being used, delete the UDT in the
PLC Project, and add the updated UDT from the
Project Library.
Steps 1 & 2
65. To edit the Function Block, right click on the type in the
Project Library (or the Function Block in the PLC Project)
and select ‘Edit Type.’
Step 3
A pop-up will
appear for the test
environment, which
will be used to
verify that edits
compile.
66. The editor will open and allow you to modify code. Make
any required edits to the Function Block and then select
‘release the version.’
Step 4
67. 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.’
Step 5
68. Check both if changes should override previous instances
of this function block.
Check neither to keep multiple versions of the object.
Add the modified Function Block to the
Global Library by dragging and dropping.
Step 5 (continued)
70. Add the Faceplate into a project containing an HMI
(Comfort Panel or WinCC Advanced)
Step 1
Step 2
To edit the Faceplate, right click on the type in the Project
Library (or on the Faceplate in the HMI Project) and
select ‘Edit Type.’
71. The editor will open. Modify the faceplate as required.
Note that the project library shows a new version that is
‘[in test]’.
Step 3
72. If a new UDT is being
used, select the
updated version from
the ‘Properties’ tab of
the faceplate
configuration.
Step 4
73. For objects utilizing the Siemens Object Library (VFDs,
Motors, Solenoid Valve, etc.), quickly edit the appearance
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.
Step 5
75. A pop-up will appear where version number can be
selected, with checkboxes to ‘Delete unused type
versions from the library,’ and to ‘Update instances in the
project.’
Check both if changes should override previous instances
of this function block.
Check neither to keep multiple versions of the object.
Step 7
76. Add the modified Faceplate to the Global Library by
dragging and dropping it into the Global Library.
Step 8
77. The S7-300 and S7-400 were created before TIA Portal
and TIA Portal Libraries, and there are limitations of UDTs
created in the context of the S7-300 and S7-400
processors.
There are also limitations using these types with a
Comfort Panel or Runtime Advanced HMI.
Using an S7-300/400
If you’re using an S7-300 or S7-400, see Section 8 of
the “Customizing Library Objects” documentation
downloaded with the Open Library.
79. • This demo uses the Solenoid Valve
• The same method is utilized for any other object
block, with special consideration and separate
document for use of the PID Interface block.
Configuration
For a more detailed version of this guide, see the
“Example Object Configuration” documentation
included with the Open Library.
For detailed information for each individual object,
see the “Detailed Block Overview” documentation.
80. Must follow these steps to compile correctly
1. Enable system and clock memory bytes on the
CPU
2. Retrieve the Open Library
3. Pull the Open Library PLC tags into the project
4. Set up Mode Control, or understand how Open
Library Modes function
Initial Setup
For a more detailed guide to setup, see the “Initial
Setup” documentation included with the Open Library
82. • This tutorial uses
fbValve_Solenoid
• Create example groups and
blocks in the controller’s
Program Blocks similar to the
setup on the right
Step 1
83. Drag and drop to copy the desired Function Block from
the Open Library Types group of the library into the
Library Blocks group.
Step 2
84. Several 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.
85. The library blocks are added to the
Project library
You can modify library blocks or
create new versions here if needed
Step 3
86. Reorganize Program blocks to
make navigation easier.
This is based on personal
preference/company standards
and does not affect performance.
Step 4
88. This section outlines creation of:
• An HMI Data Block to contain the User Defined Types
that map to the Faceplates
• An Error Data block to contain the User Defined Types
that contain alarms
Blocks can be named or organized in whatever way is
best for the individual project.
89. Create global Data Blocks for housing of the UDTs 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.
Step 1
90. The Error Data block needs to be non-optimized to
utilize the Excel Macro to automatically generate alarms.
• Right click on the data block, select ‘Properties’ and
verify the ‘Optimized block access’ is not checked
under the ‘Attribute’ tab
Step 2
For additional details, see the
“Siemens HMI Alarm
Generation” documentation
included with the Open Library
91. Repeat step 2 for the HMI data block if using an S7-300
or S7-400.
Step 3
92. In the Data Block that will contain the HMI interface
(dbWaterSystem here), add the HMI control structure by
naming it and assigning the proper Data type.
Step 4
In this example, the UDT is
named SOL_MainWater, but any
name can be used.
93. The UDT 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.
Step 5
94. Add the error structure to error data block. In this
example it is added to dbErrors_WaterSystem.
Step 6
95. The Error Data Block needs to be non-optimized – set
this via the Data Block Properties by right clicking on the
data block.
Step 6 (continued)
97. 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.
Step 1
98. 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’.
Step 2
99. Drag and drop the Object from the project tree Program
blocks into the ladder logic where it will be used.
Step 3
100. Choose to use this block as a multiple instance call and
select the instance created in the static memory of
fbWaterSystem.
Step 4
Alternatively, provide a name
for the instance memory and
TIA Portal will automatically
add it to the static variables
section of the block.
101. Assign tags to the inputs and outputs of the object.
Step 5
Detailed information for the
meanings of each input and
output can be found in the
‘Detailed Block Overview’
documentation.
103. 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.
104. 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.
Special considerations for S7-300/400
The instructions can still be
followed, however, the
separate faceplates need to
used where applicable.
106. This section covers how to use the Pop-up faceplates on
a pop-up screen. Each object will have a separate pop-
up screen.
Step 1
Click the ‘Add new pop-up screen’
button in the Pop-up screens section.
Give a name that identifies the specific
object.
107. Drag the Pop-up Faceplate, fpValve_Solenoid_Popup in
this example, from the library onto the new Pop-up
screen.
Step 2
108. • The faceplate can be resized to best fit the size of the HMI
that is being used
• 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 border around the Pop-up.
Step 2 - Considerations
109. 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.
Step 3
110. Alternatively, the tag can be automatically created by
dragging and dropping the UDT directly from the PLC
into the HMI Interface.
Step 3 (continued)
111. 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.
Step 4
112. Configure the
HMI_ValveControl using the
HMI tag created in step 3, or
by dragging and dropping
the tag from the PLC.
Configure any strings
required by typing the fixed
text into the interface.
Step 4 (continued)
113. You will notice on the faceplate that there
is a greyed-out area at the bottom of the
faceplate.
This is for the addition of an exit button
to the popup screen.
Step 5
114. Add this button by retrieving it from the Open Library
under ‘Master Copies’. It will be named ‘Exit Button’. Drag
and drop it onto the faceplate.
Step 5 (continued)
115. Add exit functionality using the ShowPopupScreen
function.
Click the Exit button, then navigate to the button
properties tab (or Alt+Enter).
In the Properties sub-tab click over to the Events tab.
Step 6
116. There should already be a
ShowPopupScreen Function
added to the function list.
Add the name of the screen
that you wish to exit, in this
case it is ‘Solenoid Valve’.
Step 6 (continued)
Now the button is set up to turn the popup
screen off when pressed.
118. The library contains several predefined HMI Icons.
Many more can be created, or existing icons can be
modified using the Symbol Object Library.
Details regarding the functionality, colors, and interface
to each HMI Icon can be found in the documentation for
that object.
119. Navigate to the correct HMI Icon Faceplate in the Open
Library. In this case, it’s fpValve_Solenoid_Horizontal
Step 1
120. 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.
Step 2
121. 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.
Step 3
122. Create an event that will open the Pop-up window in
runtime when the valve on the HMI screen is clicked.
Step 4
126. Create your UDT on the PLC. This should include all of
the items you will need on the HMI.
Step 1
127. Add the UDT to the project Library Types by dragging
and dropping it from your project to the Project Library.
Step 2
128. Add a new function block, and add the UDT to the
IN/OUT section of the device (plus any other inputs or
outputs).
Step 3
129. Write your PLC Logic.
Network 1: Comment Rung
Network 2: Using fcHMIBit as provided by the Siemens Open Library to read an
HMI bit (maintains commonality)
Network 3: Using the FB input to control the Push Button Enable on the faceplate
Step 4
130. Network 4: Comment Rung
Network 5: Logic for resetting the time
Network 6: Timer used to elapse 1/10th of an hour (6 min)
131. Network 7: Adding time to elapsed time every time the timer elapses
Network 8: Resetting time and last reset time
132. Network 9: Comment Rung
Network 10: Populating the Function Block Outputs
133. Add your Function Block into your library by dragging and
dropping it.
Step 5
135. Create the look and feel of the faceplate on the HMI.
There is no reason to map any tags yet - just get everything laid out.
Step 7
136. Highlight all of the objects, right click, and select "Create
Faceplate." Give it a name (we are calling this one
fp_PumpRunHours).
Step 8
137. Add the User Defined Type to the Faceplate Properties.
a) Go to the properties tab of the faceplate
configuration, right click on ‘Properties_Faceplate’,
and select ‘Add new property’.
Step 9
138. b) Right click on the property and select ‘rename’. Title it
something appropriate (HMI_PumpRunHours in this
example).
Step 9 (continued)
139. c) Click the dropdown menu on Type and select the UDT
(even though the dropdown looks disabled, if you click it,
it should give you all the options).
Step 9 (continued)
140. d) Open the properties for the faceplate individual
controls by right clicking on the HMI item and selecting
‘Properties.’
Step 9 (continued)
141. e) Use tags from the UDT by selecting the ellipses
whenever there is a tag variable, then selecting the
variable that is needed from Properties.
Step 9 (continued)
142. f) If you successfully mapped it, you should see an arrow
drawn in the Faceplate Properties Window.
Step 9 (continued)
143. g) Do this for all tags (in this example we have the PB
Control Enable, PB release event, Run Hours, and Last
Reset Time).
Step 9 (continued)
144. h) To dynamically assign the name shown (to change
‘Pump Run Hours’), drag and drop the ‘Text’.
Step 9 (continued)
145. Once you have finished mapping everything select
‘release the version.’ (You can always make more changes
later).
Step 10
146. Select the checkboxes to ‘Update instances in the project’
and ‘Delete unused type versions from the library.’
Step 10
147. Go back to your HMI by clicking the arrow above
"Visualization" or "Library view."
Step 11
148. Map the UDT to the HMI, by selecting HMI_Tag in the
Interface tag.
Step 12
149. Now you can call this function block and map all of the
items on the faceplate with only that single UDT.
As objects get larger and more complicated, the amount
of time saved by this can be greatly increased.
Step 13
150. Summary
• Portal Libraries are great
• Siemens Open Library is
• Free
• Helpful
• Editable
• Improved by you!
• Get it here:
OpenPLCLibrary.com