Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Step 7 FC for averaging analog values

Status
Not open for further replies.

NickA

Mechanical
Aug 25, 2003
13
0
0
US
Does anybody know if there is a pre-written FC used for averaging a group of analog values on a continual basis?

I have an application where I have qty. 12, 4-20mA signals being input to the PLC (CPU 313C). I need to compare each of the values to the average of them all on a continuous basis.

I am using this as a feedback system to synchronize 12 machines by momentarily shutting off flow control valves if one machine is running faster than the average (by a predetermined amount).
 
Replies continue below

Recommended for you

Switch your LAD editor to STL View and try this:
Code:
L input1 //input1, input2 ... to be repleaced with actual
ITD      //addresses or symbols
//-------------
L input2
ITD
+D
//-------------
//part between dashed lines to be repeated 
//until you use all inputs


L 12
/D
T average //here is your average



Regards,

Jacek

Do it right or don't do it at all.
 
Status
Not open for further replies.
Back
Top