Go to Post If there's one bit of advice I can give, its never underestimate the power of a hurricane. - Joshua May [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-01-2011, 11:15
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Enhanced IO Error

Our team is trying to use the enhanced IO on the driver station this year because we are going to be using 13 digital inputs. I am having trouble getting the code correct I believe. When we try to enable the robot, the robot loses communication and we are seeing this error:

"Fatal error "IO is not attached or Enhanced IO is not enabled." in GetAnalogInRatio() in C:/windriver/workspace/WPILib/DriverStationEnhancedIO.cpp at 201"

I believe this error maybe because I am not setting everything up correctly in my code and it is crashing at run time. My problem is that the example code in the WPI User guide is setup for the SimpleRobot and we always use the IterativeRobot with the additional pointer stuff. Here's my current code:


under the class
Code:
class IterativeDemo : public IterativeRobot
{
	DriverStationEnhancedIO *ds;		// driver station object
under the constructor:
Code:
public:
	IterativeDemo(void)	{
	ds = &DriverStation::GetInstance()->GetEnhancedIO();	//new for 2011 - Configurable Pins
use example during the teleoperated:
Code:
		
HiLoSwitch = ds->GetDigital(1);	//Toggle switch for tower approach
GetTubeButton = ds->GetDigital(2);			//Button for Getting tube pickup
I suspect I am not constructing the ds variable correctly and everything is dying from there. I cannot find an example using the EnhancedIO driver station using the pointer method of variable handling that is done in IterativeRobot.

Can someone help us figure out what we are doing wrong. We'll get you whatever additional info you may need.
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2011, 00:57
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Enhanced IO Error

Quote:
Originally Posted by sircedric4 View Post
When we try to enable the robot, the robot loses communication and we are seeing this error:

"Fatal error "IO is not attached or Enhanced IO is not enabled." in GetAnalogInRatio() in C:/windriver/workspace/WPILib/DriverStationEnhancedIO.cpp at 201"

...Can someone help us figure out what we are doing wrong. We'll get you whatever additional info you may need.
Do you have the Cypress board connected?

If not, have you enabled Enhanced IO on the Driver Station?
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2011, 09:43
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Enhanced IO Error

Quote:
Originally Posted by Alan Anderson View Post
Do you have the Cypress board connected?

If not, have you enabled Enhanced IO on the Driver Station?
We do not have the Cypress board connected, but in the past we could use the I/O screen on the Driver Station without any issues.

We went under Configure on the I/O screen and selected Enhanced and set the pins the way we wanted. 1-13 as Input (pulled high) and 14-16 as Output. We did not change PWM1 or PWM2 Period, nor did we touch Q Enc Index Enable. I assume this enabled the Enhanced IO?

When we try to change the inputs on the I/O screen on the driver station by clicking on the light beside the Digital input it does not change the color like the old I/O setup.

Do you believe it maybe a driver station or user error issue and not necessarily the way I am using it in the code. I am leery of using that & in the "ds = &DriverStation::GetInstance()->GetEnhancedIO();", but that is the only way I could get it to compile. I have no idea if that is the correct code mechanism.
Reply With Quote
  #4   Spotlight this post!  
Unread 30-01-2011, 14:14
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,862
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: Enhanced IO Error

Changing the pins does not enable Enhanced mode.

Did you choose the Enhanced radio button in the bottom left of the Configure I/O screen?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 30-01-2011, 19:07
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Enhanced IO Error

Quote:
Originally Posted by Mark McLeod View Post
Changing the pins does not enable Enhanced mode.

Did you choose the Enhanced radio button in the bottom left of the Configure I/O screen?
Yes, that then brought up the new screen with all buttons and leds and digital inputs and such. It is a very busy screen compared to the old I/O screen.

Still getting the same error.

UPDATED: I figured out why we were dropping communciation during the teleoperated period. It had to do with creating a new build target when I copied my workspace for a new version. Apparantly the defaults for a new build target are not setup properly for a FIRST robot. I am instead creating a new Example each time and then dragging my code into the new example for each version. If your code drops communications during enabling, your build target may be setup wrong.

Still can't get the Enhanced IO to work though, and still receiving the IO error. Still need help figuring that out.

Last edited by sircedric4 : 31-01-2011 at 07:36. Reason: Added Update
Reply With Quote
  #6   Spotlight this post!  
Unread 01-02-2011, 18:14
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Enhanced IO Error

I don't like to double post, but is no one else having this issue? We are still having this EnhancedIO error.

We have reinstalled the DriverStation update so that didn't fix this problem.
We have tried it with the Cypress board installed.

This error does not show up using the regular compatible I/O. Whatever is going on, while we try to use the Enhanced I/O, the digital input radio buttons do not work on the Driver Station.

Help, please.
Reply With Quote
  #7   Spotlight this post!  
Unread 03-02-2011, 07:21
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,862
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: Enhanced IO Error

I was just able to recreate this error on a different laptop.

Enhanced mode works on a Cypress connected to a Classmate, but the same board generates the error you're getting when connected to a different laptop (same cRIO).
I did test with different programming environments and it also happens in LabVIEW.

I haven't had time to investigate further yet, but it's almost certainly a PSOC software installation issue.
The Classmate had been wiped by the reimage, but the laptop just had C++ and LabVIEW uninstalled. The new PSOC software was installed overtop the old.
I'm going to try removing/uninstalling all the Cypress drivers, then reinstalling it.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 03-02-2011 at 08:10.
Reply With Quote
  #8   Spotlight this post!  
Unread 03-02-2011, 09:52
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Enhanced IO Error

Quote:
Originally Posted by Mark McLeod View Post
I haven't had time to investigate further yet, but it's almost certainly a PSOC software installation issue.
The Classmate had been wiped by the reimage, but the laptop just had C++ and LabVIEW uninstalled. The new PSOC software was installed overtop the old.
I'm going to try removing/uninstalling all the Cypress drivers, then reinstalling it.
Team 1983 had the same issue and posted instructions http://www.chiefdelphi.com/forums/sh...ad.php?t=89739
Reply With Quote
  #9   Spotlight this post!  
Unread 03-02-2011, 12:23
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,862
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: Enhanced IO Error

Mine turned out to be just because the Cypress driver didn't start automatically.
  • Start ->Control Panel ->Administrative Tools -> Services
  • Look for CyMiniProg3Service and start it (if it isn't already running)
  • Restart the Driver Station application
If it's already started or the previous steps don't get it recognized by the Driver Station application, then you do need to remove the old Cypress software and reapply the Driver Station Update.
You might be able to either uninstall all the Cypress software yourself or run the Driver Station Update and choose the Remove option for what you can, then run the installer a second time to add it back in.
I'll run a few more tests to see what's necessary, but removing everything couldn't hurt.

I did note that without the Cypress board connected, I can use the virtual buttons in Compatibility mode, but not the buttons in Enhanced mode.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 03-02-2011 at 12:55.
Reply With Quote
  #10   Spotlight this post!  
Unread 03-02-2011, 15:08
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Enhanced IO Error

Quote:
I did note that without the Cypress board connected, I can use the virtual buttons in Compatibility mode, but not the buttons in Enhanced mode.
This is exactly the same issue we were having. None of the virtual buttons work in Enhanced mode. We'll look at the procedure above this one, and keep an eye on your progress.

It is a huge relief to know we aren't alone with our issue. I didn't even know how to start.
Reply With Quote
  #11   Spotlight this post!  
Unread 04-02-2011, 12:56
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Enhanced IO Error

I'm not sure what the documentation says, but I don't believe the enhanced screen was intended to work virtually.

Greg McKaskle
Reply With Quote
Reply


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 13:55.

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