WHATS WRONG WITH OUR CODE???!!!

When i write the code, for example a 4 wheel drive system and i build and run it works through the driver station. but when i add to the code, say for example a motor, nothing works. but when i make a code only for that motor, it works. i just can’t get them together. Help? could it be the classmate being stupid?:confused:
ps. the driver station says one loop could be starving another

Unless you really know what you are doing there should not be any loops inside your Teleop VI. There is already a loop wrapped around the Teleop VI. If you need more help than this please post the full Teleop VI that doesn’t do what you expect it to.

there is no loops other than the teleop loop

I don’t fully understand your dilemma, if you contact me through email (or private message) I can help you with it, and then if I cant figure out by walking you throw, I can check out your code if you wouldn’t mind.

Mechanisms are not controlled using the RobotDrive functions. Mechanisms (if they are connected to speed controllers) should be controlled using the functions in the Actuators->Motor Control palette. Specifically the Motor Set Output VI

Also note that you are referencing “Joystick 2” twice in your code and also getting its axis (and button) values twice in your code. I am not sure if this can cause confusion and break code, but i would recommend simply wiring the “axis 2 (y)” from the first Joystick 2 Get vi into the Arcade drive for your Motor Claw.

Are you properly opening these inputs and outputs in Begin.vi? The drive train and first joystick are initialized by default, but you will need to add references to others sensors and actuators as you add them.

It sounds like your main loop is running too slowly, making the Safety on your drive motors timeout. The drive motors by default have Safety enabled with a 100ms timeout. This means that you need to update the output values to these jags at least every 100ms, or the code will turn it off (for Safety). With nice friendly code, the main robot loop containing Teleop.vi should run at anywhere from 20 to 80ms, but will go over if you have lots of code, or, as it seems is the case, there are errors that are slowing everything down.

This safety timeout error can be identified on the Driver Station and going to the “Diagnostics” tab. There is a readout of error messages that will likely include something about Safety Timeout on Kicker (or whatever your mechanism is), the loop is not running fast enough. My guess is that its not running fast enough because of your interesting method of controlling other actuators. I second the need to use Motor Control from the WPILib>>Actuators>>Motor Control pallette, and emphasize that it needs to be initialized properly. If you hit a wall, feel free to ask, we’re happy to help. I (and many others) can post screenshots of some of this if it helps. Just looking through Begin.vi will probably help some too.

Another thing, are you using PWM or CAN for the jaguar signal?

And the double joystick reference should compile fine, its just unnecessarily redundant.