Sign in to follow this  
Followers 0
Hawkmoon42

Adding integer cells

9 posts in this topic

Hi Guys I am looking for a way to add multiple intergers ie N7:1 to N7:13 or using indirect adressing N7:1 to N7:[N7:100] variable amounts If any one could let me know an easy way I would appreciate your input. Thanks Gary PS I am resonably new to PLC's but am learning fast if any one is at a simillar stage and wants to learn by discussing methods please feel free to contact me on ICQ no 311-094-848 (Hawkmoon42)

Share this post


Link to post
Share on other sites
SOR BST MOV 0 N7:100 NXB MOV 0 N7:101 BND EOR SOR LBL 0 OTE B3:0/0 EOR SOR BST ADD N7:100 N7:[N7:101] N7:100 NXB ADD N7:101 1 N7:101 BND EOR SOR LES N7:101 100 JMP 0 EOR Paste the above into RSlogix it will add integers N7:0 to N7:99 with the result appearing in N7:100

Share this post


Link to post
Share on other sites
Thanks Snerkle Where exactly do I type or paste this string It makes very little sense to me I was inclined to think you are puling my leg Gary

Share this post


Link to post
Share on other sites
Create a rung, double click on the Red box to the left of the rung, paste string into the text box that opens.

Share this post


Link to post
Share on other sites
Thanks Snerkel I am impressed. I am learning fast and thought i was doing well but that shows me I have a long way to go I dont fully understand it yet but have got the jist of it I will play around later, work it out fully and applie it to my needs thanks again, it has saved me a lot of repetative programing Gary

Share this post


Link to post
Share on other sites
I have been playing with PLCs for about 15 years and am still learning I won't explain the code, working out how it works is the best way to learn if anything really does stump you (it shouldn't) post back what you need to know.

Share this post


Link to post
Share on other sites
Thanks once more snerkel I havent had chance to play arouind yet my kids have been taking up my time i am studying Advanced PLC at Uni at present Unfortunatly our teachers dont know that much themselves they are more like facilitators As you said it is best to try as much as you can, thats the best way to learn But some times I need a few pointers You certainly gave me a good one Thanks Gary

Share this post


Link to post
Share on other sites
In a PLC5 or ControlLogix PLC you could also do it with a single FAL instruction.

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