Go to Post ...the list of the things we want to get done in the off-season has grown to such a length that I have to take off my shoes and socks to count them...and I think I may need to grow a few more toes soon. - StephLee [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 02-02-2010, 14:59
Team1824 Team1824 is offline
Registered User
FRC #1824
 
Join Date: Oct 2008
Location: Peterborough
Posts: 14
Team1824 is an unknown quantity at this point
motor controller error

Hey, programmer here (using Labview), we have been having some problems with the motor controllers on our robot. I have programmed a button to make a motor go forward. We know that the motor controller works because when we used it for the regular drive it turned red and green as it should. When I use the button to control a motor however the motor controller rapidly flashes red and orange when the button is not in use. When I push the button it flashes green red and orange. I know the code is right because I have used two separate versions, one from chief delphi and one from NI.

Can anyone please help???
__________________
Team 1824
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2010, 15:32
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: motor controller error

Quote:
Originally Posted by Team1824 View Post
...I know the code is right...
If the code were right, it would be working.

Show us what you're doing. Oh, and tell us how things are wired so we can rule out electrical problems.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-02-2010, 15:49
Team1824 Team1824 is offline
Registered User
FRC #1824
 
Join Date: Oct 2008
Location: Peterborough
Posts: 14
Team1824 is an unknown quantity at this point
Re: motor controller error

okay here is the code. It is copied as best I can from NI's FIRST forum. The electronics is the same as last years, and that worked perfectly. We haven't had time to rework the electronics board yet.
Attached Thumbnails
Click image for larger version

Name:	scrnsht1.JPG
Views:	21
Size:	127.0 KB
ID:	8470  Click image for larger version

Name:	scrnsht2 (1).JPG
Views:	25
Size:	148.5 KB
ID:	8471  
__________________
Team 1824
Reply With Quote
  #4   Spotlight this post!  
Unread 02-02-2010, 15:52
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: motor controller error

I see your problem.

You are opening and closing the motor in teleop.vi

This code does not contain the main loop; you must open the motor in Begin.vi, save it as a refnum, then get the refnum in Teleop.vi, use it, and leave it. If you want to be nice and close it, then get the refnum and close it in Finish.vi
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #5   Spotlight this post!  
Unread 02-02-2010, 16:36
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: motor controller error

Quote:
Originally Posted by apalrd View Post
I see your problem.

You are opening and closing the motor in teleop.vi
You're actually opening and closing a lot of things in Teleop. That won't cause problems with some of them, but it will definitely break most of them.

The LabVIEW examples are typically set up as an Open, fed into a While, with a Close after the While. That's fine for a standalone example, but it isn't how the full robot code is structured. The robot project should have all the Opens put in the Begin vi, with each resulting reference fed into a registry Set vi. Everything inside the example's While should go in the Teleop vi, which you might think of as having an implied While around it. Use a registry Get in Teleop instead of another Open; you can see how that's done with the existing references. Put each Close from the example in the Finish vi, again using the existing code as a pattern.
Reply With Quote
  #6   Spotlight this post!  
Unread 08-02-2010, 14:55
Team1824 Team1824 is offline
Registered User
FRC #1824
 
Join Date: Oct 2008
Location: Peterborough
Posts: 14
Team1824 is an unknown quantity at this point
Re: motor controller error

Yeah, opening everything in Begin.vi fixed everything. Thanks everyone.
__________________
Team 1824
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cheap motor controller dpeterson3 Electrical 15 17-06-2009 17:42
Motor speed sensing with the Jaguar motor controller? mminutto FRC Control System 5 13-01-2009 18:13
Motor Controller RoarRoar Motors 4 24-01-2008 21:32
purchase motor controller wkethman Electrical 7 09-01-2006 09:16
Program error after controller reset randomperson Programming 6 04-01-2005 23:31


All times are GMT -5. The time now is 14:18.

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