# Losing RAPID code when synchronising

**URL:** <https://tech-community.robotics.abb.com/t/losing-rapid-code-when-synchronising/7754>\
**Category:** RobotStudio\
**Tags:** rapid-code\
**Created:** [June 2, 2017, 9:15am UTC](https://tech-community.robotics.abb.com/t/losing-rapid-code-when-synchronising/7754 "2017-06-02T09:15:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jake\_g](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jake\_g](https://tech-community.robotics.abb.com/u/jake_g)\
**Post date:** [June 2, 2017, 9:15am UTC](https://tech-community.robotics.abb.com/t/losing-rapid-code-when-synchronising/7754/1 "2017-06-02T09:15:01Z")

</div>

When I use the rapid editor to edit the code (targets, moves, add setDO, waitDI, waitTime etc.) and then synchronise to station, it does not seem to update the procedures to fully match the rapid code. When I synchronise back to rapid, I then lose some of the lines I originally added in rapid. The moves only remain. Do I have to add action instructions separately in both the station and the rapid editor?

---

<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:** [June 2, 2017, 12:08pm UTC](https://tech-community.robotics.abb.com/t/losing-rapid-code-when-synchronising/7754/2 "2017-06-02T12:08:13Z")

</div>

Hi,  
For instructions to be synchronized they must be defined in Instruction Templates in the station.  
To add instructions, open the Instruction Templates editor, click Add and select the desired instruction. (This applies to RS 6.05 which has a much improved editor.)

Regards,  
Johannes

---

<div class="post-metadata">

**Author:** ![daguilar](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/daguilar/32/808_2.png) [@daguilar](https://tech-community.robotics.abb.com/u/daguilar)\
**Post date:** [June 2, 2017, 2:58pm UTC](https://tech-community.robotics.abb.com/t/losing-rapid-code-when-synchronising/7754/3 "2017-06-02T14:58:14Z")

</div>

> [@jake\_g](#):
>
> When I use the rapid editor to edit the code (targets, moves, add setDO, waitDI, waitTime etc.) and then synchronise to station, it does not seem to update the procedures to fully match the rapid code. When I synchronise back to rapid, I then lose some of the lines I originally added in rapid. The moves only remain. Do I have to add action instructions separately in both the station and the rapid editor?

I had same problems since long time ago. The thing is that the “virtual” robot in the station can’t run many things ,like triggers for example. Then, if you have a Trigger in your RAPID code, and synchronize to the station it won’t appear there, that’s why when you sinchronize back to the controller, the Trigger will disappear from your RAPID code… It took me a while understand how this work and now I am used to create a TeachingModule with MoveJ of all the targets to teach them in the station.

---

<div class="post-metadata">

**Author:** ![jake\_g](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jake\_g](https://tech-community.robotics.abb.com/u/jake_g)\
**Post date:** [July 31, 2017, 11:04am UTC](https://tech-community.robotics.abb.com/t/losing-rapid-code-when-synchronising/7754/4 "2017-07-31T11:04:38Z")

</div>

Thanks for your replies. Currently I keep losing ‘MoveL offs’ commands when I sync from RAPID to station and back again. I cannot find this in the Action Instruction drop down list in the Instruction Templates.

---

<div class="post-metadata">

**Author:** ![svoldgaard](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/svoldgaard/32/3334_2.png) [@svoldgaard](https://tech-community.robotics.abb.com/u/svoldgaard)\
**Post date:** [July 31, 2017, 1:20pm UTC](https://tech-community.robotics.abb.com/t/losing-rapid-code-when-synchronising/7754/5 "2017-07-31T13:20:13Z")

</div>

I’m also just using a dummy module, to sync all the targets. Then I create my actual code in the rapid editor.  
The simulator still works as it should.

---

<div class="post-metadata">

**Author:** ![jake\_g](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jake\_g](https://tech-community.robotics.abb.com/u/jake_g)\
**Post date:** [July 31, 2017, 1:24pm UTC](https://tech-community.robotics.abb.com/t/losing-rapid-code-when-synchronising/7754/6 "2017-07-31T13:24:13Z")

</div>

Can anyone explain further how best to utilise a dummy module?

---

<div class="post-metadata">

**Author:** ![graemepaulin](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@graemepaulin](https://tech-community.robotics.abb.com/u/graemepaulin)\
**Post date:** [July 31, 2017, 7:50pm UTC](https://tech-community.robotics.abb.com/t/losing-rapid-code-when-synchronising/7754/7 "2017-07-31T19:50:01Z")

</div>

I simply have a path in the station that contains all my robtargets (Robtargets have to be in a path to be able to be synchronized) - it does not matter what type of Move, zone, velocity, etc you use for each of the Robtargets in the path.

When I Sync this path to the Virtual Controller it goes into a separate (dummy) Module so it does not get mixed up with the real Rapid code (you can select what module the Path gets Synchronized to in the Sync dialogue box).
