DigiKey-emag-PLCs-Vol-5

Programming PLCs: A technical summary with Siemens examples

for distributed controls and machines needing IIoT connectivity rely on Siemens SIMATIC IPC software modules, including an IPC Image and Partition Creator; IPC DiagMonitor; IPC Remote Manager; IPC FirmwareManager; and the SIMATIC Industrial OS

■ The level of motion control required (where applicable) — from simple speed and position control to electronic camming and advanced kinematic controls ■ The hardware preference and whether a software PLC program running on an IPC might be most suitable PLC program projects ■ PLC programming written in PLC supplier software is often contained in projects. These are associated with focused application-specific operations such as: ■ Heating, mixing, filling, metering, and irrigating ■ Moving, steering, cycling, positioning, and braking ■ Gripping, cutting, punching, and slicing ■ Welding, gluing, marking, and dispensing ■ Sensing, tracking, sequencing, and indicating

forcing. This ‘tricks’ the PLC into operating as if certain feedback is at some value when it isn’t — a tactic employed when the stations downstream of a malfunctioning actuator must be cleared, for example. Other times, a machine or workcell might require in-field adjustment of an installed PLC’s parameters via modifying. Such adjustments must reference suitable triggers, variable values or tables, counters, and timers.

Simulation tools within PLC supplier software environments also can speed time to market for a given product — and boost throughput of finished product. Completing the suite of software- based improvements are energy- management functions and diagnostics. Verifying and loading PLCs with programs written in software Core to optimal PLC functionality is the quality of its programming. All code should satisfy software- development industry standards and best practices. Beyond that, verification processes (both manual and automated) can reveal everything from critical errors to code inefficiencies. Reconsider the programming of SIMATIC S7 products. Within the Siemens ecosystem, a TIA Portal Project Check application can automatically compare certain code against rules defined by a programming style guide for these specific PLCs. Then engineers can export comparison results to an XML or Excel file. User-defined rule sets (even complex types) can also be added via a Project Check software development kit (or SDK) in C# or Visual Basic (.NET). This SDK primarily proofs a program’s style. After a project destined for a PLC is fully written and verified, it must

Figure 2: Siemens SIMATIC PLC and automation systems were first introduced in the 1950s. Today, SIMATIC S7 products (including the SIMATIC S7-1500 PLC components shown here) have evolved to support various industrial automation applications. Image source: Siemens

4. 4. HMIs serving as panel

PCs for on-machine controls employ SIMATIC WinCC Unified (TIA Portal) software as well as SIMATIC WinCC (TIA Portal), WinCC flexible,

Conclusion

be loaded onto that PLC. In many cases, a PC (often a laptop) is temporarily connected to the PLC via an Ethernet cable or a specialty PC USB to PLC COMM adapter — to load that programming onto PLC microelectronics. The PLC then connects to controlled components via I/O modules. After additional verification upon startup, the PLC executes its programs by commanding networked actuators

(via various signal types) and making real-time adjustments in response to returned feedback from field devices. Occasionally, a machine or automated workcell will require adjustment, troubleshooting, or repair — and (through some type of programming PC connection to the PLC) the overriding of PLC default responses to feedback with

Working with the vast array of Siemens automation and industrial- controls offerings can provide design engineers with a deeper understanding of today’s control options — including PLCs and other hardware types. That’s true no matter the brand or hardware subtype ultimately chosen for an automated installation.

WinCC V7, WinCC OA, ProAgent process diagnostics software, notification software for mobile devices, and more Choosing between SIMATIC PLCs and other machine controls is simplified with still more software — in the form of an online Cloud-based Selection Tool (or the offline variation ) that asks engineers about a given design’s physical arrangement (whether necessitating a control cabinet or distributed control) and: ■ The number of anticipated I/Os including sensors, switches, and actuators ■ The programming language to be used, whether ladder diagram (LD), structured control language (SCL), or Function Block Diagram (FBD); more advanced structured text (ST), graph-based sequential function chart (SFC), and continuous function chart (CFC); or more advanced languages

Programming Aspect

Goal

Quality

Realization • Tool

The most advanced options support digital planning and

Style

Comprehensibility

Empirical

Code review • Style check

integrated engineering as well as transparent operation that’s easily accessible through HMIs with user- specific screens one in operation. In other words, such PLC software can allow for the presentation of pertinent PLC information on different displays to serve the divergent informational needs of machine operators, technicians, plant managers, or even business managers.

Technique

Conformity

Pragmatic

Static code analysis • Lint

Dynamic code analysis • Profiling

Technique

Efficiency

Pragmatic

Function test • Unit/ integration test

Test cases

Functionality

Syntactic

Formal verification • Model check

Mathematical model

Correctness • completeness Semantic

Table 1: Verification of PLC programming can leverage manual and automated approaches — with the latter especially useful for verifying style and technique. Chart source: Siemens

we get technical

12

13

Powered by