# how to store a triggdata type variable

**URL:** <https://tech-community.robotics.abb.com/t/how-to-store-a-triggdata-type-variable/8171>\
**Category:** RobotStudio\
**Tags:** robotstudio, robotstudio-sdk, rapid\
**Created:** [April 4, 2018, 8:43am UTC](https://tech-community.robotics.abb.com/t/how-to-store-a-triggdata-type-variable/8171 "2018-04-04T08:43:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![haining](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@haining](https://tech-community.robotics.abb.com/u/haining)\
**Post date:** [April 4, 2018, 8:43am UTC](https://tech-community.robotics.abb.com/t/how-to-store-a-triggdata-type-variable/8171/1 "2018-04-04T08:43:41Z")

</div>

I want to store a triggdata type variable , and call different triggdata in different cases, for:  
var triggdata a{999};  
var triggdata b;  
var triggdata c;  
a{1}:=b;  
a{2}:=c;  
TriggL p,v,a{1},z,t\WObj:=wobj0;

But I can;'t just use a “=” , because triggdata is NON-VALUE type, so I don’t know how to store a triggdata type, anyone knows that ? THANK YOU!

---

<div class="post-metadata">

**Author:** ![haining](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@haining](https://tech-community.robotics.abb.com/u/haining)\
**Post date:** [April 4, 2018, 8:53am UTC](https://tech-community.robotics.abb.com/t/how-to-store-a-triggdata-type-variable/8171/2 "2018-04-04T08:53:55Z")

</div>

I find a way to solve this , after TCP reached target point , triggIO will set the output , so I can use if instruction see which signal has been set, restore a num value, when I need to call the relative triggdata I just need to see the value of num, and doing the right Trigg .but this kind of way has a very clear shortage, I can’t get the set output without reaching target point , So robot get interrupted during moving, I still can’t record the triggdata, sad.

---

<div class="post-metadata">

**Author:** ![haining](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@haining](https://tech-community.robotics.abb.com/u/haining)\
**Post date:** [April 4, 2018, 8:57am UTC](https://tech-community.robotics.abb.com/t/how-to-store-a-triggdata-type-variable/8171/3 "2018-04-04T08:57:55Z")

</div>

And another question, RS can use pointer ?  
such as  
char \*p , like C ?  
I don’t see any data type like this

---

<div class="post-metadata">

**Author:** ![haining](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@haining](https://tech-community.robotics.abb.com/u/haining)\
**Post date:** [April 4, 2018, 3:49pm UTC](https://tech-community.robotics.abb.com/t/how-to-store-a-triggdata-type-variable/8171/4 "2018-04-04T15:49:14Z")

</div>

OK I found TriggDataCopy  
I should have read instructions more carefully

---

<div class="post-metadata">

**Author:** ![haining](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@haining](https://tech-community.robotics.abb.com/u/haining)\
**Post date:** [April 5, 2018, 4:40am UTC](https://tech-community.robotics.abb.com/t/how-to-store-a-triggdata-type-variable/8171/5 "2018-04-05T04:40:03Z")

</div>

I found TriggDataCopy instruction in RW6 , but it doesn’t exist in RW5
