RobotStudio event

How to solve the delay time?

Hello,everyone

I make the abb robot to run a cycle which radius is 10cm, 
My command is written in a  timer function(VC++): 
 
    rd = aController->Rapid->GetRapidData("T_ROB1", "WeiMod2", "wei_pp");

wei_pose->Trans.X = 100*((float)(Math::Cos(theta)));  //x=10*cos(theta)
wei_pose->Trans.Y = 100*((float)(Math::Sin(theta)));  //y=10*sin(theta)

//----------------------------command
  wei_pp->Trans.X = origin->Trans.X+wei_pose->Trans.X; 
  wei_pp->Trans.Y = origin->Trans.Y+wei_pose->Trans.Y;
  wei_pp->Trans.Z = origin->Trans.Z;
  wei_pp->Rot = origin->Rot;  //unchange rotation
                      //----------------------------
  rd->Value = wei_pp;   
  theta = theta + (Math::PI)/15;
    if(theta >= (2*(Math::PI)-(Math::PI)/15) )
{
theta=0.0;
}
BTW,timer sampling time is 5ms

I also plot the picture,including the command(wei_pp), robtarget register, robot's position
the blue line is value of register,green line is command and the purple line is position of robot
there is a delay time between sending the command to register and the movement of robot

Anyway, I think it may be the sample time of controller caused the problem
I wonder that what is the minimum of the sampling time of the controller?
Can I reset(change) the value? if Yes,how come?
or some advice that I will really appreciate!!!
image