Tech Tips February 2005


FEBRUARY 22, 2005


Picking the right programming language

Which language should you choose for use with your programmable controller? Among the five languages defined in IEC 61131-3, ladder diagrams or ladder logic is generally the most widely applied in North America. Other languages have practical applications and should not be overlooked. The most appropriate choice depends on the programmer's skill, the programming task, the level and structure of the problem and control system, determining who needs to interact with the program, and, perhaps, how often it's modified.

Since inception in 1992, PLCopen has helped promote and support programming standards, which allows, the association says, for less training, more logical organization, modularization, and use of modern software techniques. 'Each program is structured, increasing its reusability, reducing errors, and increasing programming and user efficiency,' states the group.

'Also, the standard allows two ways of developing your program: top down and bottom up. Either you specify your whole application and divide it into subparts, declare your variables, and so on. Or you start programming your application at the bottom, for instance via derived functions and function blocks. Whichever you choose, the development environment will help you through the whole process,' adds PLCopen.

The five elements of IEC 61131-3 are:

  • Sequential function charts (SFC)—rather than a language, SFC is more of a graphical method of organizing control programs.

  • Ladder diagram (LD)—most used in North America, it graphically represents rungs of contacts, coils, and special instruction blocks. Its origin is relay-ladder logic.

  • Instruction list (IL)—a text-based language similar to assembler. This is the European counterpart to LD.

  • Structured text (ST)—a text-based language similar to Pascal.

  • Function block diagram (FBD)—a graphical language corresponding to a circuit diagram. FBD is widely used in process industries.

Other resources
Several IEC standards provide more information about function blocks; IEC 61499 and IEC 61804 focus on the process industry. Function blocks encapsulate algorithms, so they can be more easily understood and applied by those who aren't software specialists.

For more on function blocks, visit , and read 'Component Automation Enables Modeling and Control' in the September 2002 issue. Also, look for an article on multiple-platform programming software in the August 2002 issue. See related items at .

IEC, at , publishes 'Programmable controllers—Part 3: Programming languages.' IEC 61131-3 'specifies syntax and semantics of programming languages for programmable controllers as defined in part 1 of IEC 61131.' A related IEC publication is 'Programmable controllers-Part 8: Guidelines for the application and implementation of programming languages.'

PLCopen, at focuses on control programming and participates on technical committees to evolve programming standards.

Source: Mark Hoske, David Greenfield, 'Choosing the right programming language,' Back to Basics, Control Engineering, July. '03, p. 52.

Pros and cons of IEC 61131-3
Benefits and drawbacks of IEC 61131-3 include the following, according to Wolfgang Langer, Schneider Electric's software product manager.
Benefits are :

  • Less retraining costs—IEC looks and feel similar among vendors;

  • Greater focus on problem solving and software reusability;

  • Fewer misunderstandings and errors in programming when switching between languages; all IEC languages work the same; and

  • Greater community—many tools from independent suppliers can be used. PLCopen drives IEC standard with vendors to comply with interoperability standard.

Drawbacks include :

  • Too many optional features;

  • Does not define implementation limitations for the size of a page value to define a program;

  • Doesn't define the minimum of subsets needed to implement;

  • Doesn't define minimum limitations while implementing, such as how many rungs must be supported in one section; and

  • Doesn't define conversion among languages.

FEBRUARY 15, 2005


Measuring moisture accurately

Moisture measurements are critical to the control of many processes. Excessive moisture can result in loss or poor quality of product, significant downtime of a process, or corrosion and damage to critical equipment, resulting in costly repairs or loss of revenue. To minimize process moisture problems, reliable, on-line moisture measurement is needed. Several basics concepts should be considered to achieve accurate moisture measurements.

Sensor/analyzer maintenance
As part of a normal maintenance cycle, moisture sensors should be inspected and calibrated to ensure that the accuracy and performance of the sensor are maximized. Periodic sensor calibration provides information to identify potential problems with the application, such as sensor corrosion.

Some moisture analyzers are provided with on-board calibration systems, which can be complex, expensive, and require further maintenance. Also, due to the polar nature of the water molecule and its ability to adsorb to wetted surfaces, certified moisture standards in gas cylinders are generally unavailable for field calibration. Consequently, most moisture sensors are typically returned to the manufacturer or suitable third-party laboratory for traceable calibration to national standards.

Although some moisture probes can be installed directly in-line, they will not withstand the long-term rigors of the process. For this reason, most installations use sample-conditioning systems to expose the moisture sensor to the process fluid. Sample systems provide the ability to isolate the moisture sensor, filter contaminants, meet hazardous area requirements, provide environmental protection, and control process conditions at the moisture sensor, such a temperature, pressure, and flow rate.

Typically, a sample tap is installed in the process pipeline, and connected to the sample system by a short, continuous piece of tubing. Stainless steel wetted parts and tubing are recommended because stainless steel has excellent adsorption/desorption properties with respect to water molecules, and is not susceptible to permeation of ambient moisture. Sample systems should be periodically leak-tested to prevent leakage of ambient moisture into the system; and filter elements should be cleaned or replaced as part of routine maintenance.

When reviewing a moisture analyzer installation, it is important have a good, practical understanding of moisture measurement units. For gas applications, the two most common units of measure are dew point temperature and parts per million by volume (PPMV). Depending on the application, one measurement unit may be more applicable than the other for interpreting moisture measurements.

For example, in cryogenic natural gas processes, gas flows through a 'cold box' maintained at a very low temperature to recover heavy hydrocarbon products. It would be practical to compare the dew-point temperature to the cold-box temperature to ensure that the dew-point temperature is lower than the cold-box temperature to prevent frost formation within the cold box.

Another example involves comparison of moisture measurements conducted at two pressures. Many moisture analyzers can only measure moisture content at atmospheric pressure, while a few analyzers are capable of measurement at line pressure. Dewpoint temperature is functionally equivalent to water vapor pressure. Since water vapor pressure is one component of the total gas pressure, dew-point temperature will increase or decrease with corresponding changes in total pressure. Consequently, comparing dew-point temperature readings at two different pressures can lead to confusion in understanding the moisture measurement reading. In this situation, it is beneficial to use a PPMV reading, which is not dependent on system pressure, to determine if the analyzers are in agreement. By comparing the PPMV reading, the problems of the dew-point temperature to pressure relationship can be avoided.

John Kerney, hygrometry product manager, Panametrics Inc., Waltham, MA

Source: John Kerney, 'Measure moisture accurately,' Back to Basics, Control Engineering, Aug. '02, p. 12.

No comments
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by...
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Robotic safety, collaboration, standards; DCS migration tips; IT/OT convergence; 2017 Control Engineering Salary and Career Survey
Integrated mobility; Artificial intelligence; Predictive motion control; Sensors and control system inputs; Asset Management; Cybersecurity
Big Data and IIoT value; Monitoring Big Data; Robotics safety standards and programming; Learning about PID
Featured articles highlight technologies that enable the Industrial Internet of Things, IIoT-related products and strategies to get data more easily to the user.
This article collection contains several articles on how automation and controls are helping human-machine interface (HMI) hardware and software advance.
This digital report will explore several aspects of how IIoT will transform manufacturing in the coming years.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

Mobility as the means to offshore innovation; Preventing another Deepwater Horizon; ROVs as subsea robots; SCADA and the radio spectrum
Future of oil and gas projects; Reservoir models; The importance of SCADA to oil and gas
Big Data and bigger solutions; Tablet technologies; SCADA developments
Automation Engineer; Wood Group
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
click me