Tool/software: TI C/C++ Compiler
Hello,
I modified the is07 example as below:
int j;
if(motorVars.speed_Hz<=97)
{
speed_refHz=100;
TRAJ_setTargetValue(trajHandle_spd, speed_refHz);
}
if(motorVars.speed_Hz>=98)
{
for(j=0;j<1000;j++)
{
}
int speed_refHz1=150;
TRAJ_setTargetValue(trajHandle_spd, speed_refHz1);
}
if(motorVars.speed_Hz>=148)
{
int speed_refHz2=200;
TRAJ_setTargetValue(trajHandle_spd, speed_refHz2);
}
if(motorVars.speed_Hz>=198)
{
int speed_refHz3=300;
TRAJ_setTargetValue(trajHandle_spd, speed_refHz3);
}
My goal is to reach a speed then wait for approximately 1 sec and then reach another speed.
Unfortunately, I did not succeed to use the delay functions.
I tried SysCtl_delays and it did not wait at all.
Could you help me to use a delay in my function?
Thank you.
Best regards.