# How can i do this Call routine help me

**URL:** <https://tech-community.robotics.abb.com/t/how-can-i-do-this-call-routine-help-me/3804>\
**Category:** Developer Tools\
**Created:** [September 15, 2010, 7:50pm UTC](https://tech-community.robotics.abb.com/t/how-can-i-do-this-call-routine-help-me/3804 "2010-09-15T19:50:14Z")\
**Posts on this page:** 2\
**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:** [September 15, 2010, 7:50pm UTC](https://tech-community.robotics.abb.com/t/how-can-i-do-this-call-routine-help-me/3804/1 "2010-09-15T19:50:14Z")

</div>

i need your helps

MODULE sample

PROC sample1()

CONST robtarget ptest:=[[2849.22,1066.10,-534.02],[0.000692304,0.714986,0.699138,0.000942024],[-1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

MoveL,test, v7000, fine, tGripper;

ENDPROC  
ENDMODULE

i have one module and this module has got one routine  
module name sample  
routine name is sample1

i want to run this routine in my flexpendant application one button and this routine run and stop its possible i need sample code please help me i dont want to use screenmaker i am using vs2005 .net basic RAB 5.10

thank you

---

<div class="post-metadata">

**Author:** ![Lennart\_H](https://avatars.discourse-cdn.com/v4/letter/l/ac91a4/32.png) [@Lennart\_H](https://tech-community.robotics.abb.com/u/Lennart_H)\
**Post date:** [September 16, 2010, 8:37am UTC](https://tech-community.robotics.abb.com/t/how-can-i-do-this-call-routine-help-me/3804/2 "2010-09-16T08:37:05Z")

</div>

This can be done in a number of different ways. Please find below a code snippet to get you started. Note that this is far from a ready solution, you have to add more logic e.g error handling.

public TpsViewIRC5App4()  
{  
//  
// Required for Windows Form Designer support  
//  
InitializeComponent();

//  
// ToDo: Add any constructor code after InitializeComponent call  
//

aController=new Controller();  
aTask = aController.Rapid.GetTask(“T\_ROB1”);  
}

private void cmdButton\_Click(object sender, EventArgs e)  
{  
aTask.SetProgramPointer(“sample”, “sample1”);  
aController.Rapid.Start();  
}
