1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Do Control and Automation Engineers ever code?

  1. Feb 19, 2016 #1
    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?
     
  2. jcsd
  3. Feb 19, 2016 #2

    Hesch

    User Avatar
    Gold Member

    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: Feb 19, 2016
  4. Feb 19, 2016 #3

    CalcNerd

    User Avatar
    Education Advisor
    Gold Member

    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.
     
  5. Feb 19, 2016 #4
    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?
     
  6. Feb 19, 2016 #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 in to 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.
     
  7. Feb 19, 2016 #6
    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.
     
  8. Feb 19, 2016 #7
    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.

    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.


    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.
     
  9. Feb 19, 2016 #8
    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?
     
  10. Feb 19, 2016 #9

    analogdesign

    User Avatar
    Science Advisor

    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.
     
  11. Feb 19, 2016 #10
    That's interesting. What do you work with? And what programming languages do you use the most?
     
  12. Feb 19, 2016 #11

    analogdesign

    User Avatar
    Science Advisor

    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.
     
  13. Feb 19, 2016 #12
    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?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Do Control and Automation Engineers ever code?
  1. Controls Engineering (Replies: 4)

Loading...