Go to Post (Respecting a decision) != (Agreeing with it) - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2016, 16:28
Unexas Unexas is offline
Lead Programmer
AKA: Douglas Byrd
FRC #3753 (BulahBots)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2011
Location: Baton Rouge
Posts: 22
Unexas is just really niceUnexas is just really niceUnexas is just really niceUnexas is just really niceUnexas is just really nice
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
Reply With Quote
  #2   Spotlight this post!  
Unread 18-02-2016, 17:22
Matt-T-FRC Matt-T-FRC is offline
Electrical Engineering Student
AKA: Matt Tisovic
FRC #6181 (Northwest State Cryptic Cyborgs)
Team Role: Electrical
 
Join Date: Feb 2016
Rookie Year: 2012
Location: Northwest Ohio
Posts: 29
Matt-T-FRC is an unknown quantity at this point
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?

Last edited by Matt-T-FRC : 18-02-2016 at 17:26.
Reply With Quote
  #3   Spotlight this post!  
Unread 18-02-2016, 18:11
Matt-T-FRC Matt-T-FRC is offline
Electrical Engineering Student
AKA: Matt Tisovic
FRC #6181 (Northwest State Cryptic Cyborgs)
Team Role: Electrical
 
Join Date: Feb 2016
Rookie Year: 2012
Location: Northwest Ohio
Posts: 29
Matt-T-FRC is an unknown quantity at this point
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
Reply With Quote
  #4   Spotlight this post!  
Unread 18-02-2016, 18:22
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 19-02-2016, 13:59
Unexas Unexas is offline
Lead Programmer
AKA: Douglas Byrd
FRC #3753 (BulahBots)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2011
Location: Baton Rouge
Posts: 22
Unexas is just really niceUnexas is just really niceUnexas is just really niceUnexas is just really niceUnexas is just really nice
Re: Programming issues

Quote:
Originally Posted by Alan Anderson View Post
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 19-02-2016, 15:02
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Programming issues

Quote:
Originally Posted by Unexas View Post
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.
Reply With Quote
  #7   Spotlight this post!  
Unread 19-02-2016, 15:52
Unexas Unexas is offline
Lead Programmer
AKA: Douglas Byrd
FRC #3753 (BulahBots)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2011
Location: Baton Rouge
Posts: 22
Unexas is just really niceUnexas is just really niceUnexas is just really niceUnexas is just really niceUnexas is just really nice
Re: Programming issues

Quote:
Originally Posted by Alan Anderson View Post
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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