Go to Post We will be stressed, we will be angry. But we need to hold ourselves to a higher standard, we need to be role models and inspirations to students. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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
  #1   Spotlight this post!  
Unread 02-21-2011, 12:49 PM
mutantblond mutantblond is offline
Registered User
FRC #2523
 
Join Date: Sep 2008
Location: st. johnsbury, vt
Posts: 43
mutantblond is an unknown quantity at this point
Analog Breakout trouble-shooting

Wasn't sure whether to post this in the Sensors forum or here...
I am trouble-shooting our analog breakout board to use it with a pot.
At this point, i'm just trying to read the input signal from the board, using printf statements and looking at the Analog Input lights on the I/O screen of the Driver Station. I have the PWM wired with 5V and ground on the middle pin and pin closest to the board, respectively, and a DC signal to the inside pin. The pertinent code looks like the following:

elbow = new Analogchannel(8); //PWM is connect to the pin closest to the jumpers - the outside 2 pins are jumpered
DriverStationLCD *dsLCD = DriverStationLCD::GetInstance();

while(1)
{
voltage = elbow->GetValue();
dsLCD->Printf(DriverStationLCD::kUser_Line1, 1,"Voltage is %d",voltage);
dsLCD->UpdateLCD);
Wait(1.0);
}

A few things are happening -
1. the print out is giving me values of 1441 -ish (was 0 last night), and they don't change if I vary the input voltage.
2. I don't see any signal on the Analog Input indicators in the I/O window
3. I'm gett the following Message in the Diagnostics window:
Fatal error"Attempting to reuse an allocated resource" in Allocate() in C:/windriver/workspace/WPLib/Resource.cpp at line 76
Modifed Network Configuration: Set The object already exists.

I/O unit not detected or not installed correctly.


We are currently running in Autonomous mode.
The analog board is connected to the 9201 which is in slot 1 of the CRIO.

I've been working on this for hours, with no luck.
any help is appreciated.
Reply With Quote
 


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


All times are GMT -5. The time now is 09:57 AM.

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