Do Control and Automation Engineers ever code?

In summary: This is all done in a high-level language like MATLAB or Simulink. I also use Python for scripting tasks and to interface with other software.Most Control Engineers work with high-level languages like MATLAB or Simulink for system design and programming. They also use Python for scripting tasks and to interface with other software.
  • #1
ramzerimar
178
23
From what I've seen, most engineers - outside software engineers - work with Matlab and spreadsheets like Excel. I don't know how to code in Matlab yet, so I'm not sure about how different it is from traditional programming languages like C/C++.
I'm more interested in Control Engineers - and Automation, people who work with robotics, for instance. Do they ever code with C/C++ or python, or need to program things like microcontrollers? If not, what is the kind of programming they most likely do?
 
Physics news on Phys.org
  • #2
ramzerimar said:
Do they ever code with C/C++ or python, or need to program things like microcontrollers? If not, what is the kind of programming they most likely do?
It depends on which jobs you are seeking ( of course ).

I've been working a lot with ( built in ) servo motor drives/controllers, something like this: http://www.animatics.com/

Besides the design of hardware, you are programming in assembly code, because it must be executed as fast as possible and you must keep track of the clock cycles to be used for a task: Every lost clock cycle = decrease of the control quality. No unnecessary delay time in the control loops, due to slow calculation. Maybe you will have to control the phase currents in a three phase synchronous servo motor, each with a sample frequency = 15 kHz. And that is just one of many tasks, e.g. speed loops, position loops, calculation of winding temperature, etc.

Other types of jobs include programming PLC's with their own specific programming language.
 
Last edited:
  • #3
Well, in one mechatronics course that I took (and that is why I had asked about the availability of a mechatronics program at your school), we programmed microcontrollers in both assembly and in C. I was surprised about using C, but I learned that is also a common language available for micro controllers (free language anyway).
.
More assessable for the average engineer working in plant automation is the PLC. There are several major brands available, all with a similar PLC ladder logic type programming language. I believe Allen-Bradley has a small micro controller available for less than $100 and provides free software for programming it if you want to learn about PLCs (might actually be called a programmable relay as it is much less capable than a full blow PLC). Another company that sells budget PLCs is Automation Direct.
.
I am sure both have fairly good documentation available for you to determine if you want to delve into this type of work.
 
  • Like
Likes JakeBrodskyPE
  • #4
CalcNerd said:
Well, in one mechatronics course that I took (and that is why I had asked about the availability of a mechatronics program at your school), we programmed microcontrollers in both assembly and in C. I was surprised about using C, but I learned that is also a common language available for micro controllers (free language anyway).
.
More assessable for the average engineer working in plant automation is the PLC. There are several major brands available, all with a similar PLC ladder logic type programming language. I believe Allen-Bradley has a small micro controller available for less than $100 and provides free software for programming it if you want to learn about PLCs (might actually be called a programmable relay as it is much less capable than a full blow PLC). Another company that sells budget PLCs is Automation Direct.
.
I am sure both have fairly good documentation available for you to determine if you want to delve into this type of work.
That's interesting. Is programming a PLC much different from C programming?

I like coding, and I would like to find some field in Mechanical Enginering where it is really used. Controls and Automation comes to mind, but I've searched quite a bit about Computational Mechanics (like Computational Fluid Dynamics). I don't know much about this area. Do engineers working in this area code as well?
 
  • #5
In 30 years, I've written my share of PLC code. Older versions are very much like the predecessor to the PLC: The physical ladder of control relays. Yes,I worked with one of those once, too.

I liken PLC coding to the experience you'd get if you programmed an Arduino processor on a much larger scale. It has start code that then drops you into a continuous loop of code that never ends until you stop the processor. The only difference is that these days we have a standardized programming environment, the notorious IEC 611131 and its languages. There are text scripting, relay ladder-ish, Function Block, and something that looks disturbingly like assembly language interfaces in this environment.

We do not use C for control systems application programming except in those very very few cases where speed is an issue. I have used C to write protocol drivers.

As a Control Systems Engineer, I design entire processes as well. I select instruments, controllers, valve actuators, valves. I select materials, wiring standards (some environments require very detailed electrical standards to reduce the likelihood of an explosion), networks, switches, firewalls, and the like.

I'm an industrial jack of many trades. Because of where I work I also have to live with my designs. I go on 24 hour for a week about four to six times a year. The Operators all know my phone numbers. If one of my creations screws up, they won't be shy about calling me. This also breeds a certain degree of humility and honesty over what the design should or shouldn't have.

I recommend this field highly.
 
  • #6
JakeBrodskyPE said:
We do not use C for control systems application programming except in those very very few cases where speed is an issue. I have used C to write protocol drivers.
What are protocol drivers? And C is used for microcontroller programming, isn't it? Have you ever programmed one of those?

I wonder about Embedded Control Systems too. Robotics, also, looks like a field where programming skills are of real value.
 
  • #7
ramzerimar said:
What are protocol drivers?
Before the Open platforms were commonplace, there were many proprietary communications protocols, particularly for SCADA (Supervisory Control And Data Acquisition) systems. We had a lot of field devices with a relatively arcane protocol by today's standards. Nobody had written device drivers for that protocol, so I wrote one. It had to do things in a standard Application Program Interface, so that objects on the screen could send messages to the field and read back the results.

Today, we have many standard SCADA protocols such as DNP3, ModbusTCP (not really a SCADA protocol but people abuse it that way anyhow), IEC 60870 series, as well as a few proprietary ones that people continue to use such as Conitel 2020.

ramzerimar said:
And C is used for microcontroller programming, isn't it? Have you ever programmed one of those?
Yes, for fun and curiousity, but not for industrial applications. Those cute little hobby boards are great in an indoor environment, but we have wide temperature ranges and severe environmental hazards that we need to work with. We expect our equipment to work from -40 C to +60 C. They're installed in steel boxes mounted outside on a concrete pad. The temperature range in that box is pretty much the same as you'd get inside a car with the windows closed. In the heat of summer or the dead cold of winter. We also expect the inputs to have lots of surge and noise protection. We expect galvanic isolation in certain places so as to limit damage due to a nearby or direct lightning strike. A commonplace Raspberry Pi or an Arduino is not the sort of thing I would put out there. Remember the equipment itself is dirt cheap compared to what it costs to get someone out of bed, and send him down the road to fix something that isn't working.
ramzerimar said:
I wonder about Embedded Control Systems too. Robotics, also, looks like a field where programming skills are of real value.

Yes, but programming is almost incidental to the job. If you are under the impression that this is all about writing routines and data structures for a real time application, think again. You have to know about hydraulics, limit switch cycles, position indicator hysteresis, and the physics of moving an arm accurately and quickly from one place to another and so much more. You also have to know what you're assembling, and what production rates are expected. You have to think about how you're going to help ensure quality and accuracy in the product.

The programming takes maybe 15% of your time. The remainder is everything else.
 
  • #8
JakeBrodskyPE said:
Yes, but programming is almost incidental to the job. If you are under the impression that this is all about writing routines and data structures for a real time application, think again. You have to know about hydraulics, limit switch cycles, position indicator hysteresis, and the physics of moving an arm accurately and quickly from one place to another and so much more. You also have to know what you're assembling, and what production rates are expected. You have to think about how you're going to help ensure quality and accuracy in the product.
So, robotics usually requires more or less programming skills then industry control engineering in general?

Also in robotics, wouldn't companies have specialized programmers or software engineers to write code, instead of a control and automation engineer?
 
  • #9
Both. Certainly there are lots of software engineers but almost every engineer writes at least some code. I'm an EE and I write test code to evaluate my designs and interfacing with my simulators is through code and scripting.
 
  • Like
Likes ramzerimar
  • #10
analogdesign said:
Both. Certainly there are lots of software engineers but almost every engineer writes at least some code. I'm an EE and I write test code to evaluate my designs and interfacing with my simulators is through code and scripting.
That's interesting. What do you work with? And what programming languages do you use the most?
 
  • #11
ramzerimar said:
That's interesting. What do you work with? And what programming languages do you use the most?

I'm a hardware engineer so I'm not an expert in any language. Our main tools are made my a company called Cadence and they are scripted using a custom language called SKILL which is based on LISP. All my test software is in Python.

I also do a lot of simulation software in Verilog. I use Verilog so it is easy to interface with our hardware simulations.

I also use MATLAB now and then but not that much. I find Python almost as useful and it's free.
 
  • Like
Likes ramzerimar
  • #12
analogdesign said:
I also use MATLAB now and then but not that much. I find Python almost as useful and it's free.
I intend to learn Python soon. Do you have any books or sources to recommend concerning Python programming for engineers? It would be helpful.

Also, about simulation software: Is Verilog a simulation software, or you code simulation software using Verilog?
 

1. What is the role of coding in control and automation engineering?

Coding plays a crucial role in control and automation engineering as it is used to develop and implement software programs that control and automate various systems and processes. These programs enable engineers to regulate and monitor the behavior of machines and systems, making them more efficient and accurate.

2. What coding languages are commonly used by control and automation engineers?

The most commonly used coding languages in control and automation engineering are ladder logic, structured text, function block diagram, and sequential function charts. These languages are specifically designed for industrial control and automation applications and are easy to learn for engineers with a background in electrical or mechanical engineering.

3. Do control and automation engineers have to be proficient in coding?

While it is not a requirement for all control and automation engineers to be proficient in coding, having a basic understanding of coding principles and languages is beneficial in this field. It allows engineers to troubleshoot and modify existing programs and work more effectively with software developers.

4. How does coding impact the efficiency and reliability of control and automation systems?

Coding has a significant impact on the efficiency and reliability of control and automation systems. Well-written code ensures that the system operates smoothly and consistently, reducing the risk of errors and malfunctions. It also allows engineers to make necessary adjustments and updates to the system without disrupting its operation.

5. Can control and automation engineers use coding to improve process control and optimization?

Yes, control and automation engineers can use coding to improve process control and optimization. By writing code that analyzes data and adjusts system parameters in real-time, engineers can optimize processes and improve overall efficiency. This can lead to cost savings, increased productivity, and enhanced product quality.

Similar threads

  • STEM Career Guidance
Replies
6
Views
2K
Replies
13
Views
2K
  • STEM Career Guidance
Replies
2
Views
1K
  • STEM Career Guidance
Replies
3
Views
2K
  • STEM Career Guidance
Replies
5
Views
1K
  • STEM Career Guidance
Replies
2
Views
1K
  • STEM Career Guidance
Replies
1
Views
2K
  • STEM Career Guidance
Replies
5
Views
1K
  • STEM Career Guidance
Replies
14
Views
2K
  • STEM Career Guidance
Replies
4
Views
4K
Back
Top