Toolbox overflows for control programmers

Software programming no longer entails sitting before a blank screen and either entering contacts and coils or typing arcane commands and keywords that become long strings of spaghetti in ladder or text. Today's tools aid program organization and provide powerful command sets that make complex control easier and faster to accomplish.

09/01/2001


KEY WORDS

 

  • Machine control

  • Embedded control

  • Programming

  • IEC 61131

  • Software for control

Software programming no longer entails sitting before a blank screen and either entering contacts and coils or typing arcane commands and keywords that become long strings of spaghetti in ladder or text. Today's tools aid program organization and provide powerful command sets that make complex control easier and faster to accomplish. Many program editors now emulate Microsoft's Visual Studio format with multiple windows and toolbars, pull-down menus, and visible 'tree' structure for the project.

(See also, 'Find the Right Engineering Tools in this issue.)

How many programmers in machine control still sit down at a blank screen after the mechanical design is done with a list of input and output devices and a brief functional description and begin writing logic? Probably too many.

A programmer must be involved in the process or machine from the beginning of the project. Thinking at this stage must be from the 'top down,' that is, one must first understand what the overall objective of the process or machine is. As the project evolves, increasing amounts of detail are added until input and output devices and all communications are defined.

Actual code writing and implementation usually goes from the details up to top level bringing things together. First, I/O devices are mapped. Then subsystems, like controlling the temperature of a heat exchanger or automating an assembly or machining station, are programmed. Coordination of subsystems, communications, and operator interface design wrap up this part of the project.

This general process holds true for just about any control programming. The controller can be a PLC programmed with IEC 61131-3 languages like ladder diagram or function block or flow charts, DCS with function blocks with added sequential control in ladder, or embedded control in C or C++. In fact, tools exist to help all programmers design and develop better code. A Venture Development Corp. (Natick, Mass.) January 2001 study concludes that the market for embedded operating systems and software development tools should grow at a compounded annual growth rate of 18.7% to over $2.6 billion by 2005.



Software design begins with a top-down analysis
while programming usually goes from details up.

In the toolbox

Tools aid general program organization, Microsoft (Redmond, Wa.) strategy and software helps, other initiatives add power to ladder and other languages, and modeling and code generation assist in embedded programming. Think of these as toolbox essentials hammer, eight-tip screwdriver, pliers, and adjustable wrench available to the enterprising programmer.

Many business people have used Microsoft Visio as a tool for modeling business processes. The elegant, easy-to-read flowcharts can make complex interactions more intelligible at a glance. The same modeling tool forms the backbone of Entivity's (Ann Arbor, Mich.) Think & Do Studio. A programmer models the process in standard flowchart 'language,' then uses the Studio toolset to configure logic and target the hardware. The compiler then translates to machine code.

ControlShell from Real Time Innovations (RTI, Sunnyvale, Calif.) provides a development environment for real-time programming. A graphical environment similar to function blocks represents Composite Object Groups (COGs) that combine event-driven state machines, sampled data systems, and reusable interfaces. As in the flow charts, the drawing becomes the design. The software will also automatically generate code and integrates with Simulink from The Mathworks (Natick, Mass.) to enable simulation. The StethoScope visual tool within ControlShell enables monitoring and debugging, running applications, performance tuning, and analyzing noise.



Powerful function blocks within Ladder
Diagram as in this motion block from
Rockwell Automation s RSLogix 5000 make
complex tasks easier for programmers.

Modeling tools aid development

These modeling environments from Entivity and RTI reflect the growing response to the dire need engineers have for tools to enable fast, yet accurate, code development for completing projects more quickly.

There lies an often-overlooked organizing tool within the IEC 61131-3 standard Sequential Function Chart. Usually called a 'language,' SFC is actually a powerful organizing tool for sequential logic programming. The tool provides for steps and transitions. A step contains logic for an action, like an axis move or a pallet stop. When the action is completed, logic for the transition goes true and the next step is activated. Steps and transitions can be programmed in any of the four IEC languages or sometimes even C code. The graphical nature allows even non-programmers the ability to 'see' the logic being executed.

Another graphical language is State Language. Control Technology Corp. (Hopkinton, Mass.) is a pioneer in the language, first using it in 1976. State language emulates the way a control engineer or designer views a machine and designs an automation program. 'Steps,' similar to blocks in a flow diagram, represent the design/program. A benefit of this type of graphical view is that non-programmers can follow the diagram and see what happens.

Microsoft strategy is designed to allow developers to exploit the power of the web in applications. The .NET (dot net) initiative encompasses a Framework, a version of Visual Studio, and a new programming language, C# (C sharp). World-wide standards for the web XML (extensible markup language) and SOAP (simple object access protocol) are the foundation of the technologies.

The .NET framework enables application development in the highly distributed environment of the Internet. The first of two main components of the Framework is a common language runtime. It provides a code-execution environment for applications targeting .NET, including such things as memory management, thread management, security management, code verification and compilation, and other system services. Framework Class Library makes up the second component. It is a collection of reusable classes building on the object-oriented nature of the runtime. This allows third-party components to integrate seamlessly within the .NET Framework.



Embedded software development tools like this simultaneous target
debugger from OSE Systems allow programmers to get projects done more
quickly with improved quality.

Leverage web technologies

Visual Studio .NET provides an integrated development environment for designing web applications. C# is a new, object-oriented language (think C++ or Java) also designed to help developers leverage web technologies.

Doubtless, many control engineers will be developing HMI and communication interfaces within this new environment as manufacturers seek to exploit the web to reduce costs and more tightly integrate the supply chain.

Software components don't reside only within C++, C#, or Java. Siemens Energy & Automation (Alpharetta, Ga.) has been working on component-based software for IEC 61131 programming. Within Simatic Step 7, function blocks and associated data blocks can be used as components that store in libraries for reuse as needed. Multiple function blocks can be combined to create a higher-level function block. The code in one of these component function blocks can be in any of the IEC languages (Ladder Diagram, Instruction List, Function Block Diagram, Sequential Function Chart, and Structured Text).

Lee Ward, software group team leader for Schneider Electric Automation (North Andover, Mass.), says that Schneider has been developing software with the philosophy that it should give users everything they need to facilitate their job in one package. 'We try to put all the tools a programmer needs in the standard package. For instance, we include a web browser in the editor so that the programmer can scan all the devices on an Ethernet/Modbus/TCP/IP network. In fact, if a device is compliant, we can create an IP address and broadcast it to the device to load it.'

While most control engineers are familiar with ladder diagram, also known as relay ladder logic, many were not trained for complex motion logic. In fact, often motion logic was text based with many arcane keywords, difficult to program, and even more difficult to debug.

Integrate motion functions in PLC

Bob Hirschinger, Rockwell Automation (Milwaukee, Wis.) product manager, notes, 'By including motion-control function blocks within ladder diagram, the large community of PLC programmers could pick it up quickly. We use wizards and dialog-based tools to help programmers set up complex motion profiles. A tag database graphical editor allows you to create a tag, specify and define tag type, and graphically show the profile you just created.'

Brian Martinicky, Automation Intelligence (Duluth, Ga.) software developer, also points to the difference of PLC and motion programming as more PLC programmers incorporate motion control. 'Features such as the ability to load and unload modules on-the-fly are usually taken for granted by the PLC programmer,' he states. 'Our object-based, event-driven environment allow for these and other features for power and flexibility for sequential and motion control.'

National Instrument's (Austin, Tex.) LabView is a graphical programming environment for data acquisition, measurement, and industrial control. Norma Dorst, product manager, explains, 'Wizards are a powerful tool for I/O-device and data-acquisition configuration. Other tools that help programmers get projects up and running more quickly are those which connect to enterprise databases via SQL, ADO, and XML'

Simulation is a powerful tool both for defining processes and debugging (see April 2001 Control Engineering , p. 61). Not just for robotics, simulation works for PLC development, as well. Joe Rubino, Omron Electronics (Schaumburg, Ill.) software product marketing specialist, says, 'A simulator is the best tool for developers to efficiently design, test, and debug ladder logic and network connections even before physical connections are made.'

Benson Hougland, Opto 22 (Temecula, Calif.) director of technical marketing, points to its new tool, OptoScript, as a way to provide both novice and advanced control programmers a way to get their job done quickly. A programmer can layout a program in graphical flowchart with statements within function blocks, or the program can be written in text with the BASIC-like OptoScript. This latter method enables programmers to use more sophisticated math and other algorithms for higher level control.

Software tools for the embedded control space target the same needs as traditional machine control graphical modeling for design, reusable objects, and faster time to market. UML (Unified Modeling Language) is a standard in the industry for graphical representation of software projects.



Sequential Function Charts are a powerful program organization tool
for IEC 61131-3 programming as shown in this Siemens Step 7 screen.

Unified Modeling Language

Steve Saunders, vp UML and language integration for Rational Software (Lexington, Mass., and Cupertino, Calif.), says, 'Our products enable faster time to code through modeling and by having automated testing that assures quality. Tools support a full life-cycle starting with textual definition, automatic documentation, and tools for team collaboration. UML [Unified Modeling Language] enables users to graphically model the project. They design systems with UML, specify components, wire them together in software, set up state machines, simulate operation, and get feedback for debugging, then target the hardware and generate code.'

The MathWorks provides engineers and researchers with a graphical environment to analyze and design continuous and discrete control systems. One new tool is LTI (linear-time-invariant) Viewer with which users can graph responses of one or several systems. The SISO (single-input, single-output) Design Tool allows users to interactively design and analyze compensators by graphically adjusting compensator gain, poles, and zeros, while monitoring closed-loop responses and stability margins. This capability enables users to add and tune lead/lag networks and notch filters, manipulate closed-loop dynamics using root locus techniques, or shape open-loop Bode responses. After modeling and simulation of either dynamic or event driven processes, control code can be automatically generated.

Bob Monkman, OSE Systems (San Jose, Calif.) director of product marketing, notes two important benefits of any high-level modeling tool. 'First, it is an abstraction of the target environment so higher level tools can have an API to access registers, memory, etc. Second, a system browser can look at entire distributed system based on OSE. It can look at things like messages being passed so problems can be found looking at the entire system. Another tool is a scripting language useful at the test stage between development and deployment.'

Rhapsody may have been in Blue for Gershwin, but it comes in C++ or Java for I-Logix (Andover, Mass.). These UML-based tools (Rhapsody in C++ and Rhapsody in Java) provide behavior modeling for both event-driven and continuous process systems. With component orientation, new tools are enabling project collaboration among many designers. According to senior vp, Neeraj Chandra, studies show most projects come in late and over budget. Some of the most important tools that suppliers can provide are those which facilitate faster design and implementation. Enhancing project collaboration is one way that the company intends to remedy the situation.

Requirements management

Telelogic's (Irvine, Calif.) requirements planning suite provides a way to ensure a project's compliance with specified requirements and standards. This is another way of providing project communication, collaboration, and common design standards. Other tools include ability to reverse engineer code into a UML model. Another tool provides visibility for change management by automating the change-request lifecycle.

Green Hills Software (Santa Barbara, Calif.) debugging tool, EventAnalyzer, offers a graphical view of application and real-time operating system events

Artisan Software (Portland, Ore.) adds several tools to UML. The Constraints Diagram captures the set of non-functional requirements and general constraints. System Architecture Diagram captures system context, which is the boundary of the system, including humans and external devices and their communication with the system.

How about attending a free, online programmer's university? Metrowerks (Austin, Tex.) offers a higher level tool than those already discussed. CodeWarriorU.com is an online university covering topics such as programming in C/C++ and Java, embedded programming, and, of course, learning to use the company's development environment, CodeWarrior.

NewMonics (Lisle, Ill.) offers Java-compliant tools for a variety of operating systems. One tool provides ability to analyze Java applications and automatically remove unused code, thereby reducing application footprint. Another provides developers the ability to integrate Java with C/C++ code. A Trivial File Transfer Protocol (TRTP) class loader dynamically loads classes without requiring a network file system.

Wind River Systems (Alameda, Calif.) provides a run-time error checker for detection of pointer and memory management errors, including memory leaks. A visual interactive profiler detects 'hot spots' for advanced program tuning and optimization.

What about programming operator interface? QSI (Salt Lake City, Utah) offers a suite of objects in a drag-and-drop environment for getting that OI project up and running. Some objects are simply 'drag-and-use,' while others are programmable to enable more advanced functions.

These and other suppliers offer additional tools, of course. What's here should raise control engineers' awareness of the kinds of tools available. Knowing the types of software in the control engineer's toolbox is the first step toward writing better code faster and bringing that project in on time.






No comments
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by...
Each year, a panel of Control Engineering editors and industry expert judges select the System Integrator of the Year Award winners.
Control Engineering Leaders Under 40 identifies and gives recognition to young engineers who...
Learn more about methods used to ensure that the integration between the safety system and the process control...
Adding industrial toughness and reliability to Ethernet eGuide
Technological advances like multiple-in-multiple-out (MIMO) transmitting and receiving
Virtualization advice: 4 ways splitting servers can help manufacturing; Efficient motion controls; Fill the brain drain; Learn from the HART Plant of the Year
Two sides to process safety: Combining human and technical factors in your program; Preparing HMI graphics for migrations; Mechatronics and safety; Engineers' Choice Awards
Detecting security breaches: Forensic invenstigations depend on knowing your networks inside and out; Wireless workers; Opening robotic control; Product exclusive: Robust encoders
The Ask Control Engineering blog covers all aspects of automation, including motors, drives, sensors, motion control, machine control, and embedded systems.
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
News and comments from Control Engineering process industries editor, Peter Welander.
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
This is a blog from the trenches – written by engineers who are implementing and upgrading control systems every day across every industry.
Anthony Baker is a fictitious aggregation of experts from Callisto Integration, providing manufacturing consulting and systems integration.
Integrator Guide

Integrator Guide

Search the online Automation Integrator Guide
 

Create New Listing

Visit the System Integrators page to view past winners of Control Engineering's System Integrator of the Year Award and learn how to enter the competition. You will also find more information on system integrators and Control System Integrators Association.

Case Study Database

Case Study Database

Get more exposure for your case study by uploading it to the Control Engineering case study database, where end-users can identify relevant solutions and explore what the experts are doing to effectively implement a variety of technology and productivity related projects.

These case studies provide examples of how knowledgeable solution providers have used technology, processes and people to create effective and successful implementations in real-world situations. Case studies can be completed by filling out a simple online form where you can outline the project title, abstract, and full story in 1500 words or less; upload photos, videos and a logo.

Click here to visit the Case Study Database and upload your case study.