Go to Post That'll teach me to send anyone for a tool. - Rich Kressly [more]
Home
Go Back   Chief Delphi > Technical > Control System
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 19-01-2004, 14:07
Phasmatis568's Avatar
Phasmatis568 Phasmatis568 is offline
Electrical/Programer
#1038 (Thunderhawks)
Team Role: Programmer
 
Join Date: Oct 2003
Location: Liberty Township, OH
Posts: 8
Phasmatis568 is on a distinguished road
Failing analog inputs?

Has anyone else had any issues w/ the analog inputs reading a constant value no matter what you do w/ them? To the best of my knowledge, we have a defective controller. But i dont want to go a week w/o the controller while they replace it, unless i'm absolutly sure.
  #2   Spotlight this post!  
Unread 19-01-2004, 15:07
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Failing analog inputs?

I havent looked at the code for this year too much yet, but last year, if you wanted to use an analog or digital input on the RC there were TWO places where you had to 'enable' it.

maybe this is why you are not seeing the input in the variable you are looking at?
  #3   Spotlight this post!  
Unread 19-01-2004, 20:01
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Re: Failing analog inputs?

Make sure you do Get_Analog_Value(rc_ana_in01);

rc_ana_inxx are just the channels on the ADC, not the actual value. Get_Analog_Value() takes an ADC channel and returns the (10-bit) value on that channel.

We just modified the #defines for all the rc_ana_inxx to include the function call.

#define rc_ana_in01 Get_Analog_Value(ADC_CH0)
  #4   Spotlight this post!  
Unread 19-01-2004, 20:25
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Failing analog inputs?

Quote:
Originally Posted by Phasmatis568
Has anyone else had any issues w/ the analog inputs reading a constant value no matter what you do w/ them? To the best of my knowledge, we have a defective controller. But i dont want to go a week w/o the controller while they replace it, unless i'm absolutly sure.
It is HIGHLY unlikley that you are experiencing a hardware problem. A user error is much more likley. Could you post your code and i can prolyl help you? Specifically could you post your User_Initialization() function, as well as whatever code you wrote that uses the Analog input?
__________________
1139 Alumni
  #5   Spotlight this post!  
Unread 22-01-2004, 12:39
Dave Campbell's Avatar
Dave Campbell Dave Campbell is offline
Miami Valley Planning Committee
FRC #0144 (ROCK Robotics)
Team Role: Teacher
 
Join Date: Dec 2003
Rookie Year: 1999
Location: Cincinnati
Posts: 186
Dave Campbell has a brilliant futureDave Campbell has a brilliant futureDave Campbell has a brilliant futureDave Campbell has a brilliant futureDave Campbell has a brilliant futureDave Campbell has a brilliant futureDave Campbell has a brilliant futureDave Campbell has a brilliant futureDave Campbell has a brilliant futureDave Campbell has a brilliant futureDave Campbell has a brilliant future
Re: Failing analog inputs?

Quote:
Originally Posted by Rickertsen2
It is HIGHLY unlikley that you are experiencing a hardware problem. A user error is much more likley. Could you post your code and i can prolyl help you? Specifically could you post your User_Initialization() function, as well as whatever code you wrote that uses the Analog input?
Problem fixed. You were all correct. Main problem was advisor error, second problem - code error.
Thanks
  #6   Spotlight this post!  
Unread 22-01-2004, 13:28
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Failing analog inputs?

HW and SW people always seem to be at odds with each other, esp when something is not working like it seems it should.

There is something I call "computer science 101 syndrome" typically when a student takes their first programming class in college, they are given a very simple program to write, like add three numbers and print the result.

half the students will make a mistake in the syntax or control language or something (esp when using a mainframe) and they wont be able to see the problem in the code, so at some point they exclaim:

"THAT STUPID COMPUTER IS NOT WORKING RIGHT!"

You are in good company, and you are not the first!

:c)
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
Some EDURobotics Problems squide Robotics Education and Curriculum 9 20-01-2004 10:27
How to access other Digital inputs on OI? DougHogg Electrical 2 12-03-2003 13:57
Digital inputs, bandwith, errors? Micah Brodsky Programming 7 20-01-2003 16:08
Analog vs Digital inputs? f22flyboy Programming 8 08-11-2002 22:18
Serious Controller Ideas archiver 1999 28 23-06-2002 23:01


All times are GMT -5. The time now is 03:47.

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