Print page

Home » Automation IT » Which Programming Language Should I Learn For Process Control?

Print page

Which Programming Language Should I Learn For Process Control?

Q: I am concerned with the role that is played by programming languages in process control. In the first course of my undergraduate study, we went through Visual Basic; our teacher was encouraging us to master it since it is of great importance in our specialty. Recently I found out, on Google, that most people prefer C/C++ to VB as far as engineering is concerned. According to your experience, which language best fits process control engineering, especially for someone interested to work for BP or Shell Oil Companies?

A:

From the standpoint of a process engineer, VB is the correct language to know. Many operator interfaces and tools in control products offer Visual Basic for Application(VBA) as an interface for writing custom functionality and scripts. Thus, having a good understanding of VB is of value.
 
If your intention was to work for a company that produced a DCS, like Emerson, then the majority of the programming is C, C++ and even C#. Very little VB code is used at this level.

Editor's Note: Expert Greg McMillan deferred to colleague Randy Reiss, a CDI Process and Industrial contractor at Emerson, to answer this question.

According to expert Cecil Smith:

The most common programming languages encountered in process control are Basic and C, or some variation thereof.
 
But when pursuing the subject, the most important aspect is the "art of programming".  The objective is to write well-organized code, not "spaghetti code".  This usually comes under the heading of structured programming.  The C language provides the appropriate features, and specifically deemphasizes the GOTO statement (it is available, but should be rarely if ever used).
 
Another topic one should master is object-oriented programming, the principal language being C++.  This language is not commonly available at the application level in process control.  However, the fundamental concepts can be incorporated into the logic for programs written in any language. 
 
The "art of programming" is common to all programming languages.  However, most programming manuals focus on the language itself, with limited if any guidance on organizing a program.  In a sense, programming is translating logic into statements a machine can parse.  This is largely mechanics, and if one can do this in one language, learning the next is relatively easy.  The intellectual component is developing the logic for the program.  Most computer science students encounter this in their introductory courses.

Here are more of the latest questions on: Instrumentation and Control

Can you explain a split range controller?
Regarding split range controller:

  1. Is it normal to have a control valve with two different sizes?
  2. Why use a split range controller and where can we it?
  3. My application: I am planning to use at outlet of condenser. The outlet will have condensate liquid and non-condensate vapor. Will it work here?

Can you explain linearity and accuracy of flowmeters?
I am confused on linearity and accuracy of flowmeters such as oval meters. In some references they are mentioned as the same but in some others they are not the same. Should I only rely on linearity for selection for measuring custody transfer or another flowmeter characteristic?

Can you recommend a flowmeter?
We are going to install a flowmeter for lube oil loading as custody transfer. The flowrate may alter between 140-280 CMH (two-speed motor) having viscosity 150cSt at 40C. Simple installation and setting up on the line and reasonable cost as well as pressure drop are preferred. The pump can generate 8barg pressure. What would be the recommended flow measuring type to support the requested service?

Where should I install the control valve on the hot oil line?
I am going to use hot oil for heating a process in a jacketed vessel and I am going to make a control loop for controlling the vessel content. The hot oil enters at the bottom of the jacket and exits from the top. The control elements are RTD, controller, and control valve. My question: Where should I install the control valve on the hot oil line? Is it up stream or down stream of the vessel?

Why is there a discrepancy of solids at sampling points?
Ours is a fertilizer industry and within the premises we transfer phosphoric acid from the phosphoric acid production facility to the fertilizer production facility. The distance of the pipeline might be around 400m but the difference in issue and receipts generally comes out to be 100s of tons per day. Can you tell me what could be the possible problem? Other info required:

  1. Phosphoric acid has around 5% solids
  2. Sampling point in phosphoric acid tank is at the bottom
  3. Sampling point in the fertilizer plant is at a higher level(25 ft) and is preceded by a lot of bends.
Could this be an issue with the sampling points or the data analysis?

Back to Ask the Experts

More content on this topic:

Featured Sponsor