InfoPLC Top Ten S7 Tips and Tricks
-
Upload
kevin-pelaez-cardenas -
Category
Documents
-
view
234 -
download
0
Transcript of InfoPLC Top Ten S7 Tips and Tricks
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
1/56
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
2/56
Navigating the world of automationCopyright © 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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
3/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Page 3
DMC Company Profile
Established in 1996, based in Chicago, IL Service Companies Nationally & Globally Siemens Solution Partner
Global Reach: CanadaChinaGeorgiaCzech Rep.RussiaPhilippinesMexicoIndia
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
4/56
Navigating the world of automationCopyright © 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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
5/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Top Ten S7 Tips and Tricks
You already know the fundamentals of S7 PLCprogramming…
And the mistakes to avoid (thanks, Tim)
Now, how do you develop, commission and
troubleshoot most efficiently?
Page 5
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
6/56
Navigating the world of automationCopyright © 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 highestvalue for your customer while increasing project profitability?
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
7/56
Navigating the world of automationCopyright © 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 anddecrease production downtime while making modificationsor troubleshooting controls problems?
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
8/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Page 8
Top Ten S7 Tips and Tricks
Now… take your development to the next Level!
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
9/56
Navigating the world of automationCopyright © 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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
10/56
Navigating the world of automation
Modular, Object-OrientedArchitecture with FBs and UDTs
#1
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
11/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBsand UDTs
Best Practices for Controls Design – Generally Accepted
• Consistent Design and Documentation• Mechanical Design• Electrical Schematics• P&IDs• Software
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
12/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBsand UDTs
Best Practices for Controls Design… also includes:
• PLC and HMI Projects• Naming conventions• Hardware architecture
• Modular Software Architecture• Function Blocks• UDTs
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
13/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBsand UDTs
Line 1
Mixer 1
AgitatorVFD
DischargeValve
Mixer 2
AgitatorVFD
DischargeValve
Mixer 3
AgitatorVFD
DischargeValve
Ventilation
Damper
BlowerMotor
Conveying
PumpMotor
DistributionValve
System Architecture
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
14/56
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
15/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBsand UDTs
Example of High-Level Function Block:fbMixer_1
fbVFD fbValve
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
16/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBsand UDTs
Example of Device Level Function Block utilizing UDTs:
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
17/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBsand UDTs
Variables encapsulated by udtHMI_VFD_Control
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
18/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBsand UDTs
Variables encapsulated by udtErrors_VFD
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
19/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Modular, Object-Oriented Architecture with FBsand UDTs
Page 19
Motor CommandFunction Block
Start
Stop
Speed SP
Engage Brake
Reset Error
Acceleration
Motor I/OFunction Block
Start
Stop
Speed SP
Engage Brake
Reset Error
Acceleration
Outputs Inputs
One variable is usedto pass multiple
pieces of information
StartStopSpeed SPEngage BrakeReset Error
Acceleration
Motor CommandFunction Block
CommandMotor I/OFunction
Block
Command
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
20/56
Navigating the world of automation
Monitoring Instances of FunctionBlocks
#2
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
21/56
Navigating the world of automationCopyright © 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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
22/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Monitoring Instances of Function Blocks
This option is also shown in the Debug -> Operation dropdown menu from theLadder Editor
Page 22
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
23/56
Navigating the world of automationCopyright © 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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
24/56
Navigating the world of automationCopyright © 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 shouldonly be used when necessary and always leave the final system with “ProcessMode” checked.
Page 24
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
25/56
Navigating the world of automation
Report System Error
#3
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
26/56
Navigating the world of automationCopyright © 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/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/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=treecontent
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
27/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Report System Error
End Result:
No (0) programming required!
Page 27
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
28/56
Navigating the world of automationCopyright © Siemens Industry, Inc. 2011. All rights reserved.
Report System Error
10 easy steps: (website has screenshots and full instructions)
1. Create S7 and HMI stations .2. Add languages . Set “English” as default
3. Open the "Report System Error..." dialog in hardware configuration.4. Activate the entries . Choose the OB blocks that will generate messages5. Transfer blocks to the CPU. Download the generated blocks to the CPU. 6. Add a connection to the CPU from the WinCC flexible project (if needed)7. Configure alarm settings. Activate Simatic SFM in the alarm procedure.
8. Configure alarm viewer to include “S7 Alarms” 9. Activate the check boxes in CPU Messages from Simatic Manager10.Start WinCC flexible and enjoy your diagnostic messages!
Page 28
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
29/56
Navigating the world of automation
RAM Disk
#4
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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 3 rd party software.• RAM Disk is orders of magnitude faster than other forms of storage media.• We’ve reduced >10 min compile times to
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
31/56
Navigating the world of automation
Auto-Generate Symbol Table
#5
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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 asMS 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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
33/56
Navigating the world of automation
Copyright © Siemens Industry, Inc. 2011. All rights reserved.
Auto-Generate Symbol Table
Page 33
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
34/56
Navigating the world of automation
Using Local Memory to ParseData
#6
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
37/56
Navigating the world of automation
Network Node Activating,Deactivating, and Monitoring
#7
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
38/56
Navigating the world of automation
Copyright © Siemens Industry, Inc. 2011. All rights reserved.
Network Node Activating, Deactivating, andMonitoring
Dynamically activate and DeactivateProfibus and Profinet Nodes
Using “D_ACT_DP” SFC12
Examples:• Modular Machines• Alternate Machine Configurations
Page 38
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
39/56
Navigating the world of automation
Copyright © Siemens Industry, Inc. 2011. All rights reserved.
Network Node Activating, Deactivating, andMonitoring
Monitoring Ethernet Nodes using “RDSYSST” SFC51
Page 39
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
40/56
Navigating the world of automation
Safety Programming
#8
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
41/56
Navigating the world of automation
Copyright © Siemens Industry, Inc. 2011. All rights reserved.
Safety Programming
• Leverage Siemens safety blocks
Page 41
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
44/56
Navigating the world of automation
Backup DB Data by GeneratingSource
#9
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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 updateddata block.
Page 45
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
46/56
Navigating the world of automation
Copyright © Siemens Industry, Inc. 2011. All rights reserved.
Backup DB Data by Generating Source
In the normal case:
If you are simply adding items to the end of a flat data block (not adding items toa user-defined type (udt) within the data block, for example) then to retain thevalues of the data block follow these quick steps.
1. Go online with all of the blocks in Simatic Manager.2. Copy the online version of the data block whose values you would like to
retain into your offline project.3. Add the items to end of the data block.4. Download - your values will be retained.
Page 46
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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 copyof your online values prior to making the change, the values will be lost after yousave 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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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 thedata block equal to the values you see in the Source file.
5. Download - your values have been retained.
Page 48
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
49/56
Navigating the world of automation
Keyboard Shortcuts
#10
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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: F3Coil: F7
Empty Box: Alt-F9
Page 51
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
54/56
Navigating the world of automation
Summary
-
8/9/2019 InfoPLC Top Ten S7 Tips and Tricks
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/9/2019 InfoPLC Top Ten S7 Tips and Tricks
56/56
Navigating the world of automation
Thank You
Nick Shea
www.dmcinfo.com
http://www.dmcinfo.com/http://www.dmcinfo.com/