Sign in to follow this  
Followers 0
sczot

Code performarnce comparsion

4 posts in this topic

Hello all,

this time is my question somehow theoretical, but with high practical impact.

Let asume we have simple program and we have to choose way of controling which step will be performed at time.

Another asumption would be, that steps are not as simple as those in attached pictures, and that there are actualy few dozens of them.


IMO deco version is much cleaner, easier to debug, and from what i have tried, it has lower step count when builded...

 

my question and point of debate I´ve with my colleague is: Is jump version faster (taking scan time into account) in actual real world PLC?

 

thank you for your insights

deco.PNG

jumps.PNG

Share this post


Link to post
Share on other sites

Why all the jumping in your second example ?

Connect the MOV instruction to the output of the corresponding EQ instruction instead.

Share this post


Link to post
Share on other sites
21 minutes ago, Bryll said:

Why all the jumping in your second example ?

Connect the MOV instruction to the output of the corresponding EQ instruction instead.

it is just a structure example.... each jump could be addressing "block" of tens of rungs in reality

Share this post


Link to post
Share on other sites

Posted (edited)

so after other test (encapsulating of structure into FOR/NEXT with 1000 repetitions) Jumps are clearly faster (31ms vs. 99ms)

Edited by sczot
grammar

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