Have you ever purchased a simple 4..20 mA or 0..10 VDC analog sensor and wondered how to get them more accurate as read by the PLC? It is not uncommon for someone to assume a thermocouple, RTD, pH or other analog sensor comes “out of the box” set up and ready for exact measurement. In fact, sometimes they are advertised that way. But let us not be fooled, we have all at some point looked at the readings and said “this can be much more accurate”.
This is a quick how-to guide to help you quickly and efficiently calibrate and scale those analog sensors for the accuracy you desire. We will skip the theory as much as possible and only brush on the necessary technical topics. This guide is intended for anybody with access to a PLC, an analog sensor, and a desire to get a more accurate sensor reading.
What you need:
1. A general understanding on what you are trying to measure with your analog sensor (Temperature, pressure, level, etc.)
2. Access and general knowledge of basic Ladder logic or similar style programming
3. A “high” and “low” test sample or way to define two end points of what you are trying to measure. For example, a cup of ice water for a low temperature reading and a cup of boiling water for a high reading
4. Something to measure your test samples (thermometer, ruler, etc.)
5. Knowledge of Calculus 1 or 2 (Just kidding, but we will be using the equation of a line, “y = mx + b”)
Figure 1: What you need
1. You know your way around the PLC you are utilizing
2. The sensor is hooked up to an analog input and confirmed working. For example, holding the thermocouple in your hand nets an increasing register value as seen by the PLC. Removing your hand you can observe the raw analog value decrease back to a steady state.
Figure 2: Assumptions
Step by Step Guide:
Time needed: 20 minutes.
How to calibrate and scale a analog sensor
Create two samples of “high” and “low” points for a control
In this example we will be calibrating and scaling a thermocouple. We have chosen a cup of ice water for our “low” point, and a cup of hot water for our “high” point.
Locate the sensor input in the PLC and prepare to record values
Make sure you have located the correct register in the PLC that contains the sensor information. We are going to be taking a few measurements to assist in our scaling and calibration.
Place the sensor in the “low” state/condition
For example, we will place the thermocouple in our cold water with a actual thermometer so we can measure the exact temperature we should be reading.
Record the sensor register value and actual value
Look at the register in the PLC and record the number as X1. Record the actual temperature as seen on the thermometer as Y1. We measured a water temperature of 35 degrees F with a PLC register value of 3000.
Repeat this process for the “high” state/condition
In this example, we will repeat the above step replacing the cold water with our cup of hot water and record those values as X2 and Y2 respectively. We measured a water temperature of 200 degrees F with a PLC register value of 23000.
Prepare for Simple Calculus
We are now going to create our equation of a line with the numbers we just measured.
Calculate the Slope or m
From the equation we are going to calculate m from “y = mx + b”; to do this, simply calculate the following equation ((Y2-Y1)/(X2-X1)); no this is not a Facebook math trick problem.
From our above example with X1 = 3000, Y1 = 35 (degrees F) and X2 = 23000 and Y2 = 200 (degrees F)
m = (Y2-Y1) / (X2-X1) = (200 – 35) / (23000 – 3000) = 0.00825 m = 0.00825
Calculate the offset of b
This is generally the trickiest part of the problem. When calculating the offset, or b, you will need to pick one of the two above measurements (high or low) and plug them back into the equation of a line and calculate for b. We will choose to use the low point for this example.
From the above example, choosing the “low” point as our test:
y = m x + b 35 = 0.00825 * 3000 + b b = 35 – 24.75 b = 10.25
Combine the slope and offset to create the equation of the line
Combine all of the above information and you will form the equation:
y = 0.00825 * x + 10.25
This is the new scaled and calibrated equation based off the real world samples you took. Now, for every PLC register value X, you will have a corresponding temperature in Fahrenheit Y. This is typically entered in the PLC as a CMP (compute) block where y would be called your “Temperature_Scaled” and the value would calculate from the equation 0.00825 * raw_analog_input + 10.25
That is it guys. Easy as cake. In the above examples you an try substituting pH samples in for a pH sensor or any other measurable combination of analog values and desired outputs (like a level transmitter and a actual product level). As long as you can physically measure it in real life you can scale the PLC accordingly.
BONUS TIP: Assuming scaling is linear (and generally this is true for most sensors) the equation you created can expand far above and below your high and low measurements. For example, say the temperature sensor you scaled really operates in the ranges of 400-600 degrees F; assuming the sensor you calibrated is meant for the total range we have observed ( in our example 35 F to now 600 F) our simple bench top equation should expand into the 400 – 600 degrees F range without any work required on your part*. The beauty about the linear equation is that it is defined for all points in space. You are only limited by the PLC register that is sending you data.
*In our above example we had a high value of 2300; in general, most analog inputs (raw) will range up to 32000 or 64000 depending on the register type (we are not intending on this to be a technical discussion) so take our example with a grain of salt knowing that you would have much different values if the sensor was in fact rated for 35 F to 600 F. Please contact us if you want more personalized help on this topic!
Automation and controls engineering is one of many fields of specialty in the industrial manufacturing industry. You are most likely here because you are interested in this job title and are looking for more information about what it is and how you can work towards this job title. To get started, let us define what an automation or controls engineer is and does so we can focus on the specifics on what is needed to pursue such an interesting and challenging career.
What is a Automation or controls engineer?
We define an automation or controls engineer as an engineer who is tasked with designing, programming, implementing and improving a manufacturing plant or machine process with the aid of programmable logic controllers, relays or any other form of “control” circuity. An automation or controls engineer has a desire to learn electrical and computer engineering practices and shows natural strength in problem solving skills. On top of the necessary math and science educational background, there is a huge industry demand for engineers with soft skills to aid in interfacing with customers and other employees. Long gone are the days of quiet guys and pocket protectors (sorry nerds!)
What kind of education do I need?
Most companies are looking for a Bachelors of Science (B.S.) in an accredited 4-year program in one of the engineering colleges (Electrical, Computer) with a cumulative GPA of a 3.0 or above. Additionally, companies have been branching out more into Computer Science and Data Science degrees to attempt to capitalize on the new Industry 4.0 trends of Internet of Things (IOT), machine learning (ML) and artificial intelligence (AI). I write a post on this interesting topic specifically in the future.
Electrical engineering still caries a heavy weight as the core engineering background for new engineers as they are the most prepared to jump right into plant day to day operations as they are exposed the most to electricity and circuity. However, it is worth noting that Computer engineering is becoming much more attractive as PLC processors get more complicated and powerful, opening the doors to newer applications an use cases. It would not be uncommon for a systems control integrator to look for a computer engineer to help implement and execute more complicated control systems while working along somebody like a electrical engineer to do the full electrical design or backbone of the computer system.
On top of your standard 4-year degree mentioned above I would also recommend a fundamental understanding in the following:
Linux or Unix Experience (for core low-level understandings of systems)
Network and networking infrastructure (I.P. Address, Network Switch, Router, Network Mask, MAC Address, etc.)
SQL, Stored Procedures and Reporting (not a must but a strong bonus companies like to look for)
What kind of job experience do I need?
This probably one of the hardest questions to quantify as it is 100% dependent on you and your hiring institution. There are two methods of approach to this question in my eyes, and that is if you a new graduate out of college or you have been in the industry previously in ANY capacity as a maintenance personnel, technician, operator or any other industry specific position. In either case, you want to make sure any job experience you do have aligns with the manufacturing work environment and structure as long as allowing you to practice typical skills seen on the plant floor like troubleshooting, evaluation, monitoring and operating.
New graduates out of college
I almost need to start this entire post off with the following sentence, ensure that you are actively participating in a paid or unpaid internship in a related field no later than the start of your junior year in college! This bears repeating because I cannot tell you the countless individuals I have worked with and tried to help get jobs in this field that simply did not put in the time while in college and simply struggled finding jobs after graduation even while carrying a good GPA and skill-set. Please make sure you are actively pursuing an internship in any automation related areas by no later than your junior year. Two years experience out of college will virtually guarantee you a hire directly out of college (usually with the company you are doing your internship with).
Previous industry experience
This is a very gray area in the industrial world. Those with “previous industry experience” can sometimes go unnoticed in the engineering wold and work among engineers and other technical peers sometimes without the necessary degrees or certifications. There is nothing wrong with this at all and is a great way to re-tool as an existing industrial employee but just know there can come a time when your credentials are needed and ultimately are required for the job position. For example, I worked at my first job as a engineer for seven years and never once had to produce any evidence my of degree. When I changed jobs the first thing the new company did was ask for proof of my degree and went as far as having me scan a copy for them to keep on file!
However, back on topic, as somebody with “previous experience” companies are looking for you to know and understand the basic concepts that any engineer would need to understand (electrical theory, programming, problem solving, etc) as well as a familiarity with the typical plant level hardware and software needed to work a typical day as a automation engineer (this could be CAD Experience, programmable logic controller (PLC) Programming experience, etc.) all covered in detail later. Your value you bring to an employer is your familiarity to the plant process and the knowledge you would of learned on the job by necessity.
Where do I apply for automation and controls engineering jobs?
If you are lucky enough to live in a major US city, you likely have a few local “integrators” that have established an engineering headquarters in your immediate area. “Integrators” are companies that generally work independent of a specific manufacturing plant and service a wide range of customers across the country or even globe. Integrators generally serve two groups of offerings: to quote, engineer, design, program, install and commission new or existing processes or to focus on industry service generally with a 24 hour support structure where engineers are for-hire on an as-needed basis. These engineers are well traveled and go to where the work is which can be local, regional or global. This specific service is in HUGE demand due to the flexibility and travel requirements.
A second (or third) avenue for automation and controls engineering is the manufacturing plant approach where you will work on an engineering team at a local manufacturing facility. These engineers are tasked to become “machine owners” and will be in charge of suggesting maintenance, evaluating performance, tweaking performance and the general upkeep and conditioning of the machine or process from a technical perspective. The term “continuous improvement” comes to mind to explain the day-to-day activities of these specific engineers. Although this is a solid path to automation or controls engineering, you can sometimes limit your vertical ability as companies can be difficult to move around in depending on job title, qualification, ability, etc.
What kind of salary should I expect as an Automation or Controls Engineer?
Salary is largely dependent on your location and ability. As a senior automation or controls engineer, you can expect your salary to max out anywhere from $100,000 to $120,000 a year. The average salary according to glassdoor is $79,609 a year (Source) . If you are looking to be on the higher end of salary, you are going to need to strategically move around to get to those next levels of pay. From my experience, you will have a very hard time starting at one salary and ending up where you want to be. From personal experience, to make those pay bumps you will sometimes need to move to a different department or company who is willing to take that next investment. This is especially true for new graduates out of college!
In conclusion these would be the basics to understand when looking to become an automation or controls engineer. Whether you plan to pursue an internship with an integrator or to go work for an industrial manufacturer, you will still need to make sure you have completed the right schooling (or in some cases, have the right experience) to apply for the job you want. The industry itself is always changing and you will have the opportunity to learn daily, so if you are somebody who enjoys electronics, computers and how stuff is made, this is the job for you! Thanks for reading! Please reach out with any specific questions or please comment below!
This is a introduction video on how to create a SD card image with a 1784-SD1 and any of the CompactLogix series processors. This is a must-know in your repository of knowledge on how to easily and quickly create a backup of your PLC processor to either load when a process fails or when you purchase a new processor out of the box. This can save you hours of unnecessary work by allow you to commission a new processor directly out of the box with a IP Address, PLC Program and Firmware version. No more need to get on RSLogix/Studio and do each step manually.
Create a SD card Image for CompactLogix series processors for backup and restore purposes
Obtain either a Allen Bradley 1784-SD1 (1GB) or 1784-SD2 (2GB) and insert into processor
Depending on the application size, you will need to purchase either a 1784-SD1 or 1784-SD2 SD memory card from Allen Bradley. Unless you are storing additional items on the memory card I have not seen a actual need for the 2GB 1785-SD2. Once you have the card, insert it into the processor SD card slot (can be done under power)
Open Allen Bradley RSLogix/Studio 5000
You can do this with either RSLogix or Studio 5000; there is no real difference in respect to this tutorial. I will be using Studio 5000 because of the specific version of firmware I am using; Version 28.
Go online with your CompactLogix processor
The next few steps can only be done while online with the processor. This makes sense because the processor itself is the piece of hardware that is making the SD card image.
Place controller in program mode
You can do this via the online interface (if your key switch is in remote) or by moving the processor key switch to “PROG” or program mode
Go to controller properties
Right click on your projects controller and go to “properties”
Go to Nonvolatile Memory tab
On the properties menu, click the Nonvolatile Memory tab
*TIP* If “Load/Store” is grayed out (cannot click) make sure that you have an official Allen Bradley SD memory card installed in the processor, you are online with the project/processor and the processor is in program mode; see step 4 above.
Configure SD Card image settings
This will be the meat of your configuration. There are many options for you specific to what you are trying to do with the SD card image. Under the controller section, you will see your project name, processor type, current revision number and some user configurable input fields, Load Image, Load Mode, and Image Note.
On Power Up – Load image at next power up event On Uninitialized Memory – Load image when no program is present (new processor, failure, etc) User Initiated – Load via Nonvolatile dialog box
Run (Remote Only) – Processor will boot into run mode (only if processor key is in the REM position) Program (Remote Only) – Processor will boot into program mode (only if processor key is in the REM position) Image Note:
A Description of the image you are creating.
Enable/Disable Automatic Firmware Update
If you enable this feature, the SD card will store the processor firmware version to be loaded upon next event. This is a great way to commission a new “out of the box” processor from firmware version 1 up to whatever version you are using in your application/program.
After you have set up desired configuration, select “<– Store”
Select the “<– Store” button indicating you are ready to create the SD card image
Yes to accept risk
You must accept the risk of placing the processor in STOP mode (although I think this is mildly redundant due to the processor already needing to be in program mode to get this far)
Yes to not including modules in firmware update
This screen appears mainly to let you know the processor specific features of the built-in IO will not be included in the SD firmware image. I believe this is to account for small differences in versioning between processor types. You can essentially ignore this and select “Yes”
The processor will now create image your configured image
Your project will now go offline and the processor will reboot into a memory store procedure. The “OK” and “SD” LED’s on the processor will blink together as the SD image is created. Once the image has been successfully created, the processor will reboot back into the mode selected by the key switch. Once the processor has returned to Run or Program the SD card image is complete.
Remove SD Card from Processor
At any point you can remove the SD card form the processor. You have have created a SD card image.
*WARNING* You are now holding a potential major disruption to a processor. If you selected to load image on boot with firmware, you will completely erase any processor specific data upon power up of any processor this SD card is placed in.
Just for you! Take an extra $25.00 off any order over $1,000.00 with coupon code "25OFF1000"! Thanks for helping us build the internet's #1 Automation Supplier! Dismiss