Issues with vex field controller systems

Today was our first meet of the season at Gross Catholic. We ran into some major issues.

  1. Robot would not move when in driver control without being plugged into field control

  2. Our auton wouldn’t run properly when connected to the field but it was fine when connected to a comp switch.

  3. When running skills, we found an error on the screen after plugging in which stated that “incorrect type VexNet3” or something along those lines. When we switched the radio signal type to bluetooth, the screen would say we were good to go but our bot would still not move.

I did some looking here on the forum earlier and I found that if you put (!Competition.isEnabled() && (Competition.isCompetitionSwitch())) || Competition.isFieldControl() into the conditional statement in the while loop, problem 2 was resolved. The side effect of this fix was that when trying to even drive our bot with or without a comp switch, nothing would move. With the same code, Our autons and driving worked perfectly when connected to the field controller. Still, nothing would work when connected to the skills field controller.

Im at the point where im probably going to throw my bot off a bridge in the near future so if anyone on this forum has some insight to lend me, my robot and I would greatly appreciate it, Thanks!!

P.S. heres our code

void usercontrol(void) {

      //disable forward pid loops
      enableSForwardPID = false;
      enableMForwardPID = false;
      enableLForwardPID = false;

      //disable reverse pid loops
      enableSReversePID = false;
      enableMReversePID = false;
      enableLReversePID = false;

      //disable left turn pid loops
      enableTurnLeft90PID = false;
      enableTurnLeft180PID = false;

      //disable right turn pid loops
      enableTurnRight90PID = false;
      enableTurnRight180PID = false;

      int countF = 0;
      int PcountF = 0;

  while ((!Competition.isEnabled() && (Competition.isCompetitionSwitch())) || Competition.isFieldControl()) {
   
      //Drive
      //---------------------------------------------------------------------------//

      int FLDriveSpeed = ControllerM.Axis3.position();
      int BLDriveSpeed = ControllerM.Axis3.position();
      int FRDriveSpeed = ControllerM.Axis2.position();
      int BRDriveSpeed = ControllerM.Axis2.position();

      FLDrive.setStopping(coast);
      BLDrive.setStopping(coast);
      FRDrive.setStopping(coast);
      BRDrive.setStopping(coast);

      FLDrive.setVelocity(FLDriveSpeed, percent);
      BLDrive.setVelocity(BLDriveSpeed, percent);
      FRDrive.setVelocity(FRDriveSpeed, percent);
      BRDrive.setVelocity(BRDriveSpeed, percent);

      FLDrive.spin(forward);
      BLDrive.spin(forward);
      FRDrive.spin(forward);
      BRDrive.spin(forward);

      //---------------------------------------------------------------------------//

      //Intake
      //---------------------------------------------------------------------------//

      if(ControllerM.ButtonL1.pressing()){
        Intake.spin(forward, 127, volt);
      }
      else if(ControllerM.ButtonL2.pressing()){
        Intake.spin(reverse, 127, volt);
      }
      else{
        Intake.stop(coast);
      }

      //---------------------------------------------------------------------------//

      //Flywheel
      //---------------------------------------------------------------------------//

      //Main controller high
      //---------------------------------------------------------------------------//

      if(ControllerM.ButtonY.pressing() && countF == 0){
        Flywheel.spin(forward, 127, voltageUnits::volt);

        waitUntil(!ControllerM.ButtonY.pressing());
        countF = 1;
      }

      if(ControllerM.ButtonY.pressing() && countF == 1){
        Flywheel.stop(coast);

        waitUntil(!ControllerM.ButtonY.pressing());
        countF = 0;
      }

      //---------------------------------------------------------------------------//

      //Main controller low
      //---------------------------------------------------------------------------//

      if(ControllerM.ButtonX.pressing() && countF == 0){
        Flywheel.spin(forward, 10.5 , voltageUnits::volt);

        waitUntil(!ControllerM.ButtonX.pressing());
        countF = 1;
      }

      if(ControllerM.ButtonX.pressing() && countF == 1){
        Flywheel.stop(coast);

        waitUntil(!ControllerM.ButtonX.pressing());
        countF = 0;
      }

      //---------------------------------------------------------------------------//

      //Partner controller high
      //---------------------------------------------------------------------------//

      if(ControllerP.ButtonR2.pressing() && PcountF == 0){
        Flywheel.spin(forward, 127, voltageUnits::volt);

        waitUntil(!ControllerP.ButtonR2.pressing());
        PcountF = 1;
      }

      if(ControllerP.ButtonR2.pressing() && PcountF == 1){
        Flywheel.stop(coast);

        waitUntil(!ControllerP.ButtonR2.pressing());
        PcountF = 0;
      }

      //---------------------------------------------------------------------------//

      //Partner controller low
      //---------------------------------------------------------------------------//
      
      if(ControllerP.ButtonR1.pressing() && PcountF == 0){
        Flywheel.spin(forward, 10.5, voltageUnits::volt);
        
        waitUntil(!ControllerP.ButtonR1.pressing());
        PcountF = 1;
      }

      if(ControllerP.ButtonR1.pressing() && PcountF == 1){
        Flywheel.stop(coast);

        waitUntil(!ControllerP.ButtonR1.pressing());
        PcountF = 0;
      }

      //Indexer 
      //---------------------------------------------------------------------------//

      if(ControllerM.ButtonR1.pressing()){
        Indexer.set(true);
        wait(120, msec);
        Indexer.set(false);

        waitUntil(!ControllerM.ButtonR1.pressing());
      }

      //---------------------------------------------------------------------------//

      //Engame
      //---------------------------------------------------------------------------//

      if(ControllerP.ButtonL1.pressing() && (ControllerP.ButtonL2.pressing()) && (ControllerM.ButtonUp.pressing())){
        Endgame.set(true);
      }

    wait(20, msec);
 }
}

Why are you even doing this ?

while ((!Competition.isEnabled() && (Competition.isCompetitionSwitch())) || Competition.isFieldControl()) 

if you are using the competition template correctly, usercontrol will run at the correct time, a simple

while(1)

will suffice.

That’s up to the EP to decide if they want to run skills using VEXnet or BLE, an option on the field controller software (assuming they have the latest from June).

Would need more info to know what going on here.
I assume vexos is fully up to date (1.1.2)
details on how the EP was controlling skills, using TM or running locally from the field control screen (I’m assuming that’s what they had based on the VEXnet message).
You only posted the user control section of your code, were you doing driver or programming skills ?

5 Likes

V5 Brain Field Controller is relatively new to EPs - I am planning on using them extensively for Competition Match control and Skills.

Best practices are not yet easy to find for EPs. For example, what to communicate to teams before coming to event, providing rj45 legacy control port plugs, using V5 Field control during Inspection so teams can be assured they will likely have success.

Our past experience with using V5 Brains for skills has been a huge game changer in terms of being nimble to appropriate any field (practice fields) and allow more teams to get more skills runs without huge lines.

I expect the use of V5 Brains for match control to be a good switch. Fall events will be a learning curve for both EPs and teams.

[ and apologies for discussion about operational issues vs “programming support” ]

5 Likes

My auton won’t work otherwise. With while(1), it does not. Clearly something with either the comp template or the field controller is messed up otherwise the auton would work correctly…right?

They told me not to use Bluetooth but when I switched the radio to Bluetooth the screen told me that everything was connected.

Was doing driver. Programming didn’t work either UNTIL I added that line of code into the while’s conditional statement.

It’s more likely that something else in your code is messed up or you are running an old version of vexos (which TM/field control should have alerted you to, so I assume not). We ran 10 divisions for 6 days at worlds using the new field control system and most issues of this type were traced back to mistakes in code. Perhaps post the whole program (zip up the project folder) so I can see how autonomous and the rest of the code is setup, I’ll check it with a field control system here.

There’s supposed to be a kb article on the new field control system with lots of detail, but I don’t see it posted yet.

5 Likes

Did find some under ep.vex.com
https://kb.roboticseducation.org/hc/en-us/categories/4421417671703

However, guidance about how this fits into “normal” operational procedures from inspection needs tightening. given this is new functionality, best practices really not well established.

For teams - recommend they test their code with a second V5 brain running field control app to be sure it works…

Agreed that for original poster, it appears problem lies on their side.

1 Like

Ah, ok, that was buried quite a bit.
I didn’t review everything, but the user manual seems to be here.

3 Likes

This seems very XY problem to me. Your issue is almost certainly somewhere else, and trying to get around the problems without fixing the underlying issue will make your life much harder.

I agree with James, post your whole project, seeing that might indicate where the real problem is.

Another thing you should probably try is creating a blank program, as simple as possible, to test the competition control without the confounding variables that are the rest of your program.

2 Likes

Ill go ahead and PM you that code.