Sign in to follow this  
Followers 0
professor_jonny

code optimisation steps vsr FB memory

3 posts in this topic

I'm looking for a way to optimise memory in a cp1l plc as I have run out of steps (UM) memory to fit my program.

I have heaps of fb memory as im not using many function blocks am I able to trade on for the other to fit a bigger user program in some how?

Will coding in function blocks reduce the amount of steps in the program as from a quick play FB use steps when they are posted in the user program but I don't know which is less memory hungry it seems fb actually consume more memory.

 

 

 

Share this post


Link to post
Share on other sites

I don't think using FB will help reducing your UM... It may reduce some, but the difference is barely noticeable.
The FB memory provided is mainly for the FB Definition only. When you are creating a FB instance, some part of UM will be occupied by that instance.

Share this post


Link to post
Share on other sites

If it works like most PLCs, then writing function blocks instead of writing repetitive code does in fact save memory.  Rather than write the same logic 10 times, write it once as a function block and call it 10 times.

Not much help if the code inside the function block is 1 or 2 rungs, but if you have a lot of repetition you may want to consider it.

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