Go to Post And, learn to collaborate, 'cause it works. - DonRotolo [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 22-02-2007, 15:11
Pace Pace is offline
Registered User
no team
 
Join Date: Feb 2007
Location: Colorado
Posts: 4
Pace is an unknown quantity at this point
Combining RC and user motor control

I'm working on a project with Colorado State University to control the VEX robot using serial communications. I'm coding entirely in MPLAB with C18 and working from the default firmware. The serial communications part is going smoothly, but my problem is this.

In autonomous mode I can control the motors directly, but I receive no RC input whatsoever.

In non-autonomous mode I can receive RC input, but can only control the motors when the RC is turned on.

I'd like to get RC input and control the motors directly (as in pwm01 = 255; ), still having control of the robot if the RC is turned off.

My first thought was to switch between autonomous and non-autonomous depending on the rxdata.rc_receiver_status_byte, however, it doesn't actually get sent in properly in autonomous mode (makes sense, otherwise someone could control thier robot in autonomous mode by turning the RC on and off.) So if there's no input whatsoever to signify the RC turning on when in autonomous mode this switching won't work.

I'm currently looking into using Generate_PWMs() and skipping the master processor, but the timing issues involved there worry me a little (I'd like a very stable platform), however, I may just be paranoid.

If anyone has any other ideas I'd appreciate any input. My current thoughts tell me it's impossible to get any RC input in autonomous mode, but it would still seem reasonable that theres some way for the robot motors to run even when the RC is turned off in non-autonomous mode.

Thanks for any help you might be able to give.
  #2   Spotlight this post!  
Unread 22-02-2007, 16:48
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
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,856
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: Combining RC and user motor control

You're running into a built-in restriction in the control system that's beyond our direct control.

A similar discussion that took place in the Vex subforums might help:
http://www.chiefdelphi.com/forums/sh...ad.php?t=48858
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 22-02-2007, 21:59
Pace Pace is offline
Registered User
no team
 
Join Date: Feb 2007
Location: Colorado
Posts: 4
Pace is an unknown quantity at this point
Re: Combining RC and user motor control

Thank you, I was afraid of that, but just wanted to get it confirmed. Generate_Pwms() seems to be sufficient, it just has a beeping sound from the motor. I appreciate the help.
  #4   Spotlight this post!  
Unread 18-04-2007, 17:10
Culvan Van Li's Avatar
Culvan Van Li Culvan Van Li is offline
Jack-Of-All-Trades
AKA: Andy
FRC #1939 (Kuh-Nig-Its)
Team Role: Engineer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Kansas City, MO
Posts: 36
Culvan Van Li is on a distinguished road
Re: Combining RC and user motor control

So you were using the subroutine Generate_Pwms() to drive the motor outputs? For further clarification, does that allow you to drive the motors while the RC is off and the system is not in autonomous mode? Where do I find the Generate_Pwms() routine?

I posted the same question on the VEX forums. The people there had another solution using UserAPI.h out of the Easy C files. I'm not entirely clear about what they are doing, but it may be that they are simply switching between two different modes of control with the RC on the whole time.

Andy
  #5   Spotlight this post!  
Unread 18-04-2007, 18:23
Pace Pace is offline
Registered User
no team
 
Join Date: Feb 2007
Location: Colorado
Posts: 4
Pace is an unknown quantity at this point
Re: Combining RC and user motor control

It's been a while now and I'm forgetful, but I believe the Generate_Pwms() function came with the default code (and was in the default libraries). I believe it does allow me to drive the motor when the system is not in autonomous mode and the RC is turned off.
  #6   Spotlight this post!  
Unread 18-04-2007, 18:51
bear24rw's Avatar
bear24rw bear24rw is offline
Team 11 Programming Captain
AKA: Max T
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2005
Location: Flanders, NJ
Posts: 385
bear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to behold
Send a message via AIM to bear24rw
Re: Combining RC and user motor control

When you say RC do you mean the transmitter?
  #7   Spotlight this post!  
Unread 19-04-2007, 08:13
Pace Pace is offline
Registered User
no team
 
Join Date: Feb 2007
Location: Colorado
Posts: 4
Pace is an unknown quantity at this point
Re: Combining RC and user motor control

Yes
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
Auto aim in user control mode JamesBrown Programming 2 19-02-2006 12:58
Combining ADC, Serial, and Camera_s codes kaszeta Programming 6 22-01-2006 20:23
Member of multiple (FRC, FLL, VEX) teams in profile/user control panel? Elgin Clock CD Forum Support 3 03-12-2005 20:41
Combining multiple objects in different files into the same scene and file? DinkyDogg 3D Animation and Competition 8 19-02-2005 19:14
Dashreader.dll: A Visual Basic .NET user control to read the dashboard port Ameya Programming 4 12-01-2003 23:40


All times are GMT -5. The time now is 00:24.

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