Help

Rodter

Member
Join Date
Jan 2006
Location
Alabama
Posts
23
Hello, I have got to make some program changes and I am a total loss on this one for some reason. I have got to monitor an analog input from a weight scale to make sure that the weight is dropping. If there is no weight change then the transfer pump must stop. I am using a slc 500, 5/04 processor. Any help will be appreciated.

Thanks,
 
I don't know what your other conditions are, but I would write a conditions report on what you want to accomplish. From what you have written so far, something like this.

Read analog value and store.
Wait X period of time.
Compare current analog value to last stored value.
If current value less than stored value, OK.
If = or > stored value, shut off transfer pump.
Store current analog value.
Wait X period of time. etc...etc.

If there are other conditions, say a fill pump or something that will make the weight increase, you need to disable the compare. By doing this, you have a good idea of what each step needs to accomplish and you don't get overwhelmed by the total task. Hope this helps.

Russ
 
Rodter said...
"I have got to monitor an analog input from a weight scale to make sure that the weight is dropping. If there is no weight change then the transfer pump must stop."

Basically, according to what you say, you are looking for "not dropping" in order to stop the pump. You say that if you find that the weight is NOT Dropping then STOP your Transfer Pump.

It appears to me that you are looking at the problem absolutely backwards!

According to what you say, you should be looking to see if the weight is at, or exceeding, some set-point. If the weight is less than the target value (within a certain margin) then the pump should stay on. When the weight is at the required valued, or above, then the pump should stop until the value is below the minimum value. You DO need to have a particular "range" of weight that is acceptable.

If this does not apply, PLEASE explain why.
 
Terry, sounds like you assumed he was filling the tank, to me it sounds like he is draining the tank.
When the weight stops dropping, the tank is empty or the flow path has been obstructed.
 
Rodter said:
Hello, I have got to make some program changes and I am a total loss on this one for some reason. I have got to monitor an analog input from a weight scale to make sure that the weight is dropping. If there is no weight change then the transfer pump must stop. Thanks,

I dont know the AB instruction set but here's the general idea to see if the weight is moving (regarless of position):

1)At the end of the code cycle you must save the the current analog value to a user memory called "Last Scan Value"

2)Then somewhere above that, you need to compair the current value to the "Last Scan Valve". The comparison is to determine if the "Last Scan Value is less then, equal to, or greater then. Take the approperate action (output to the pump control).

On each scan the analog input will update. But if you save & retain the value of the analog device at the end of the program, the saved value will remain static, while the current input value will change with the float position. So on the following scan you can compair the two values to detect a change and detect the direction of the change.

HOWEVER: It would seem to me from your description, that you actually want to maintain a particular level in the tank??

If that's the case then you must determine what's the value range of the analog device that you wish to remain in. Presuming that the higher value = higher level, then You need TWO presets. Preset 1 = stop pump, & Preset 2 = start pump. Preset 2 will be a lower number then Preset 1. Simply turn on & latch the pump when your analog input value is at or below preset 2, and turn it off when it reaches Preset 1.
 
Last edited:
Ken,
I believe you are correct.

Mike,
There must be a significant time-delay between readings. In most cases, the PLC can read the internally converted/stored analog value faster than the analog card can update that value.

If a PLC has a 10-mSec scan-time and the analog card takes 35-mSec to update the analog reading then it takes 3-1/2 scans to get the next update. Between updates the value will remain the same. Multiple readings of that value, between updates, will give the impression that the value has stopped changing... at least for three scans.

The typical scheme to ensure reading a valid update is to add a delay equal to at least two analog card update periods. In this example, that would be at least 70-mSec.

However, even that doesn't ensure that the reading can be properly interpreted.

Just as an extreme example...

If the pump transfers 8-ounces per second, and scan-time is 10-mSec, then that would be 8-ounces per 100 scans => .08-ounces per scan.

If the delay between readings (as determined by the analog update period) is 70-mSec then the expected weight change per reading would be .56-ounces.

If the maximum weight is something like 500-pounds, then that would be 500-pounds x 16-ounces per pound => 8000-ounces.

The analog card has to be able to handle the entire weight range. If the analog card is capable of 8000 discrete indications, then the card has a resolution of 1-oz per count. Since the weight is changing at the rate of .56-ounces per update, then the analog card will not be able to indicate a change until the weight has changed by at least 1-ounce.

That means that there must be an additional delay between readings. In this case, the delay must be increased to approximately 140-mSec.

The values used in this example might be way out of line. However, I used them simply to make the point that the resolution of the analog card and the expected rate of change plays a role in determining what the delay should be.
 
I have got to monitor an analog input from a weight scale to make sure that the weight is dropping. If there is no weight change then the transfer pump must stop.


Terry,

Info is scant so we are all assuming the application is as we personally interpret the post.
On a re-read of this it seems that he just wants to pump the tank dry then stop the pump. It also seems the analog device is already being used for level measurement by weighting the tank. IF my interpretation is correct, then adding a short off delay to eliminate chatter to my method would have the desired result.

 
Mike,

You were suggesting a scan-to-scan comparison. I tried to explain in my post why a scan-to-scan comparison would not work.

As you agreed, your scheme would work if there was a delay between comparisons.

However, anyone can just add a delay, and make it longer and longer until the damned thing works... I simply indicated those factors that actually determine what the minimum delay needs to be. Knowing why the delay needs to exist at all helps to understand what needs to be done.

Because the PLC scan-time is typically much shorter than the analog update time, the PLC would read the the same last updated value for several scans. It would not do to have the pump controlled on that basis. The pump would be going OFF when perhaps it shouldn't. Then, depending on how the scheme was coded, the pump might be going OFF and ON every several scans... not good.

I then tried to explain why basing the delay time on the analog update time alone might not be adequate.

Depending on the range of possible weights and the range of counts available in the analog card, the resolution might be on the order of fractions of pounds (if not whole pounds) instead of fractions of ounces. In that case, it would take a number of analog updates before a change in weight is indicated.

The final delay value will usually be unique to the particular system - not the particular brand of PLC, but rather, the particular process. Since analog update times are usually fixed, it is usually the case that the Jokers in the Deck are Scan-Time and Resolution.
 
Hi Guys, Rodter never answered any of your question, so I don't know what he wants either. Just guessing, with the slc he would set full scale of weight to an analog value of 32767(max value) and min weight to 0, or reversed. The resolution would be weight/32767.

Joined yesterday, have really enjoyed this site.
 
TSmith said:
Joined yesterday, have really enjoyed this site.

Welcome to the site :D , everyone here is very nice (all but Terry he's a grumpy old man)

There is a good mix of talent here, guy's on the other side of the pond and the land down under to the land above, they are all very helpful, even Terry
 
"The resolution would be weight/32767."

It's nice to know that the range has been extended. That wasn't the case not too long ago. But then, if the analog signal is 4-20mA (typical), and the maximum is 32767, then isn't zero represented by 6553.4?

If so then the correct resolution would be "weight/(32767 - 6553.4)".

Some PLCs (i.e., some analog modules) use 32,000 as max and 6400 as zero, where 6400 = 4-mA and 32,000 = 20-mA. The numbers just work out better... integer-wise. Not all PLCs, with analog inputs, use Real-Math.

Oh... and thanks GIT... I think... maybe.
 
Thanks,

I've got to find a neat signature like your's, Mark.

Terry, My only experience is with AB Logic..
I have programs with analog i/o scaled 0=4ma 32767=20ma. Thou I do usually use 32000 as upper limit, especially presets counter/timer. I hate faults.
I appreciate all advice and help. Technology is a great thing.

Do people often ask for help and never show up again?
 
TSmith said:
Do people often ask for help and never show up again?


That would be only if I TRIED to help them :oops: , sometimes I type faster then I think...or I'm just to happy about helping someone, so I blurt out a answer...
 
TSmith,

I think you might be mixing things up a bit...

You said...
"I have programs with analog i/o scaled 0=4ma 32767=20ma."

The normal relationship is like this...


Eng'r min max
Units - units ????? units

mA 0 4 "X" 20

Count 0 6,400 "Y" 32,000



It sounds like you are relating the 4mA to "0" Engineering Units, and the 20mA to the maximum count - not the maximum units.
 

Similar Topics

I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
268
Hi all I need help on this As in my project used Schneider TM241 controller. Now I want to communicate Elite energy meter with controller by...
Replies
3
Views
150
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
158
Good day all! Can someone help me with the procedure to update Beijers E700 firmware? The Panel I am working on is firmware 2.04v and I would...
Replies
1
Views
62
Back
Top Bottom