# Vary Large RAPID code

**URL:** <https://tech-community.robotics.abb.com/t/vary-large-rapid-code/8411>\
**Category:** RobotStudio\
**Created:** [August 9, 2018, 4:06pm UTC](https://tech-community.robotics.abb.com/t/vary-large-rapid-code/8411 "2018-08-09T16:06:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![behzaddanaei](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/behzaddanaei/32/3267_2.png) [@behzaddanaei](https://tech-community.robotics.abb.com/u/behzaddanaei)\
**Post date:** [August 9, 2018, 4:06pm UTC](https://tech-community.robotics.abb.com/t/vary-large-rapid-code/8411/1 "2018-08-09T16:06:59Z")

</div>

Hi everyone,  
I have a very large RAPID code which is generated for an additive manufacturing process. The generated code is very large (it has over 170,000 MoveL commands) and when I try to load it the RobotStudio software stops working. Are there any possible solutions to this problem?

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [August 9, 2018, 5:30pm UTC](https://tech-community.robotics.abb.com/t/vary-large-rapid-code/8411/2 "2018-08-09T17:30:01Z")

</div>

What is the file size? Break it up (as logically as you can) into smaller modules. Like Data (robtargets) in one module, and so on.

---

<div class="post-metadata">

**Author:** ![soup](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/soup/32/1592_2.png) [@soup](https://tech-community.robotics.abb.com/u/soup)\
**Post date:** [August 9, 2018, 7:45pm UTC](https://tech-community.robotics.abb.com/t/vary-large-rapid-code/8411/3 "2018-08-09T19:45:56Z")

</div>

[similar question about an unfortunate pause during load/unload of modules…](https://forums.robotstudio.com/discussion/comment/27838#Comment_27838)

---

<div class="post-metadata">

**Author:** ![Johannes\_Weiman](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@Johannes\_Weiman](https://tech-community.robotics.abb.com/u/Johannes_Weiman)\
**Post date:** [August 14, 2018, 7:57am UTC](https://tech-community.robotics.abb.com/t/vary-large-rapid-code/8411/4 "2018-08-14T07:57:32Z")

</div>

There are a couple of issues.  
**RobotWare** 6.06 and lower did not handle modules with over 32768 lines correctly. This was fixed in RobotWare 6.07.  
**RobotStudio** times out while waiting for the controller to load the module. This will be fixed in the next release (6.08).

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [August 28, 2018, 6:58pm UTC](https://tech-community.robotics.abb.com/t/vary-large-rapid-code/8411/5 "2018-08-28T18:58:59Z")

</div>

Just had another idea for you while re reading this thread. Use MoveL with variable robtargets, potentially in arrays, FOR NEXT or While loops, could reduce the size of your code.
