# Rapiddata write and read problem

**URL:** <https://tech-community.robotics.abb.com/t/rapiddata-write-and-read-problem/3579>\
**Category:** Developer Tools\
**Created:** [May 12, 2010, 5:34pm UTC](https://tech-community.robotics.abb.com/t/rapiddata-write-and-read-problem/3579 "2010-05-12T17:34:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![blackcoder](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@blackcoder](https://tech-community.robotics.abb.com/u/blackcoder)\
**Post date:** [May 12, 2010, 5:34pm UTC](https://tech-community.robotics.abb.com/t/rapiddata-write-and-read-problem/3579/1 "2010-05-12T17:34:09Z")

</div>

hi iam using rab 5.12 and visual studio 2008 .net basic so  
iam writing and reading IO signal but i want to change some of rapid data  
for example task name T\_ROB1 , module name test, and data name counter  
counter has got onyl number  
please help me how can i read and write this value .net basic

2 textbox and 2 button  
one button read rapiddata and write textbox  
other button write textbox value to rapiddata

thank for your help

---

<div class="post-metadata">

**Author:** ![blackcoder](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@blackcoder](https://tech-community.robotics.abb.com/u/blackcoder)\
**Post date:** [May 16, 2010, 10:48am UTC](https://tech-community.robotics.abb.com/t/rapiddata-write-and-read-problem/3579/2 "2010-05-16T10:48:04Z")

</div>

please help me

---

<div class="post-metadata">

**Author:** ![Niklas\_Skoglund](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Niklas\_Skoglund](https://tech-community.robotics.abb.com/u/Niklas_Skoglund)\
**Post date:** [May 17, 2010, 1:40pm UTC](https://tech-community.robotics.abb.com/t/rapiddata-write-and-read-problem/3579/3 "2010-05-17T13:40:07Z")

</div>

Hi,

use the class **RapidData** and its property **Value** to read and write RAPID data values.  
I suggest that you take a look in the RAB User’s Guide in the chapter " **Working with RAPID data".**

In order to get a RapidData object you can for example use the metod **Rapid.GetRapidData()**

Here is an example from the FlexPendant SDK documentation;

```auto
private RapidData GetMessageID()
{
RapidData rData = null;
Task tRob1 = null;
try
{
// Create temporary controller object to get task
using (Controller c = new Controller())
{
tRob1 = c.Rapid.GetTask("T_ROB1");

if (tRob1 != null)
{
// Only send one parameter to get shared data
rData = tRob1.GetRapidData("nMessageID");
}
else
{
// No task to search from
}
}
}
catch (GeneralException ge)
{
// TODO: Add error handling
}
catch (System.Exception se)
{
// TODO: Add error handling
}
finally
{
// Release temporary resources
if (tRob1 != null)
{
tRob1.Dispose();
tRob1 = null;
}
}
return rData;
}
```

---

<div class="post-metadata">

**Author:** ![blackcoder](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@blackcoder](https://tech-community.robotics.abb.com/u/blackcoder)\
**Post date:** [May 23, 2010, 4:26pm UTC](https://tech-community.robotics.abb.com/t/rapiddata-write-and-read-problem/3579/4 "2010-05-23T16:26:27Z")

</div>

i cant do this ☹ i do everything but i dont read or write an any rapid data value i need only one simple application

---

<div class="post-metadata">

**Author:** ![Niklas\_Skoglund](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Niklas\_Skoglund](https://tech-community.robotics.abb.com/u/Niklas_Skoglund)\
**Post date:** [May 24, 2010, 8:31am UTC](https://tech-community.robotics.abb.com/t/rapiddata-write-and-read-problem/3579/5 "2010-05-24T08:31:33Z")

</div>

Hi blackcoder!

Are you new to .NET programming or only to PC SDK?

What have you done so far? Do you have an application (MyApplication.exe) where you have written code to connect to the controller, and now wants to do something more? Or do you simply want to have a sample application that shows how to connect to a controller using PC SDK?

---

<div class="post-metadata">

**Author:** ![blackcoder](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@blackcoder](https://tech-community.robotics.abb.com/u/blackcoder)\
**Post date:** [May 25, 2010, 6:17pm UTC](https://tech-community.robotics.abb.com/t/rapiddata-write-and-read-problem/3579/6 "2010-05-25T18:17:00Z")

</div>

no i am a new for flexpendant sdk

i want to write an application to flexpendant not a pc so in this application for example i want to change num1 value one text box one button and when i push to button iwant to set num1 value to text1.text

---

<div class="post-metadata">

**Author:** ![Niklas\_Skoglund](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Niklas\_Skoglund](https://tech-community.robotics.abb.com/u/Niklas_Skoglund)\
**Post date:** [May 28, 2010, 8:04pm UTC](https://tech-community.robotics.abb.com/t/rapiddata-write-and-read-problem/3579/7 "2010-05-28T20:04:01Z")

</div>

OK I see.  
I recommend that you start prototyping using ScreenMaker (in RobotStudio) which lets you create a FlexPendant application without coding.

If you want you can export the ScreenMaker project as a Visual Studio project. Its a good way to get started since the essential code is generated for you, and you can continue coding from there.
