Program Help

Hello, So I am having a issue with my autonomous program. So everything runs great all the way up to the last command. When it is suppose to open the claw -127 it doesn’t. Any ideas is great thank you.

task main()
{
motor[leftfrontbase]=127;
motor[leftbackbase]=127;
motor[rightsideofbase]=127;

wait1Msec(1600);

motor[leftfrontbase]=127;
motor[leftbackbase]=127;
motor[rightsideofbase]=-127;

wait1Msec(700);

motor[leftfrontbase]=127;
motor[leftbackbase]=127;
motor[rightsideofbase]=127;

wait1Msec(900);

	motor[leftfrontbase]=0;
motor[leftbackbase]=0;
motor[rightsideofbase]=0;
motor[rightleftclaw]=0;


motor[rightleftclaw]=127;

wait1Msec(1900);

motor[leftfrontbase]=127;
motor[leftbackbase]=127;
motor[rightsideofbase]=-127;

wait1Msec(1700);

	motor[leftfrontbase]=-127;
motor[leftbackbase]=-127;
motor[rightsideofbase]=-127;

wait1Msec(2000);

motor[leftfrontbase]=0;
motor[leftbackbase]=0;
motor[rightsideofbase]=0;

	motor[middleliftleft]=-127;
motor[middleliftright]=-127;
motor[rightlift]=-127;
motor[leftlift]=-127;
motor[toprightlift]=-127;
motor[topleftlift]=-127;

wait1Msec(2000);

motor[middleliftleft]=0;
motor[middleliftright]=0;
motor[rightlift]=0;
motor[leftlift]=0;
motor[toprightlift]=0;
motor[topleftlift]=0;


	motor[rightleftclaw]=-127;

wait1Msec(100);

}

I assume the problem is that in never stops the claw motor? (You need to add a line to stop it.)

So what is going on is the claw will not open at all.

You start the claw motor.


motor[rightleftclaw]=-127;

then wait 1/10 of a second.


wait1Msec(100);

and then the program finishes (main task exits) which causes all motors to stop.