The code appears to be correct but our robot doesn't move

The code in labview is correct, we even consulted other teams to validate it, but even simple actions like moving the robot do not work. We have already tried to update the roboRIO, update the talons (SRX), calibrate the talons, change the code and etc …
We also tried to change the programming language and it worked in C ++, but we don’t understand why it doesn’t work in Labview, has it happened to anyone?
PS: we are using mecanum wheels.

O código do labview está correto, até consultamos outras equipes para validá-lo, mas mesmo ações simples como mover o robô não funcionam. Já tentamos atualizar o roboRIO, atualizar os talons (SRX), calibrar os talons, alterar o código e etc …
Tentamos também mudar a linguagem de programação e funcionou, em C ++, mas não entendemos por que não funciona em Labview, já aconteceu com alguém?


LabView has a different coding style than C++. We can’t help without seeing your code.

This is a basic code that we are using just to test the wheels movement.

You need to use a Drive Open VI where you have a Drive Safety Config VI.

The Safety Config VI is optional. The ‘Drive’ library has Safety Config set to enabled by default (last time I checked), while the ‘Motor’ library has Safety Config set to disabled by default.

Oh. I’m wrong! They changed it this year!

Are you getting any errors on the driver station during TeleOp?

I asked about errors on the driver station because if ‘Mecanum’ is spelled inconsistently in your code or there is a hidden extra space or something, you’ll get a specific error. (There is another very common error about the loop not running fast enough, basically don’t worry about it while the robot is disabled.)

You did have the robot enabled from the driver station right? :wink:

Do you have the Talon SRXs connected via CAN or PWM to the roboRIO? The only way to update them is via CAN.

When you calibrated the Talon SRXs how did you do it? Did they flash green when you finished calibrating them?

Were there ANY physical changes between testing with C++ and LabVIEW code?

When you test the LabVIEW code, what are the LEDs on the Talons doing (i.e. color and blink rate)?

Could you post the C++ code you tested for comparison?

1 Like

Make sure you’re not getting this error as well. This is a common thing that our team actually found out how to fix just last year which was giving us a pain at our Week 1 District event. this tells you how to fix that error.

The Teleop part looks right, but I’m not sure about the Begin.

In my opinion, this is the best FRC LabVIEW resource - - Robotic Eagles - FIRST® Robotics Competition

Your code looks a bit different than 358’s Mecanum Drive example, but the 358 example may be dated. It’s possible LabVIEW has changed, but try setting it up like the example just to make sure.

Do you get all green indicators when you connect to the roboRIO via the driver station?

@apm4242 Yes, the Drive Open code changed this year as I found out above. If you drop the WPI Drive Open Motors icon from the pallet onto the any block diagram it actually turns into part of the code PSilveira posted above. I haven’t looked yet but I suspect the project template changed too.

We calibrated the Talon SRX connecting the Joystick on the roboRIO and then pressing and holding the B/C CAL button until the Status LEDs began to rapidly blink red and green, after that, we moved the joystick multiple times and then stop it, so we finally released the B/C button, but our talons doens’t turned green.

Have you already verifIed if the Finish VI is in order?

1 Like

Connect the joystick to the PC rather than the roboRIO.
Close your Driver Station.
Open the Driver Station.
Push your code to the robot.
Copy the text from the Driver Station error window and post it here.
Move your joystick forward and look at the Talons. Do any of them change LED colors?


To anyone having the same problem:

The robot do not moved because the CTRE library was not in the Rio. To solve this just build the code, deploy with “run as startup” and reboot the Rio.