You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old September 16th, 2020, 04:15 PM   #1
Jieve
Member
United States

Jieve is offline
 
Join Date: Feb 2012
Location: USA
Posts: 215
Correcting Analog Sensor Offsets in PLC Program

Curious, is it common to program in offsets to calibrate/correct analog sensor readings in certain applications? As an example, I have a couple flowmeters on a simple system that continuously read slightly below zero when the system is switched off (no flow), and their readings differ from each other. Is it desirable to zero these values in the program, or is it better not to do this?
  Reply With Quote
Old September 16th, 2020, 04:34 PM   #2
Mickey
Lifetime Supporting Member
United States

Mickey is offline
 
Mickey's Avatar
 
Join Date: May 2003
Location: Palmdale,Ca
Posts: 10,398
I prefer to use a "low flow cut-off" in your case.

Anything below "X" value you force the output to zero.

Applying an offset shifts the whole scale.
__________________
Mickey

If you want happiness for an hour-take a nap. If you want happiness for a day-go fishing. If you want happiness for a month-getmarried. If you want happiness for a year-inherit a fortune. If you want happiness for a lifetime-help someone else.
----- Chinese Proverb
  Reply With Quote
Old September 16th, 2020, 05:00 PM   #3
Gene Bond
Member
United States

Gene Bond is offline
 
Join Date: May 2004
Location: Indianapolis, IN
Posts: 462
I always allow for an analog calibration in the HMI, and if the scaled value < 0, then it is = 0...
  Reply With Quote
Old September 16th, 2020, 05:05 PM   #4
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,405
Quote:
Originally Posted by Mickey View Post
I prefer to use a "low flow cut-off" in your case.

Anything below "X" value you force the output to zero.

Applying an offset shifts the whole scale.

+1



Error(noise) is usually more noticiable only near 4mA.


Is error coming from meter AO or from cabling?



(And how you can know real error on 20mA if you don't know error from meter on Max flow. You would need 2nd flow meter or flow calibrator.)



Real error can be also different for 4ma and 20mA values, so for calibrate you need different offsets for min and max.



Have you checked how much AI measures off if you send 4mA and 20mA with mA calibrator directly to AI?


If you need really recalibrate 4 and 20mA values and not noise signal off, you should adjust boths sides individually and made lineanization with new values.
(Some PLCs have even calibrate on AI input cards builded)
  Reply With Quote
Old September 16th, 2020, 05:13 PM   #5
VAN
Member
United States

VAN is offline
 
Join Date: Apr 2012
Location: Wa
Posts: 349
Quote:
Originally Posted by Gene Bond View Post
I always allow for an analog calibration in the HMI, and if the scaled value < 0, then it is = 0...
I get it, but I think you open yourself for another issue.

Several sensors go OVER 20mA to say if its in an error/fault/overload, and on the flip some go under 4mA for error/fault.

If the system is off I'd probably make calibration confirm its calibrated (or you do it) and have it zero if the flow path is blocked by a valve. (This isn't the best option either because if the valve didn't actually close, the flow should give you an alarm. So maybe... setup an alarm condition but HMI just says zero to make operators happy.)
  Reply With Quote
Old September 16th, 2020, 05:15 PM   #6
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,405
Quote:
Originally Posted by VAN View Post
I get it, but I think you open yourself for another issue.

Several sensors go OVER 20mA to say if its in an error/fault/overload, and on the flip some go under 4mA for error/fault.

If the system is off I'd probably make calibration confirm its calibrated (or you do it) and have it zero if the flow path is blocked by a valve. (This isn't the best option either because if the valve didn't actually close, the flow should give you an alarm. So maybe... setup an alarm condition but HMI just says zero to make operators happy.)



Error bits are generated from raw values on AI-block, but to outside from block measuring is showing limited values.
  Reply With Quote
Old September 16th, 2020, 08:50 PM   #7
danw
Member
United States

danw is offline
 
danw's Avatar
 
Join Date: Oct 2004
Location: midwest, USA
Posts: 3,112
Quote:
Originally Posted by Jieve View Post
Is it desirable to zero these values in the program, or is it better not to do this?
In my opinion, end-users like an easy way to correct for offsets, so my answer is yes.
  Reply With Quote
Old September 16th, 2020, 09:50 PM   #8
Gene Bond
Member
United States

Gene Bond is offline
 
Join Date: May 2004
Location: Indianapolis, IN
Posts: 462
Quote:
Originally Posted by VAN View Post
<clip> So maybe... setup an alarm condition but HMI just says zero to make operators happy.)
Exactly!
  Reply With Quote
Old September 16th, 2020, 10:52 PM   #9
James Mcquade
Member
United States

James Mcquade is offline
 
Join Date: Oct 2007
Location: Tennessee
Posts: 2,897
what plc are you using?
for example, in an ab slc 503 or higher, When calibrating any signal, you need to apply the max input to the plc and get the raw data, then apply the min value and get the raw value and use the scale with parameters command.
before that command was available, i used an offset command as you stated to get zero. i have also used a fluke calibration meter to scale analog inputs/ verify calibration.
one thing that you might do is look at each wire connection. do the flowmeters act like thermocouples per say. by that, i mean that in regards to thermocouple connections, regular terminal blocks won't work, they have to be thermocouple type terminal blocks to work correctly. small things like that will introduce error in your calibration and will create the error you are talking about.
james
  Reply With Quote
Old September 17th, 2020, 12:09 AM   #10
Jieve
Member
United States

Jieve is offline
 
Join Date: Feb 2012
Location: USA
Posts: 215
Regardless of PLC I have a programmed function that reads the analog inputs and detects under/overrange and under/overflow conditions. For sensors I disable these warnings/faults if the sensor isn't currently active (i.e. pump off).



However, I have this small system with 3 pressure sensors and 2 flowmeters controlled by a Siemens S7-1200 w/ 16-bit AI, and all sensors read negative when the system is switched off. All sensors are 4-20mA. Without thinking too deeply about it, I was initially thinking that the entire scale might be off or sensors not properly calibrated or something, and thought that shifting the entire scale slightly based on the zero point on each sensor would make sense. But I haven't tried to check the inputs with a meter or calibrator or anything. Maybe the measurement reference is shifted slightly to the internal ADC reference somehow? Would have to think about this some more.



Interesting idea regarding the calibration (applying max and min values to PLC and scaling based on that). You would have to have full control over the process variable then, and have to know that accurately, no? Or I could, for example, apply 4.000mA via an external circuit to the module and read the input. I suppose that would help eliminate module error, but not sensor error.
  Reply With Quote
Old September 17th, 2020, 02:28 AM   #11
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 2,260
Most instruments have zero & span settings so it is best to calibrate the sensor before doing it in the PLC, I used to calibrate the sensor analogue output then do the same for the PLC if required. This reduces the errors through the system or at least reduces the offsets, there seems little point in having an instrument that should give 4-20ma over a range of 0-150 if it is giving -5-148 then compensating in the PLC. If the instrument has zero & span (low/high) settings get these right first, then calibrate the PLC zero & span by including the sensor this will reduce errors in both the sensor & analogue card.
  Reply With Quote
Old September 17th, 2020, 12:17 PM   #12
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,405
Quote:
Originally Posted by Jieve View Post
Regardless of PLC I have a programmed function that reads the analog inputs and detects under/overrange and under/overflow conditions. For sensors I disable these warnings/faults if the sensor isn't currently active (i.e. pump off).



However, I have this small system with 3 pressure sensors and 2 flowmeters controlled by a Siemens S7-1200 w/ 16-bit AI, and all sensors read negative when the system is switched off. All sensors are 4-20mA. Without thinking too deeply about it, I was initially thinking that the entire scale might be off or sensors not properly calibrated or something, and thought that shifting the entire scale slightly based on the zero point on each sensor would make sense. But I haven't tried to check the inputs with a meter or calibrator or anything. Maybe the measurement reference is shifted slightly to the internal ADC reference somehow? Would have to think about this some more.



Interesting idea regarding the calibration (applying max and min values to PLC and scaling based on that). You would have to have full control over the process variable then, and have to know that accurately, no? Or I could, for example, apply 4.000mA via an external circuit to the module and read the input. I suppose that would help eliminate module error, but not sensor error.

Recheck analog configuation. 1200 had some weird situation before, that selecting 0 or 4mA for minimum didn't actually affect to raw data values.


Also if your flow meters are powered from AC, then your 0VDC is usually little bit different on PLC than on flow meters out as there is 2 different power supplies involved if your mA 0VDC is connected to ground somewhere on PLC cabinet wiring.
I assume that 1200 AI cards aren't isolated between different AI channels.

Last edited by Lare; September 17th, 2020 at 12:19 PM.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
PLC Analog Input Module umrz180 LIVE PLC Questions And Answers 0 April 24th, 2016 06:31 AM
Using existing PanelView Plus 6 application with PLC program ported from MLX to CLX technolog LIVE PLC Questions And Answers 1 March 4th, 2016 04:49 PM
Mitsubishi:Problem with downloading program to Q PLC anhtuandrg LIVE PLC Questions And Answers 0 December 19th, 2015 12:48 AM
Koyo analog program Steve Ackerman LIVE PLC Questions And Answers 19 December 19th, 2005 09:49 AM
Simulator, Simulation, Shadow Code Terry Woods LIVE PLC Questions And Answers 1 January 2nd, 2005 02:40 PM


All times are GMT -4. The time now is 06:03 PM.


.