View Full Version : Enhanced IO Error
sircedric4
29-01-2011, 11:15
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
class IterativeDemo : public IterativeRobot
{
DriverStationEnhancedIO *ds; // driver station object
under the constructor:
public:
IterativeDemo(void) {
ds = &DriverStation::GetInstance()->GetEnhancedIO(); //new for 2011 - Configurable Pins
use example during the teleoperated:
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.
Alan Anderson
30-01-2011, 00:57
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?
sircedric4
30-01-2011, 09:43
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.
Mark McLeod
30-01-2011, 14:14
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?
sircedric4
30-01-2011, 19:07
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.
sircedric4
01-02-2011, 18:14
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.
Mark McLeod
03-02-2011, 07:21
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.
Joe Ross
03-02-2011, 09:52
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/showthread.php?t=89739
Mark McLeod
03-02-2011, 12:23
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 applicationIf 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.
sircedric4
03-02-2011, 15:08
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.
Greg McKaskle
04-02-2011, 12:56
I'm not sure what the documentation says, but I don't believe the enhanced screen was intended to work virtually.
Greg McKaskle
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.