Post on 03-Jun-2018
8/12/2019 10 Trikova Shortcuts
1/56
Navigating the wor ld of automation
2011 Automation SummitOrlando, FL
Navigating the world of automation
8/12/2019 10 Trikova Shortcuts
2/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Page 2
2011 Automation Summit
Title: Top Ten S7 Tips and Tricks
Track: NAPR
Topic: S7 PLCs
Presenter: Nick Shea
Company: DMC
8/12/2019 10 Trikova Shortcuts
3/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Page 3
DMC Company Profi le
Established in 1996, based in Chicago, IL Service Companies Nationally & Globally
Siemens Solution Partner
Global Reach: CanadaChinaGeorgiaCzech Rep.RussiaPhilippinesMexicoIndia
8/12/2019 10 Trikova Shortcuts
4/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Page 4
Bio
Nick Shea
Senior Project Engineer at DMC
Engineering Physics
(University of Kansas)
With DMC since 2006
8/12/2019 10 Trikova Shortcuts
5/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Top Ten S7 Tips and Tricks
You already know the fundamentals of S7 PLC
programming
And the mistakes to avoid (thanks, Tim)
Now, how do you develop, commission and
troubleshoot most efficiently?
Page 5
8/12/2019 10 Trikova Shortcuts
6/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Page 6
Top Ten S7 Tips and Tricks
If you are an
External Developer:
How do you work most efficiently to provide the highest
value for your customer while increasing project profitability?
8/12/2019 10 Trikova Shortcuts
7/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Page 7
Top Ten S7 Tips and Tricks
If you are an
Internal Programmer:
How do you reduce start-up time for new equipment and
decrease production downtime while making modifications
or troubleshooting controls problems?
8/12/2019 10 Trikova Shortcuts
8/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Page 8
Top Ten S7 Tips and Tricks
Now take your development to the next Level!
8/12/2019 10 Trikova Shortcuts
9/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Page 9
Top Ten S7 Tips and Tricks
Tips and Tricks for:
1. Rapid Diagnostics / Troubleshooting
2. Rapid Development
3. Advanced Tools
8/12/2019 10 Trikova Shortcuts
10/56
Navigating the wor ld of automation
Modular, Object-OrientedArchitecture with FBs and UDTs
#1
8/12/2019 10 Trikova Shortcuts
11/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBs
and UDTs
Best Practices for Controls Design Generally Accepted
Consistent Design and Documentation
Mechanical Design
Electrical Schematics
P&IDs
Software
8/12/2019 10 Trikova Shortcuts
12/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBs
and UDTs
Best Practices for Controls Design also includes:
PLC and HMI Projects
Naming conventions
Hardware architecture
Modular Software Architecture
Function Blocks
UDTs
8/12/2019 10 Trikova Shortcuts
13/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBs
and UDTs
Line 1
Mixer 1
AgitatorVFD
DischargeValve
Mixer 2
AgitatorVFD
DischargeValve
Mixer 3
AgitatorVFD
DischargeValve
Ventilation
Damper
BlowerMotor
Conveying
PumpMotor
DistributionValve
System Architecture
8/12/2019 10 Trikova Shortcuts
14/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBs
and UDTs
fbMaster
fbMixer_1
fbVFD
fbValve
fbMixer_2
fbVFD
fbValve
fbMixer_3
fbVFD
fbValve
fbVentilation
fbDamper
fbMotor
fbConveying
fbMotor
fbValve
Program Architecture
(similar to system architecture!)
8/12/2019 10 Trikova Shortcuts
15/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBs
and UDTs
Example of High-Level Function Block:
fbMixer_1
fbVFD fbValve
8/12/2019 10 Trikova Shortcuts
16/56
8/12/2019 10 Trikova Shortcuts
17/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBs
and UDTs
Variables encapsulated by udtHMI_VFD_Control
8/12/2019 10 Trikova Shortcuts
18/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBs
and UDTs
Variables encapsulated by udtErrors_VFD
8/12/2019 10 Trikova Shortcuts
19/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBs
and UDTs
Page 19
Motor Command
Function Block
Start
Stop
Speed SP
Engage Brake
Reset Error
Acceleration
Motor I/O
Function Block
Start
Stop
Speed SP
Engage Brake
Reset Error
Acceleration
Outputs Inputs
One variable is used
to pass multiple
pieces of information
Start
Stop
Speed SP
Engage Brake
Reset Error
Acceleration
Motor Command
Function BlockCommand
Motor I/O
Function
Block
Command
8/12/2019 10 Trikova Shortcuts
20/56
Navigating the wor ld of automation
Monitoring Instances of FunctionBlocks
#2
8/12/2019 10 Trikova Shortcuts
21/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Monitoring Instances of Function Blocks
There are two PLC modes and they are toggled in the CPU Properties on the
Protection tab: Process Mode and Test Mode.
Page 21
Default is Process mode.
Switch to Test Mode.
Download the hardware configuration.
8/12/2019 10 Trikova Shortcuts
22/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Monitoring Instances of Function Blocks
This option is also shown in the Debug -> Operation dropdown menu from the
Ladder Editor
Page 22
8/12/2019 10 Trikova Shortcuts
23/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Monitoring Instances of Function Blocks
Right-click on the block and select Monitor with Call-Up Path
Process Mode Test Mode
Page 23
8/12/2019 10 Trikova Shortcuts
24/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Monitoring Instances of Function Blocks
Note!
As you probably expect, this does slow down the CPU cycle time so this should
only be used when necessary and always leave the final system with Process
Mode checked.
Page 24
8/12/2019 10 Trikova Shortcuts
25/56
Navigating the wor ld of automation
Report System Error
#3
8/12/2019 10 Trikova Shortcuts
26/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Report System Error
Siemens Support Website
FAQ: How can you report S7 system errors in WinCC?
FAQ: How can you have system error messages from a SIMATIC S7-300 / 400
displayed in WinCC flexible?
Page 26
https://support.automation.siemens.com/WW/llisapi.dll/22727527?func=ll&objId=24796673&objAction=csView&nodeid0=10805587&lang=en&siteid=cseus&aktprim=0&extranet=standard&viewreg=WW&load=treecontenthttps://support.automation.siemens.com/WW/adsearch/resultset.aspx?region=WW&lang=en&netmode=internet&ui=NDAwMDAxNwAA&term=How+can+you+have+system+error+messages+from+a+SIMATIC+S7-300+%2f+400+displayed+in+WinCC+flexible%3f&ID=22319131&ehbid=22319131https://support.automation.siemens.com/WW/adsearch/resultset.aspx?region=WW&lang=en&netmode=internet&ui=NDAwMDAxNwAA&term=How+can+you+have+system+error+messages+from+a+SIMATIC+S7-300+%2f+400+displayed+in+WinCC+flexible%3f&ID=22319131&ehbid=22319131https://support.automation.siemens.com/WW/adsearch/resultset.aspx?region=WW&lang=en&netmode=internet&ui=NDAwMDAxNwAA&term=How+can+you+have+system+error+messages+from+a+SIMATIC+S7-300+%2f+400+displayed+in+WinCC+flexible%3f&ID=22319131&ehbid=22319131https://support.automation.siemens.com/WW/adsearch/resultset.aspx?region=WW&lang=en&netmode=internet&ui=NDAwMDAxNwAA&term=How+can+you+have+system+error+messages+from+a+SIMATIC+S7-300+%2f+400+displayed+in+WinCC+flexible%3f&ID=22319131&ehbid=22319131https://support.automation.siemens.com/WW/adsearch/resultset.aspx?region=WW&lang=en&netmode=internet&ui=NDAwMDAxNwAA&term=How+can+you+have+system+error+messages+from+a+SIMATIC+S7-300+%2f+400+displayed+in+WinCC+flexible%3f&ID=22319131&ehbid=22319131https://support.automation.siemens.com/WW/adsearch/resultset.aspx?region=WW&lang=en&netmode=internet&ui=NDAwMDAxNwAA&term=How+can+you+have+system+error+messages+from+a+SIMATIC+S7-300+%2f+400+displayed+in+WinCC+flexible%3f&ID=22319131&ehbid=22319131https://support.automation.siemens.com/WW/llisapi.dll/22727527?func=ll&objId=24796673&objAction=csView&nodeid0=10805587&lang=en&siteid=cseus&aktprim=0&extranet=standard&viewreg=WW&load=treecontenthttps://support.automation.siemens.com/WW/llisapi.dll/22727527?func=ll&objId=24796673&objAction=csView&nodeid0=10805587&lang=en&siteid=cseus&aktprim=0&extranet=standard&viewreg=WW&load=treecontenthttps://support.automation.siemens.com/WW/llisapi.dll/22727527?func=ll&objId=24796673&objAction=csView&nodeid0=10805587&lang=en&siteid=cseus&aktprim=0&extranet=standard&viewreg=WW&load=treecontent8/12/2019 10 Trikova Shortcuts
27/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Report System Error
End Result:
No (0) programming required!
Page 27
8/12/2019 10 Trikova Shortcuts
28/56
8/12/2019 10 Trikova Shortcuts
29/56
Navigating the wor ld of automation
RAM Disk
#4
8/12/2019 10 Trikova Shortcuts
30/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
RAM Disk
When compiling an S7 project, many small files are read and written.
RAM Disk is RAM that is used as a disk drive via 3rd party software.
RAM Disk is orders of magnitude faster than other forms of storage media.
Weve reduced >10 min compile times to
8/12/2019 10 Trikova Shortcuts
31/56
Navigating the wor ld of automation
Auto-Generate Symbol Table
#5
8/12/2019 10 Trikova Shortcuts
32/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Auto-Generate Symbol Table
Page 32
The S7 PLC symbol table allows copy/paste directly from a spreadsheet such as
MS Excel.
If possible, develop your IO list in a compatible format
Alternatively, build a tool to convert it to a compatible format
For example, thousands of IO can be added into the symbol list in a fewminutes.
8/12/2019 10 Trikova Shortcuts
33/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Auto-Generate Symbol Table
Page 33
8/12/2019 10 Trikova Shortcuts
34/56
Navigating the wor ld of automation
Using Local Memory to ParseData
#6
8/12/2019 10 Trikova Shortcuts
35/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Using Local Memory to Parse Data
Split data types into smaller pieces without using ST or SCL.
1. Assign a variable to TEMP memory.
2. Move data into the TEMP memory variable.
Page 35
8/12/2019 10 Trikova Shortcuts
36/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Using Local Memory to Parse Data
Split data types into smaller pieces without using ST or SCL.
3. Access the TEMP or Local memory using the L prefix.
Page 36
8/12/2019 10 Trikova Shortcuts
37/56
Navigating the wor ld of automation
Network Node Activating,Deactivating, and Monitoring
#7
8/12/2019 10 Trikova Shortcuts
38/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Network Node Activating, Deactivating, and
Monitoring
Dynamically activate and Deactivate
Profibus and Profinet Nodes
Using D_ACT_DP SFC12
Examples: Modular Machines
Alternate Machine Configurations
Page 38
8/12/2019 10 Trikova Shortcuts
39/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Network Node Activating, Deactivating, and
Monitoring
Monitoring Ethernet Nodes using RDSYSST SFC51
Page 39
8/12/2019 10 Trikova Shortcuts
40/56
Navigating the wor ld of automation
Safety Programming
#8
8/12/2019 10 Trikova Shortcuts
41/56
8/12/2019 10 Trikova Shortcuts
42/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Safety Programming
Safety program can be really simple or really complicated depending on theapplication.
Example of implementing simple E-Stop safety functionality:
Page 42
8/12/2019 10 Trikova Shortcuts
43/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Safety Programming
Always ON and OFF variables available inside F_GLOBDB datablock.
Page 43
8/12/2019 10 Trikova Shortcuts
44/56
Navigating the wor ld of automation
Backup DB Data by GeneratingSource
#9
8/12/2019 10 Trikova Shortcuts
45/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Backup DB Data by Generating Source
A simple yet common problem when programming a Siemens Simatic S7-300PLC is losing the data already stored in the PLC after downloading an updated
data block.
Page 45
8/12/2019 10 Trikova Shortcuts
46/56
8/12/2019 10 Trikova Shortcuts
47/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Backup DB Data by Generating Source
A more complicated change to the data block such as adding items to a udtused with the data block requires extra steps. Even if you have first saved a copy
of your online values prior to making the change, the values will be lost after you
save the change. Therefore, follow these extra steps.
1. Follow steps 1 and 2 above.2. Open the datablock and Generate Source for the data block.
File -> Generate Source. This will save a version of your data block;
and the values in a file in the Sources folder.
Page 47
8/12/2019 10 Trikova Shortcuts
48/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Backup DB Data by Generating Source
3. Make all changes that you need to the data block (not source code)
then Save and Close the data block.
4. Open the Source file you created and compile it. This will set all values in the
data block equal to the values you see in the Source file.
5. Download - your values have been retained.
Page 48
8/12/2019 10 Trikova Shortcuts
49/56
8/12/2019 10 Trikova Shortcuts
50/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Keyboard Shortcuts
Navigating / Searching
Cross Reference: Ctrl-Alt-Q
Find: Ctrl-F
Find Variables within a FC or FB: Ctrl-Shift-F (search forward)or
Ctrl-Shift-B (search backward)
Jump to Network: Ctrl-E
Reference Data Interface: Ctrl-R
Open an FC or FB: Ctrl-Alt-O
Page 50
8/12/2019 10 Trikova Shortcuts
51/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Keyboard Shortcuts
Development Shortcuts
New Empty Rung / Network: Ctrl-R
Normally open contact: F2Normally closed contact: F3
Coil: F7
Empty Box: Alt-F9
Page 51
8/12/2019 10 Trikova Shortcuts
52/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Keyboard Shortcuts
Monitoring / Diagnostics / Other Shortcuts
Monitor: Ctrl-F7
Module Information: Ctrl-D
Page 52
8/12/2019 10 Trikova Shortcuts
53/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.
Keyboard Shortcuts
Monitoring / Diagnostics / Other Shortcuts
Operating Mode: Ctrl-I
Download: Ctrl-L
Page 53
8/12/2019 10 Trikova Shortcuts
54/56
Navigating the wor ld of automation
Summary
8/12/2019 10 Trikova Shortcuts
55/56
Navigating the world of automation
Copyright Siemens Industry, Inc. 2011. All rights reserved.Page 55
Summary Top Ten S7 Tips and Tricks
1. Modular, Object-Oriented Architecture with FBs and UDTs
2. Monitoring Instances of Function Blocks
3. Report System Error
4. RAM Disk
5. Auto-Generate Symbol Table
6. Network Node Activating, Deactivating, and Monitoring
7. Safety Programming Basics
8. Using Local Memory to Parse Data
9. Backup DB Data by Generating Source
10. Keyboard Shortcuts
8/12/2019 10 Trikova Shortcuts
56/56
Navigating the world of automation
Thank You
Nick Shea
nick.shea@dmcinfo.com
www.dmcinfo.com
http://www.dmcinfo.com/http://www.dmcinfo.com/