Tech Tips February 2005
FEBRUARY 22, 2005
TECH TIP OF THE WEEK:
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.
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 www.controleng.com/issues , 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 www.controleng.com/tutorials .
IEC, at www.iec.ch , 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 www.PLCopen.org 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
FEBRUARY 15, 2005
TECH TIP OF THE WEEK:
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.
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.