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.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


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

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old January 10th, 2018, 09:39 PM   #1
Austin1985
Member
United States

Austin1985 is offline
 
Join Date: Mar 2016
Location: Indiana
Posts: 17
ControlLogix Timer Accuracy

Hello!

How accurate would someone say a timer is in a L71 PLC?

I'm tasked with displaying a total water pumped using a flow meter over X time. The unit in GPM, if I capture the flow every one second and add each value until the end of the flow time, then divide by 60, that should be my total water pumped.

If I want to be more accurate, maybe I could capture the flow value every 500ms with a little more math. This would net me double the resolution. What if I went every 50ms?!? The scan of the program is going to limit me at some point..

I hope this interest anyone... Thanks!
  Reply With Quote
Old January 10th, 2018, 10:01 PM   #2
GaryS
Member
United States

GaryS is offline
 
GaryS's Avatar
 
Join Date: Aug 2003
Location: Lancaster Pa.
Posts: 816
The PLC timers are very accurate 1 sec or 500ms should work fine for you.
but don't surprised if the accrual time may be a little longer than the preset 1 or 2 ms
due to program execution time - scan time but with scan times in nano sec range the difference would not be noticeable.
  Reply With Quote
Old January 10th, 2018, 10:07 PM   #3
damica1
Member
United States

damica1 is offline
 
Join Date: Aug 2015
Location: Illinois
Posts: 596
Here's how I would probably approach this. Most of the Flow meters that I work with have a build in pulse per gallon(this is programmable). So I may have this flow meter setup to pulse ever 1000 gallons or 100 gallons or even 10,000 gallons. I then just count the pulses over a set period of time let's say 1 hour, so if I get 37 pulses over that hour and I have the flow meter set at 1 pulse equals 100 gallons I would times 37 by 100 and that would give 3700 gallon over that hour.

Thats how we would probably do it.
__________________
David M. Camp

Marshall Electric / https://mei-tech.com/monitor-and-control

Please Download from our download section "Monitor and Control" .pdf.
  Reply With Quote
Old January 11th, 2018, 08:19 AM   #4
cardosocea
Member
United Kingdom

cardosocea is offline
 
Join Date: Nov 2016
Location: Fields of corn
Posts: 1,121
Quote:
Originally Posted by damica1 View Post
Here's how I would probably approach this. Most of the Flow meters that I work with have a build in pulse per gallon(this is programmable). So I may have this flow meter setup to pulse ever 1000 gallons or 100 gallons or even 10,000 gallons. I then just count the pulses over a set period of time let's say 1 hour, so if I get 37 pulses over that hour and I have the flow meter set at 1 pulse equals 100 gallons I would times 37 by 100 and that would give 3700 gallon over that hour.

Thats how we would probably do it.
Depending on the flowmeter, it can be an additional cost to get the pulse signal. But this is the way to go... even better is if you have a frequency counter input in your plc in which case you don't have to worry about missing a pulse or anything like that.
  Reply With Quote
Old January 11th, 2018, 02:01 AM   #5
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,407
Quote:
Originally Posted by Austin1985 View Post
Hello!

How accurate would someone say a timer is in a L71 PLC?

I'm tasked with displaying a total water pumped using a flow meter over X time. The unit in GPM, if I capture the flow every one second and add each value until the end of the flow time, then divide by 60, that should be my total water pumped.

If I want to be more accurate, maybe I could capture the flow value every 500ms with a little more math. This would net me double the resolution. What if I went every 50ms?!? The scan of the program is going to limit me at some point..

I hope this interest anyone... Thanks!
If you want to be more accurate, then bypass the inherent inaccuracy of scanned timers by putting your accumulation code in a periodic task, no timers needed.

Periodic Task execution is not dependent upon the scan time of the Continuous Task, and will be "fired off" at the pre-defined periodic interval.

If you already have other periodic tasks, then you can achieve maximum accuracy by giving the accumulating task the highest "priority" (lowest number). This will have an impact on the tasks with lower priority, so you do need to check what those other periodic tasks are used for. Tasks with equal priority are "time-sliced", so the tasks appear to run concurrently.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old January 11th, 2018, 05:37 AM   #6
hagos
Member
Sudan

hagos is offline
 
Join Date: Oct 2004
Location: Africa
Posts: 212
Hello Guys,
Yes Daba is right, in PLC , event driven tasks are more accurate then time driven.
  Reply With Quote
Old January 11th, 2018, 08:36 AM   #7
proof
Member
United States

proof is offline
 
Join Date: Jan 2014
Location: Illinois
Posts: 153
Quote:
Originally Posted by Austin1985 View Post
Hello!

How accurate would someone say a timer is in a L71 PLC?

If I want to be more accurate, maybe I could capture the flow value every 500ms with a little more math. This would net me double the resolution. What if I went every 50ms?!? The scan of the program is going to limit me at some point..
Timers aren't very accurate if you let them run, time out, trigger your calculation, then reset them and start over. The time between the reset and restarting is 'lost', and can add up, especially if you are trying to run it every 50 ms. The better way is to use periodic tasks as others have indicated.

As far as your totalizing, you need to be careful that your totalizer does not overflow, or that the totalizer value does not get to big and then the addition value be too small to increase the total. There is a built in totalizer for function blocks that uses double precision floats that helps prevent this problem.
  Reply With Quote
Old January 11th, 2018, 09:39 AM   #8
JeremyM
Member
United States

JeremyM is offline
 
Join Date: May 2014
Location: Texas
Posts: 357
Timers within the continuous task drift, and more noticeably so as the task becomes populated with more complex programs (leading higher scan times, generally). Accessing the controller’s real-time clock in a periodic task is my approach.
  Reply With Quote
Old January 11th, 2018, 10:49 AM   #9
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 391
While the OP question was about the accuracy of timing capability of the L71 processor, it is in the context of accurately totalizing (integrating) a sampled input signal. I would say that the error contribution of the software technique to the totalized result is negligible compared to instrumentation, wiring, analog/digital conversion, filtering, etc.

Using a totalizer pulse avoids some of these error contributions, though accuracy still depends on the instrument capability to accurately generate pulses. So, as pointed out, this is a preferred method if it is available and the continuous signal is not needed. Or use both as inputs to the PLC if desired.

If going down the route of totalizing an analog input, you will want to consider how that signal is filtered by the instrument and/or PLC input in determining the timer/task period. There is not much point in sampling at 50 ms if there is a filter time constant of 5 seconds, unless you need the totalized value to update that often. Likewise, a really slow sample period on a noisy input could produce less stable result.
  Reply With Quote
Old January 11th, 2018, 11:06 AM   #10
cardosocea
Member
United Kingdom

cardosocea is offline
 
Join Date: Nov 2016
Location: Fields of corn
Posts: 1,121
Quote:
Originally Posted by Mispeld View Post
While the OP question was about the accuracy of timing capability of the L71 processor, it is in the context of accurately totalizing (integrating) a sampled input signal. I would say that the error contribution of the software technique to the totalized result is negligible compared to instrumentation, wiring, analog/digital conversion, filtering, etc.

Using a totalizer pulse avoids some of these error contributions, though accuracy still depends on the instrument capability to accurately generate pulses. So, as pointed out, this is a preferred method if it is available and the continuous signal is not needed. Or use both as inputs to the PLC if desired.

If going down the route of totalizing an analog input, you will want to consider how that signal is filtered by the instrument and/or PLC input in determining the timer/task period. There is not much point in sampling at 50 ms if there is a filter time constant of 5 seconds, unless you need the totalized value to update that often. Likewise, a really slow sample period on a noisy input could produce less stable result.
I think your comment is assuming that the analog signal isn't changing. Not considering filtering, if the signal barely changes, then the integration error will be near zero. If the signal is changing constantly, the integration error may very well be worse than all the contributors combined.
  Reply With Quote
Old January 11th, 2018, 11:42 AM   #11
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 391
Quote:
Originally Posted by cardosocea View Post
I think your comment is assuming that the analog signal isn't changing. Not considering filtering, if the signal barely changes, then the integration error will be near zero. If the signal is changing constantly, the integration error may very well be worse than all the contributors combined.
This is true with respect to part about favoring a totalizer pulse over integrating a sampled analog input. But the main point I was trying to make is error related to measuring the physical process (i.e., liquid flow through a pipe) will likely be much greater than error from the final computation of rate to volume. This will be significantly impacted by flowmeter technology and attention to detail in the measurement. And there could be a case where the process conditions and instrumentation technology are so good as to elevate integration error to significance.
  Reply With Quote
Old January 11th, 2018, 12:04 PM   #12
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,407
Counting pulses from a flowmeter is always going to give you the best accuracy, as it is solely dependant upon 1 thing, the flowmeter itself. No other factors can cause any errors.

But if a flowmeter volumetric pulse is not available, then you must eliminate any areas of uncertainty, which would lead to an incorrect totalisation.

The worst of these potential errors is a noisy analog signal. These can often be filtered by the analog input card itself, sometimes external filtering eg. a large value capacitor across the input, or by internal filtering, using any one of a number of filtering algorithms.

One method I have used on numerous occasions is to sample the analog reading into a "shift register" periodically. As each reading is "shifted in", the oldest is lost. Then the software copies the shift register array to another, sorts it ascending value order, then the average is taken of the sorted array, excluding the lowest (first) and highest (last) values. How many values you exclude at each end determines the aggressiveness of the filtering, but I have never used more than 2 at each end. Typically the shift register for storing the readings is 20 readings.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old January 11th, 2018, 12:48 PM   #13
Austin1985
Member
United States

Austin1985 is offline
 
Join Date: Mar 2016
Location: Indiana
Posts: 17
Lots of input here. Thanks everyone!

The flow meter does not have any output pulse that can be utilized. The system is all built, and I don't wish to add a periodic task, but I may have to. Noise over wires could be a problem. I'll build what I can and I'll see what it does.

Also, this is a quench, so I'm only looking at the signal for about 10 seconds. The first second of that is crazy noisy because the water shifts from a bypass valve into the tool, and it takes a bit to settle down. It sounds to me like the current meters and mechanical setup may not be well fitted for totaling.

Again, Thanks!
  Reply With Quote
Old January 11th, 2018, 01:05 PM   #14
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,407
Quote:
Originally Posted by Austin1985 View Post
Lots of input here. Thanks everyone!

Also, this is a quench, so I'm only looking at the signal for about 10 seconds. The first second of that is crazy noisy because the water shifts from a bypass valve into the tool, and it takes a bit to settle down. It sounds to me like the current meters and mechanical setup may not be well fitted for totaling.

Again, Thanks!
The highlighted will inevitably be your downfall. Not even an expensive flowmeter can cope with what you describe.

Do you want to know how much water was used in the quench ?

Or,

Do you want to control how much water is used in the quench ?
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old January 11th, 2018, 02:17 PM   #15
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 391
Quote:
Originally Posted by Austin1985 View Post
Also, this is a quench, so I'm only looking at the signal for about 10 seconds. The first second of that is crazy noisy because the water shifts from a bypass valve into the tool, and it takes a bit to settle down.
If I were faced with this measurement task, which sounds like total volume for a short-duration flow event, I would go ahead and try the existing setup with a "field calibration" if practical. By this, I mean setting up a method to capture the total volume of dispensed fluid for a typical quench event, and then correlate actual quench volume with the PLC-computed volume. Then use this relationship to correct the PLC result after the quench is complete.

This would likely give decent results assuming there is nothing terribly wrong with the existing setup (e.g., flowmeter type, flowmeter installation, valve positions, wiring), and other process variables (e.g., fluid pressure, restrictions, nozzles) are reasonably consistent over time.

If taking this approach, capture the fluid using quench periods in the range of typical operation. For example, if it is typically 9 or 10 seconds, capture the fluid for 8-, 9-, 10-, and 11-second quench events. Carefully measure the captured volume and record the PLC-computed quench volume for each test. If possible -- not too expensive or time consuming -- do a couple repeats.

Then use the a spreadsheet to plot the actual volume against computed volume to get a correction equation. MS-Excel is very convenient for this.

Finally program the correction equation in the PLC to correct the flowmeter-measured volume after each quench event. As long as the events are not too far out of the tested time range (and other assumptions hold), the corrected result should be somewhat accurate.

I am assuming quench time is the variable and others stay constant. If time is constant and, say, pressure varies, you would do the same but with different pressure settings.
  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
timer issue in simatic step 7 juzeko LIVE PLC Questions And Answers 10 September 6th, 2009 08:27 PM
Storing Timer ACC Krilun LIVE PLC Questions And Answers 5 September 23rd, 2008 01:25 PM
Simple Omron timer question PLCDontUQuitOnMe LIVE PLC Questions And Answers 3 July 24th, 2008 04:20 PM
A plea for help...and mentor damianjones LIVE PLC Questions And Answers 72 February 7th, 2007 12:10 PM
Timer ?!?.?!?. My Name LIVE PLC Questions And Answers 6 June 24th, 2004 02:04 PM


All times are GMT -5. The time now is 10:55 AM.


.