Go to Post Justin Bieber says "US FIRST" rather than just "FIRST". The irony. - Ankit S. [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 10-02-2015, 17:49
thatprogrammer's Avatar
thatprogrammer thatprogrammer is offline
Registered User
AKA: Ahad Bawany
no team (None)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Florida
Posts: 610
thatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond repute
Need assistance with setting up a pid output.

Hey, I finally got my pid loop to work. Only one problem, when I use the button I've set to st the motors to the output, they go to the output at the time they were pressed, but this doesn't change unless I press the button once more. I.e if the motor would go full speed as it was X distance from the goal, it would go full speed until I press the button again, it would then go th speed it needs to BASED ON THE TIME it was once again pushed. Here is the output code
(Using a tablet. Sorry if this comes out slightly off)
Code:
if (stick>GetRawButton(9))
{Motor>Set(output);
}
This is using iterative robot BTW.
Reply With Quote
  #2   Spotlight this post!  
Unread 10-02-2015, 20:38
Arrowhead Arrowhead is offline
Registered User
AKA: Daniel Brown
FRC #1369 (1369 Minotaur)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Tampa, Florida
Posts: 49
Arrowhead is an unknown quantity at this point
Re: Need assistance with setting up a pid output.

The problem is that you are only setting a new value to the motor whenever you press the button, when you don't have the button pressed it just continues on with whatever input it had last. You should probably have the motor speed continuously updated if you are using it with a PID loop.
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 14:04.

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