Go to Post A problematic dynamic and culture becomes apparent when failure persists for such a duration and reoccurs so frequently that students begin to accept it as the norm, and never learn the proper way to do things. - sanddrag [more]
Home
Go Back   Chief Delphi > Old Forum Archives > 2001
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 24-06-2002, 00:34
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: Need help in creating program to use servo's to shift drive

Posted by Matt Starkey at 2/10/2001 3:12 PM EST


Engineer on team #236, Techno Ticks, from Lyme/Old-Lyme High School and Millstone Power Station.


In Reply to: Re: Need help in creating program to use servo's to shift drive
Posted by Barry Horwitz on 2/10/2001 11:27 AM EST:



: : My building team developed a drive assembly that has a servo attached to the drive motor shifter. This will assembly will to shift from low to high gears. I am trying to control the shifting only when the joysticks are in dead stick position. I have the drive motors as PWM1 & 2. The servos are PWM 3 & 4. The trigger on joystick one controls the servos. The program now allows shifting all the time. I have tried to put conditional statements in the subroutine section and in the PWM limit switch control area. HELP!!!
: : I need to put a statement in the program that will only allow the trigger to move PWM3&4 when the joystick is in dead stick position. Where in the program should this go and what might it look like?
: :Barry


You can put some conditional statements anywhere you want to as long as they are inside the main loop. Try using a series of "IF" statements if you are not too concearned with the loop time changing on you depending on the conditions.
1) is the trigger pulled? (assuming that the trigger is input that changes the position of the servo's). if not skip the rest of the routine.
2) if so, are the drive motors standing still (both equal to 127). If not, skip the rest of the routine.
3) if so, move the servo to the new position.

Servo position will have to be stored between loops and a statement somewhere in the code (outside of the conditional statements) to set servo position to stored position each loop.

Hope this helps -- Didn't want to give it away, but would be happy to answer any more questions.



__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
 


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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
1 stick drive to 2 stick drive wayne 05 Programming 18 01-04-2004 16:41
Creating a dashboard program Jeff_Rice Programming 18 04-05-2003 23:21
what's your most important drive train advice? Ken Leung Technical Discussion 42 07-01-2003 09:58
Anyone looking for more program space? archiver 2001 13 24-06-2002 02:20
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 29-01-2002 12:32


All times are GMT -5. The time now is 10:56.

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