Go to Post Hey, I know that kid.... wait he is my son! - Mike Martus [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-02-2005, 18:49
wildabyss wildabyss is offline
Registered User
#0919
 
Join Date: Feb 2005
Location: Toronto
Posts: 10
wildabyss is an unknown quantity at this point
To control motor's rotation...

Hi

I'm trying to control the motor's rotation with a button
I want the motor to turn certain degrees when a button is pressed

so i built a function called MotorDegree, and used For loop to control the rotation. [pwm01 = MotorDegree(p1_sw_trig)]

But it appears that the motor's movement (pwm01) doesn't require the button's activation (p1_sw_trig). It turns automatically once the robot initiates.

I used If command in the function so that the function runs only if the trigger is pressed (when it's 1 or above 0)

What is wrong?
  #2   Spotlight this post!  
Unread 18-02-2005, 06:32
cbolin's Avatar
cbolin cbolin is offline
Programming & Electrical
FRC #0342 (Burning Magnetos)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Charleston, SC
Posts: 72
cbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to behold
Re: To control motor's rotation...

Hi,
How about posting your code for the MotorDegree() function. Are you trying to make the motor turn less than 1 shaft revolution? Or are you trying to use the motor to raise an arm by some angular amount? If it is an arm, what are you using for feedback? A potentiometer?

Regards,
ChuckB
__________________
Team 342 Programming & Control Systems
Good luck and have fun!
  #3   Spotlight this post!  
Unread 18-02-2005, 21:04
wildabyss wildabyss is offline
Registered User
#0919
 
Join Date: Feb 2005
Location: Toronto
Posts: 10
wildabyss is an unknown quantity at this point
Re: To control motor's rotation...

Thanks for replying

I found the problem and the thing works now.
Closed Thread


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
Invacare control system, UI? Jacob Morgan Control System 0 24-10-2004 16:54
PWM and burning out motors patrickrd Technical Discussion 7 19-06-2003 15:30
Looking for practice motors & extra tape drive parts? archiver 2000 1 23-06-2002 22:54
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 29-01-2002 12:32
Drill Motors TF8 Motors 19 12-12-2001 13:13


All times are GMT -5. The time now is 19:20.

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