|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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
Code:
public:
IterativeDemo(void) {
ds = &DriverStation::GetInstance()->GetEnhancedIO(); //new for 2011 - Configurable Pins
Code:
HiLoSwitch = ds->GetDigital(1); //Toggle switch for tower approach GetTubeButton = ds->GetDigital(2); //Button for Getting tube pickup Can someone help us figure out what we are doing wrong. We'll get you whatever additional info you may need. |
|
#2
|
|||||
|
|||||
|
Re: Enhanced IO Error
Quote:
If not, have you enabled Enhanced IO on the Driver Station? |
|
#3
|
||||
|
||||
|
Re: Enhanced IO Error
Quote:
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. |
|
#4
|
|||||
|
|||||
|
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? |
|
#5
|
||||
|
||||
|
Re: Enhanced IO Error
Quote:
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 |
|
#6
|
||||
|
||||
|
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. |
|
#7
|
|||||
|
|||||
|
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. Last edited by Mark McLeod : 03-02-2011 at 08:10. |
|
#8
|
||||||
|
||||||
|
Re: Enhanced IO Error
Quote:
|
|
#9
|
|||||
|
|||||
|
Re: Enhanced IO Error
Mine turned out to be just because the Cypress driver didn't start automatically.
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. Last edited by Mark McLeod : 03-02-2011 at 12:55. |
|
#10
|
||||
|
||||
|
Re: Enhanced IO Error
Quote:
It is a huge relief to know we aren't alone with our issue. I didn't even know how to start. |
|
#11
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|