Sign in to follow this  
Followers 0
gromit

PLC5 maximum of four timers acc strategy.

5 posts in this topic

I have four timers used in my PLC5 program and want to capture the highest accumulated value of the four, much like the processor maximum scan time, where I can manually reset it.
Is there a simple ladder logic scheme that can accomplish this with the PLC5 instruction set?
Thanks.

Share this post


Link to post
Share on other sites

Sort (SRT) instruction will do that for you.

Or sample ladder

 

See pdf(s)

sort.pdf

HIVALUE.pdf

Edited by Mickey

Share this post


Link to post
Share on other sites

Thanks Mickey...
I couldn't figure out how to make the SRT--(Sort) instruction work.
Please see the attached logic that works perfectly.

MAX_ACC_DDS.pdf

Share this post


Link to post
Share on other sites

What works is most important. And easy enough to understand.

Share this post


Link to post
Share on other sites

assume first timer is the greatest. then compare if next timer is greater, something like this:

MOV T4[1].PRE N7:0 ; assuming timer 1 ipreset is greatest, greatest value is in N7:0

GRT T4[2].PRE N7:0 MOV T4[2[.PRE N7:0 ; check if next one is greater than current maximum

GRT T4[3].PRE N7:0 MOV T4[3[.PRE N7:0 ; check if next one is greater than current maximum

GRT T4[4].PRE N7:0 MOV T4[4[.PRE N7:0 ; check if next one is greater than current maximum

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0