Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Programming issues (http://www.chiefdelphi.com/forums/showthread.php?t=144100)

Unexas 18-02-2016 16:28

Programming issues
 
can someone take a look at our code to see if they can see anything wrong with it. The only thing it does right now is turn the compressor on. We can drive or do anything else.

https://drive.google.com/file/d/0BzD...ew?usp=sharing

Matt-T-FRC 18-02-2016 17:22

Re: Programming issues
 
What is the CAN Bus idea for your pneumatics control module? Also make sure that your not using While Loops in your Telop Code. What would you like your Gate Actuator to do in when you operate it?

Matt-T-FRC 18-02-2016 18:11

Re: Programming issues
 
Try this code and see if you have manual control of your mechanisms. https://drive.google.com/file/d/0Bww...ew?usp=sharing

Alan Anderson 18-02-2016 18:22

Re: Programming issues
 
You didn't include the Global2.vi file in your project, but I can guess what it contains.

It looks like you have copied an example (Limit Switch?) into your code without understanding what it does. The While loops you have added to Teleop will break the robot program completely. They're going to have to come out. It would probably be best to remove everything having to do with those digital inputs, then see if the robot works otherwise.

Tell us what you want the robot to do with those switch inputs. We'll help you learn how to write the program to do it.

Unexas 19-02-2016 13:59

Re: Programming issues
 
Quote:

Originally Posted by Alan Anderson (Post 1542394)
You didn't include the Global2.vi file in your project, but I can guess what it contains.

It looks like you have copied an example (Limit Switch?) into your code without understanding what it does. The While loops you have added to Teleop will break the robot program completely. They're going to have to come out. It would probably be best to remove everything having to do with those digital inputs, then see if the robot works otherwise.

Tell us what you want the robot to do with those switch inputs. We'll help you learn how to write the program to do it.

We used the default roborio project to test with and 1 motor spun. We have a splitter coming from PWM 0 and 1 going to 2 victors on each side.

We used a Arduino to send the PWM signal to the motor controllers while they are on the robot and not even 1 out of our 5 Motor controllers worked. Then we took them off to try and switch them and we tested one of the ones that didn't work on the bot but it worked off the bot. We have only tested that one so we don't know if any of the other work. I will test them after school today.

I switched the PWM splitter from 1 to 0 in order to test one of the other motor controllers on the other side and nothing happened even though previously we had 1 motor working with the same code.

I don't even know what to think anymore can someone please help.

Alan Anderson 19-02-2016 15:02

Re: Programming issues
 
Quote:

Originally Posted by Unexas (Post 1542765)
We used the default roborio project to test with and 1 motor spun. We have a splitter coming from PWM 0 and 1 going to 2 victors on each side.

If a motor ran without being commanded to by your program, it sounds like you might have at least one of your Victors wired backwards. Power goes to the V+ and V- terminals, and the M+ and M- terminals go to the motor. If you had the motor terminals connected to battery power, you've probably fried the Victor and it'll take an expert to have a chance of repairing it.

Quote:

We used a Arduino to send the PWM signal to the motor controllers while they are on the robot...
That violates the robot rules. You may only connect motor speed controller PWM inputs to the PWM outputs of the RoboRIO. I can't help you further until you have wired the robot in a way can pass inspection.

You didn't mention the switch that I saw in the code. The programming for that switch was definitely going to break the program completely. Take out all of the related code and get the motors running first.

You said you're using Victors. Those are notoriously difficult to get the PWM connector properly plugged in. If the LED on the Victor is still blinking when you enable the robot, either it isn't connected right or you have failed to initialize the PWM output it's connect to.

Unexas 19-02-2016 15:52

Re: Programming issues
 
Quote:

Originally Posted by Alan Anderson (Post 1542819)
If a motor ran without being commanded to by your program, it sounds like you might have at least one of your Victors wired backwards. Power goes to the V+ and V- terminals, and the M+ and M- terminals go to the motor. If you had the motor terminals connected to battery power, you've probably fried the Victor and it'll take an expert to have a chance of repairing it.



That violates the robot rules. You may only connect motor speed controller PWM inputs to the PWM outputs of the RoboRIO. I can't help you further until you have wired the robot in a way can pass inspection.

You didn't mention the switch that I saw in the code. The programming for that switch was definitely going to break the program completely. Take out all of the related code and get the motors running first.

You said you're using Victors. Those are notoriously difficult to get the PWM connector properly plugged in. If the LED on the Victor is still blinking when you enable the robot, either it isn't connected right or you have failed to initialize the PWM output it's connect to.

The arduino was only to test and see if the motor controllers were still working or not.

The motor controllers are wired correctly.

The code i have been using to test the motors has no switch code in it
it is only programmed for drive motors.


All times are GMT -5. The time now is 04:21.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi