failure to read system parms

having problems with testing autonomous. i start user control no problem but when i go into autonomous it says failure to read system parms and then will start something that i didn’t write. if the failure doesn’t come up it works fine. it use to come up sometimes and not others but now it comes up ever time.

Have you tried debugging re-downloading your program?

yes i have. there are no errors

The problem is on line 7 of your java code.

:smiley:

(I’m adding that to my list of awesome generic answers…)

jgraber makes a great point… What language are you using, and could you post your code?

What is it running that “you didn’t write?”

//Andrew

i am using robotc. by i didn’t write is that i want the intake to exhaust and the arm to instantly go to like a 12" hight but instead the intake will spin then wait like 1 min and then the arm goes all the way up.

I though it was the Python Module…

discovered the problem. the wait1msec isn’t counting right. i had it wait 500msec for the intake. start right away and then stop but it keeps going and was delaying the arm. i have no clue why but it was and is also not timing anything else i was using it for.

Are there any other places in your Code that manipulate the Timer(s)?? It might be getting reset, or it could be one more of these “magic behaviors”…

wait1Msec can be called from any task, all it does is tell the task scheduler to put the current task to sleep for the requested time. It does not get reset like the user timers (time1[T1] etc.).

Sounds like you should post your code and also let us know which version of ROBOTC and firmware you are using.

else if(D2 == 1)
{
if(A == 1)
{
req = 700;
motor[port4] = 127;
motor[port7] = 127;
wait10Msec(500);
motor[port4] = 0;
motor[port7] = 0;
}
else if(A == 2)
{
motor[port4] = -127;
motor[port7] = -127;
SensorValue(rightquad) = 0;
SensorValue(leftquad) = 0;
}
else if(A == 3)
{
req = -10;
}
else if(A == 4)
{
reqleft = 650;
reqright = 650;
if(SensorValue(leftquad) == 630 && SensorValue(rightquad) == 630)
{
wait1Msec(500);
A = 6;
}
}

here is the problem section

i am using the worlds championship version. the newest one.

the only thing i use timing is the wait1Msec. nothing else

This waits for 5 seconds (500 x 10mS), is that what you wanted?

Also, it’s hard to understand this code in isolation, what is “A” etc. really need the whole program, or at least the whole task/function.

yea i took this from the old code on accident. i already fixed that

task autonomous()
{
int A = 0; /// just indicates what step
int B = 0; /// for counter
int C = 0;

SensorValue(rightquad) = 0;
SensorValue(leftquad) = 0;
SensorValue(armquad) = 0;

while(true)
{
/////////////////////////////////////////////Blue counter
if(SensorValue(up) == 1 || SensorValue(down) == 1 && D2 == 5 && B == 0)
{
A++;
B = 1;
wait1Msec(500);
}
if(SensorValue(up) == 0 && SensorValue(down) == 0)
{
B = 0;
}
if(A == 1)
{
req = 700;
motor[port4] = 127;
motor[port7] = 127;
wait1Msec(500);
motor[port4] = 0;
motor[port7] = 0;
}
else if(A == 2)
{
motor[port4] = -127;
motor[port7] = -127;
SensorValue(rightquad) = 0;
SensorValue(leftquad) = 0;
}
else if(A == 3)
{
req = -10;
}
else if(A == 4)
{
reqleft = 650;
reqright = 650;
if(SensorValue(leftquad) == 630 && SensorValue(rightquad) == 630)
{
wait1Msec(500);
A = 6;
}
}
if(A == 6)
{
req = 490;
reqright = -157.5;
reqleft = 157.5;
}
}
}

Well, that’s a bit more but the guessing game continues.

    if(SensorValue(up) == 1 || SensorValue(down) == 1 && D2 == 5 && B == 0)
      {
      A++;
      B = 1;
      wait1Msec(500);
      }
    
    if(SensorValue(up) == 0 && SensorValue(down) == 0)
      {
      B = 0;
      }

Perhaps something to do with detecting button pushes ( SensorValue(up) ) and increasing a state variable “A”

      req = 700;

Set some variable req to 700, perhaps a requested position of the arm ?

      if(SensorValue(leftquad) == 630 && SensorValue(rightquad) == 630)
      {
        wait1Msec(500);
        A = 6;
      }

This looks iffy, comparing two quad encoders to a required value perhaps, the chance of getting both quad encoders to exactly hit 630 is small, you need some tolerance or detect less than 630 or something like that.

Anyway all of this is just a guess, it’s still hard to understand the code out of context.

yes. there is a button press to change the first few steps. (up) and (down)
then it needs to change on its own which is where the quad encodes were.

700 is the arm position.

thank you jpearman this helped a lot. i think it fixed everything doing more testing to ensure it fixed it.