Calculating flow from analog input

O

Thread Starter

outacontrolman

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
 
R
"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
 
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.
 
8
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)
 
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
 
Top