Asked — Edited

What Is More Efficient?

What is more efficient using the script manager and calling individual scripts within the main script or just writing one long script containing subroutines?

I am trying to decide what the advantage of the script manager is.


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

United Kingdom
#1  

I'm no scripting expert by any stretch of the imagination, but I'd say one advantage of using a script manager over a single long script is that it's easier to manage if you need to make changes or to troubleshoot/debug. Also, parts of a long script (depending what's in it) broken down in to individual scripts could be called in using control commands for other uses. Just a thought.

PRO
USA
#2  

Thanks Steve, that is what I was thinking. I was also curious about execution speed. I was wondering if there is any processing delay using the script manager vs. a long script. I am no exert either, looking for thoughts on how others have done it and what their experiences have been.

United Kingdom
#3  

No worries. As you say, it'll be interesting to get somebody else's views on this.:)

#4  

It is much simpler to debug if you use the manager and have a script do one thing and call it from other scripts when needed. Once that script is working then you don't have to go back to it unless you need it to handle more than it did before.

United Kingdom
#6  

I always use the script manager and call each "sub script" from a "main script". This makes repetitive actions simpler and makes the entire script easier to debug.

Check my Ping Roam post for an example of how I create scripts/functions/sub-scripts.

By no means are my methods "the right way" since there isn't one, it's my way which I use since I find it works better for me. Someone else may prefer a different method.