Go to Post My fondest memory was asking questions about Spirit and Opportunity to a NASA scientist while dressed up in a lion suit. - Adam Y. [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 20-02-2010, 22:45
Alexandstein Alexandstein is offline
Registered User
FRC #2192 (YAK Attack)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Newport, OR
Posts: 13
Alexandstein is an unknown quantity at this point
Negatives not working.

In our robot code, we are attempting to program a motor to go forward for .5 seconds, and then go backwards for another .5 seconds at the press of a button, but for some reason, negative numbers are not working. The motor goes forward for .5 seconds, and goes forward again instead of backwards.
For the motor speed we have -0.5 entered in.
We tried controlling the motor to go backwards and forward using the throttle axis on the joystick it worked fine.

Thanks for any help!
Reply With Quote
  #2   Spotlight this post!  
Unread 21-02-2010, 08:16
Noamr Noamr is offline
Registered User
FRC #1574 (Miscar)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Israel
Posts: 21
Noamr is an unknown quantity at this point
Re: Negatives not working.

can you post your code?
Reply With Quote
  #3   Spotlight this post!  
Unread 21-02-2010, 09:51
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,713
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Negatives not working.

-0.5 is usually forwards. That's what your throttle sends.

It's probably the positive speed value that's causing you trouble.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #4   Spotlight this post!  
Unread 21-02-2010, 12:49
Alexandstein Alexandstein is offline
Registered User
FRC #2192 (YAK Attack)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Newport, OR
Posts: 13
Alexandstein is an unknown quantity at this point
Re: Negatives not working.

What can I do to fix that?

We just tried having one value 0.5 and another value of 0.5 connected to a negate function, then connected to the motor speed control. Again, no luck.

Thanks for all help you can give.
Reply With Quote
  #5   Spotlight this post!  
Unread 26-02-2010, 11:23
Egg 3141592654's Avatar
Egg 3141592654 Egg 3141592654 is offline
Now a mentor, always a student
FRC #0810 (Mechanical Bulls)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Long Island
Posts: 53
Egg 3141592654 is on a distinguished road
Re: Negatives not working.

one of your motors could be wired backwards, in this case, just go to Begin and click true for isInverted(), of course, that is if this motor is an issue for all your states.
__________________
"The answers to the book of life are not found in the back." Charlie Brown

Software Mentor - Team Apex Robotics 5803

Lead Programmer - Team 810 Mechanical Bulls '09-'11
Reply With Quote
  #6   Spotlight this post!  
Unread 26-02-2010, 23:50
Lumit Lumit is offline
Registered User
FRC #2521
 
Join Date: Jan 2010
Location: Oregon
Posts: 26
Lumit is an unknown quantity at this point
Re: Negatives not working.

Quote:
Originally Posted by Alexandstein View Post
What can I do to fix that?

We just tried having one value 0.5 and another value of 0.5 connected to a negate function, then connected to the motor speed control. Again, no luck.

Thanks for all help you can give.
A negate function?
Try just wiring a constant -0.5 to the motor, it worked fine for us.

EDIT: eh, reading your first post again, it looks like that's the first thing you tried
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
Jaguars not working mama_tree Electrical 8 01-02-2010 07:54
p2 not working? Lone_Wolf92c Programming 5 22-02-2008 08:49
IR Board Not Working (But NOT Fried) itsme Electrical 2 18-02-2008 06:11
Gyro not working 1594code Programming 2 12-02-2008 18:16
Negatives in Binary Michael Hill Math and Science 12 10-02-2007 21:28


All times are GMT -5. The time now is 08:39.

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