advertisement
from the Automation List department...
Calculating flow from analog input
PLCs and related questions. topic
Posted by outacontrolman on 19 November, 2009 - 2:23 pm
I am using a Siemens 315-2DP PLC communicating via profibus to a remote with a Siemens ET200iSP IM152-1 profibus interface.

My problem is...I am using a flow meter to measure the GPM and that sends a pulse signal to a converter that changes the pulse to 4-20mA, I am running the 4-20mA into a analog card with the 315PLC, I then have a remote with a Redlion digital counter that counts up every time it receives a pulse input.

I am in need of help with making the logic to perform the calculations to exchange the 4-20mA into a pulse output for the gauge to count.

Thank you


Posted by Roy Matson on 20 November, 2009 - 3:18 pm
"I am using a flow meter to measure the GPM and that sends a pulse signal to a converter that changes the pulse to 4-20mA, I am running the 4-20mA into a analog card with the 315PLC, I then have a remote with a Redlion digital counter that counts up every time it receives a pulse input."

Why would you want to convert from Digital to Analog then back to Digital, you will get errors on both ends. Better to count the pulses and scale that.

e.g. 1xxx pulses = 1 gallon so count 1xxx then send a 1 second pulse to the red Lion counter.

If you are stuck with analog make an integrator in the PLC that rolls over at 1 gallon and sends a pulse. You need to be a bit careful to make sure it doesn't round off the units. i.e. when it rolls over the remainder needs to be the start point.

perhaps something like:
If Accumulator > 1 then pulse
Accumulator = Acumulator - 1

Depending on your flow rate you might want to scale it e.g.
If Accumulator > 100 then pulse
Accumulator = Acumulator - 100

Hope this helps
Roy


Posted by scadametrics on 20 November, 2009 - 11:16 pm
outacontrolman,

What make/model of meter are you using?

Depending upon the make/model, you may be able to adapt it so as to collect Modbus serialized data (total and flow) from the meter rather than having to deal with pulse and milliamp signals.


Posted by (8{)} (: .) on 22 November, 2009 - 9:14 am
Hate to poop on your parade but I think that this is an example of where the engineering time you spend writing what will probably be a less than accurate piece of code will eclipse the price of a different kind of display... (or perhaps the addition of a digital module at the input end...)

Just my 2 cents.

(8{)} (: .)
(Yosi)


Posted by Jan on 31 January, 2010 - 4:11 am
Dear Outacontrolman

You do as follows:
Call website "Controlwiki.com",
Select "PLC Archive",
Select "PID Control",
Select "download here",
Save the file "Blokke.zip" on your PC,
Open your Simatic Manager,
Select "File" and "Retrieve",
Browse and find "Blokke.zip",
Open OB1 and select "with comments",
Find FB119 and use your analog input as Variable and the UP/DN output as a digital converter.
Have a nice time.
Regards
Jan

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2010 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
"In order to make an apple pie from scratch, you must first create the
universe."
-- Carl Sagan, Cosmos
Advertise here
Advertisement
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive