Sign in to follow this  
Followers 0
mhowasso

Highest Integer Value

15 posts in this topic

Hi All, Using RSLogix 500 with a MicroLogix 1400.... I have 8 seperate integers (N7:0 thru N7:7) that vary from 1 to 4. How is the best way to monitor all the integers for the highest number...??? If any of the 8 have a value of 2 turn on output x. If any of the 8 have a value of 3 turn on output xx. If any of the 8 have a value of 4 turn on output xxx. Thanks Edited by mhowasso

Share this post


Link to post
Share on other sites
BST EQU N7:0 2 NXB EQU N7:1 2 NXB EQU N7:2 2 NXB EQU N7:3 2 NXB EQU N7:4 2 NXB EQU N7:5 2 NXB EQU N7:6 2 NXB EQU N7:7 2 BND OTE O:X BST EQU N7:0 3 NXB EQU N7:1 3 NXB EQU N7:2 3 NXB EQU N7:3 3 NXB EQU N7:4 3 NXB EQU N7:5 3 NXB EQU N7:6 3 NXB EQU N7:7 3 BND OTE O:XX BST EQU N7:0 4 NXB EQU N7:1 4 NXB EQU N7:2 4 NXB EQU N7:3 4 NXB EQU N7:4 4 NXB EQU N7:5 4 NXB EQU N7:6 4 NXB EQU N7:7 4 BND OTE O:XXX

Share this post


Link to post
Share on other sites
Hi, Thanks...Please look at the Rev B program attached and see if this way of turning ON only one light to represent the highest level. I would like to only have one light ON (to represent the highest level), but not sure if this will work. Thanks Again HIGHEST LEVEL LIGHT.RSS Edited by mhowasso

Share this post


Link to post
Share on other sites
Rev B Program Would this work..??? If not, what is the best way..??? Thanks HIGHEST LEVEL LIGHT REV B.RSS Edited by mhowasso

Share this post


Link to post
Share on other sites
It almost works but you need a mov 0 N9:0 as your first rung otherwise N9:0 will run away. Also it won't work in the case where they are no 1's or but 2's 3's and 4's. Also it won't work in the case where they are no 2's or but 3's and 4's. Also it won't work in the case where they are no 3's or but 4's. I've reworked it with equ in ladder 2 so it works and in ladder 3 used no equ or moves and only 4 rungs to make it work. HIGHESt_LEvel_Rev_C.RSS

Share this post


Link to post
Share on other sites
Hi Bob, Thanks for the great advice. You, Ken and Paul and others always make it look so easy. I do try and learn and remember and practice EVERYTHING that everyone posts. Just to make sure I understand your additional LAD3. Rung 0, IF any = 2, then turn ON output 4. Rung 1, IF any = 0 and 1, AND ouput 4 is NOT ON, then turn ON output 3. Rung 2, IF any = 1, AND output 4 AND output 3 are NOT ON, then turn ON output 2. Rung 3, IF any = 0, AND output 4 AND output 3 AND output 2 are NOT ON, then turn ON output 1. PLEASE correct me if I am interpreting this wrong. I also added the N9:0 = 0 when any = 0 as I think you recommended. And again..Thanks, Mark HIGHEST_LEVEL_REV_D.RSS

Share this post


Link to post
Share on other sites
Mark you ahve my LAD3 correct and it was put in LAD3 jsut to segregate it, doesn't ahve to stay there obviously. Your latest rewrite appears worthy of testing. let us know how things go.

Share this post


Link to post
Share on other sites
Hi guys, I tried to open the file but it comes up with an error Unsupported processor Please open this project with a higher version I am running v8.1 Conor

Share this post


Link to post
Share on other sites
Hi Connor, I am using RSLogix 500 Pro V8.40.00 CPR9, I dont have an earlier version.

Share this post


Link to post
Share on other sites
Bob, Why in Rung 0 do you turn ON output 4 if any are a value of 2...???

Share this post


Link to post
Share on other sites
Can all post the rung mnemonics like in post #2. Then all can replicate the program.

Share this post


Link to post
Share on other sites
FOR THOSE NOT POSESSING RSLOGIX AND WANTING MNEMONICS HERE THEY ARE FOR MY LADDER 3 NOTE THIS CODE IS SCAN ORDER SENSITIVE YOU CANNOT RUN IT ANY ANY OTHER SEQUENCE AND HAVE IT WORK. Hope this clears some things up.

Share this post


Link to post
Share on other sites
Actually I have the free version of RSLogix. With the mnemonics I could paste them into the rungs and see the answer, though I pretty well understood where you were going from the descriptions.

Share this post


Link to post
Share on other sites
Thanks Bob... This works PERFECT..!!! Again..I was making it more difficult than I should of. I never thought about using a binary weight. I have attached the final version in RSLogix 500. I know it may be a problem for those without ver 8.4 but I am not aware of how to save it in an earlier version type. If there is a way please let me know. Thanks Again for you help and patience. Mark HIGHEST_LEVEL_MONITOR.RSS

Share this post


Link to post
Share on other sites
looks nice glad it worked

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