Go to Post Just fill your wheels with depleted uranium - EmileH [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 11-02-2008, 19:15
Ryan O's Avatar
Ryan O Ryan O is offline
FRC Eclipse Plug-in Developer
no team (FRC Eclipse)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Plaistow
Posts: 111
Ryan O is an unknown quantity at this point
Send a message via AIM to Ryan O
PWM Problem

Ok, so for the past few years our team has used a servo shifting system. However, this requires that the program know the current position, since it is a three position drive and the commands are shift up and down. My question is if there is a sort of GetPWM function for the FRC controller, because in the past with the FRC code, we have just used the values themselves. Any help would be greatly appreciated. I know that VEX has a GEt function, but cuoldn't find a likely candidate for FRC
__________________
CRUD Name: Windows
Rookie Year: 2005
Alumni to Team: 350
  #2   Spotlight this post!  
Unread 11-02-2008, 19:32
tdlrali tdlrali is offline
Registered User
FRC #0469 (Las Guerrillas)
Team Role: Programmer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: MI
Posts: 377
tdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud of
Re: PWM Problem

You're trying to read the position that the servo is at? Why don't you just keep track of which gear you're in, and shift up or down based on that?
  #3   Spotlight this post!  
Unread 12-02-2008, 09:17
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: PWM Problem

That's actually a good question. The problem is knowing when the servo reached the commanded position. The small hobby servos don't return the current position, that single wire is an input to the servo and there is no position output.

We have tried to solve that problem in the past (and this year too) with limit switches to know when the motion is complete. In our case it was even more important because the servo controlled a latch to keep a motor from backdriving. If we try to run the motor before the servo finishes moving the motor or the latch will break.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #4   Spotlight this post!  
Unread 12-02-2008, 09:50
Ryan O's Avatar
Ryan O Ryan O is offline
FRC Eclipse Plug-in Developer
no team (FRC Eclipse)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Plaistow
Posts: 111
Ryan O is an unknown quantity at this point
Send a message via AIM to Ryan O
Re: PWM Problem

We were looking at also using values from other stuff, not just servos. We would like an easy way to access them, like using teh pwm0~ as a value in FRC Default. One of our variables could too easiely escape an update and mess stuff up.
__________________
CRUD Name: Windows
Rookie Year: 2005
Alumni to Team: 350
  #5   Spotlight this post!  
Unread 13-02-2008, 10:07
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: PWM Problem

The compass driver (for the CMPS04) reads PWM values from interrupt ports. It's a little compute intensive, but might work for you.

You could connect whatever you have that's generating PWM signals and give that a try. The values you get back will be related to the duty cycle of the input signal.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
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
we need help with PWM problem in autonomous steve d Programming 7 03-02-2008 12:46
Problem with PWM outputs on RC Adam Richards Control System 1 20-02-2007 06:37
PWM Problem with Default Code kbregler Programming 16 03-02-2007 15:14
Victor and PWM Cable Problem RIgnazio Electrical 2 13-01-2005 23:02
PWM problem in autonomous outofcontrol Programming 5 27-02-2004 11:58


All times are GMT -5. The time now is 01:11.

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