Writing ladder diagram logic to take average value.

alhasas96

Member
Join Date
Nov 2012
Location
manama
Posts
3
I need someone help to write a ladder logic in PLC 5 to take an average of 8 input values within 2hrs of an analogue input connected to channel one (N27:50). The final average reading value need to be moved to N10:5 for display purpose.
 
Simple. Set up a self-resetting timer with a preset of 15 minutes. Every time the timer times out, add the value of N27:50 to an available register to hold the accumulation values, and increment a counter with a preset of 8. When the counter finishes, Divide the number in that accumulation register by the Preset of your counter, and place the results in N10:5. Also, reset the counter and move a zero into the accumulation register.
 
See this thread for another program showing how to use a FIFO and a circular queue to compute an average.
http://www.plctalk.net/qanda/showthread.php?p=260919#post260919

He doesn't need a rolling or circular average.

His assignment is to take 8 readings only, assumed to be equally spaced over 2 hours, then average the 8 readings into N10:5 = the "final average".

I think if you send him off to read up about rolling averages you'll just confuse him further.
 
284040736-axebuilder-albums-miscellaneous-picture52670-holy-thread-resurrection-batman.jpg


Holy thread resurrection batman. Daba, the post you are replying to is at least 7 years old. Thread resurrected by a new user asking for homework assistance without specifying any details.



Coljoy, may I suggest you start a new thread for your question, then specify the details of your assignment and show us what you have so far. Plenty of people willing to help you out here, but we won't do your homework for you. You will most likely be asked to do the majority of thinking, no point in us doing the leg work as you will learning nothing from that.
 
I need 2 ladder programs for a collage assignment


1.
Code:
   IN    OUT

---] [---( )---
2.
Code:
   OneSecondCounterBit      OnsStorage    1sOneShot
--------] [-------------+-------]/[----------( )------+---
                        |                             |
                        |   OnsStorage                |
                        +-------( )-------------------+


      1sOneShot  OUT       OUT
---+----] [------]/[---+---( )---
   |                   |
   |  1sOneShot  OUT   |
   +----]/[------] [---+
 
Holy thread resurrection batman. Daba, the post you are replying to is at least 7 years old. Thread resurrected by a new user asking for homework assistance without specifying any details.

GUILTY AS CHARGED ! :sick:

Although in my defense I should have said that the colour scheme for the post headers is not a good combination for me. I've never thought to ask for a "better" combination, which might be "worse" for others ....
 
Last edited:
284040736-axebuilder-albums-miscellaneous-picture52670-holy-thread-resurrection-batman.jpg


Holy thread resurrection batman. Daba, the post you are replying to is at least 7 years old. Thread resurrected by a new user asking for homework assistance without specifying any details.



Coljoy, may I suggest you start a new thread for your question, then specify the details of your assignment and show us what you have so far. Plenty of people willing to help you out here, but we won't do your homework for you. You will most likely be asked to do the majority of thinking, no point in us doing the leg work as you will learning nothing from that.
your 100% right I have 3 out of 5 questions done I will make an attempt at q4 but q5 is something we just glanced over and with Covid it was all done from home our lecturer advice was for q5 was "remember we talked about latching that's it lol im in a class of 14 and we are all stumped
 
GUILTY AS CHARGED ! :sick:

Although in my defense I should have said that the colour scheme for the post headers is not a good combination for me. I've never thought to ask for a "better" combination, which might be "worse" for others ....

Its an age thing :p
 

Similar Topics

so, im interested in hearing some secret tips people may use to stay organized and on task when writing a program from scratch. I do the typical...
Replies
12
Views
3,598
Hi all. Sorry for the mayby extreme newbee questions writing Mitsubishi ladder code but there are something I can't figure out :-) I have a demo...
Replies
6
Views
4,329
Hi , I am sure this has been addressed on this site already. I would like to ask the senior members for advice on how they write programs. I am...
Replies
16
Views
6,943
Hello all, Can I request help on writing LD on this forum. I have a three way switch that's going to the plc to run my motor cw, ccw, and reverse...
Replies
4
Views
4,514
is it proper to branch around a timer with a latching bit instead of writing a new rung ?
Replies
31
Views
7,563
Back
Top Bottom