Autonomous Help

Hello everyone!

I am Courtney, head programmer for my team. I am in need of some assistance with my team’s autonomous code. I was able to get the drive wheels to work, yet our wedge arm motor is having difficulties. I am trying to get it to run for 1 second, yet everything I have tried has failed- it keeps running continuously. The way the code is supposed to be set up is: run wedge arm for 1 second then stop, next (after that 1 second) the drive motors should run forward for 5 seconds then stop.

Thank you for your time and help.

(Also, I am sorry in advance if the code is more complicated than necessary.)

In your second frame of your sequence, you don’t actually tell the wedge arm motor to stop. You need to set output to 0 for that device for it to stop, otherwise it just keeps doing the last thing you told it.

Really, you should have three sequence frames here.

  1. One second wait and the code you have for the wedge arm motor,
  2. Five second wait, the wedge arm motor stop, and the drivetrain start
  3. Stop the drivetrain.

Right now, your first frame ends as soon as you set the motor. If you put a wait block in that first sequence frame for 1 second, that will get it to last a full second. This doesn’t have to be connected to any of the other items in that block – Labview won’t leave that frame of the sequence until everything in it has completed. What you’re doing in your second frame would have worked without the sequence structure.