Go to Post Wait, we have to be logical? - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 12-01-2012, 18:21
michael714's Avatar
michael714 michael714 is offline
Registered User
FRC #3863 (Pantherbotics)
Team Role: Teacher
 
Join Date: Apr 2006
Rookie Year: 2007
Location: Newbury Park, CA
Posts: 46
michael714 is on a distinguished road
Digital Module not present, when it is

Condensed problem:
Netbeans gives error:
Code:
[cRIO] Digital Module 6 is not present.
We have a working Digital Module NI 9403 with a working DB-37 cable connected to a working Digital Sidecar, and in the code I call a jaguar using "jaguar(6,1)". The code loads ONLY with aforementioned error, and runs - but I get no response from the jaguar. All other features of code work, but nothing associated with the digital sidecar/module.


Full, in-depth problem:
We uploaded the new firmware to the cRIO and our 2011 classmate (via provided Key) and to our developer laptop. We then proceeded to upload the SAME EXACT CODE that was on the robot before the update - when it was working. That's when we first got an error, something to the lines of
Code:
[cRIO] Digital Module 1 is not present.
[cRIO] Digital Module 4 is not present.
That error was repeated several times each, with probably ten lines of module 1 and five lines of module 4 errors right after it, and the code would NOT run. After doing some research, we discovered that we are using the old cRIO with 8 slots, and slots 4 and 8 have become obsolete this year. By the time we realized this, we had already changed the code so it only had essentially one line of code, that called a jaguar in slot 2 (where we moved the digital module). It continued to give us the error "Digital Module 2 is not present" (no longer complained about slot 1, which has an analog module in it BTW). So, we switched our old cable (idk what it's called) for the new DB-37 ribbon cable ***we had to fix the cable, as instructed by FIRST***. No change. Changed our Older Digital Module for one we got Brand New this year. No change. Then switched the older Digital Sidecar for the new one we got, removing every cable except the essential cables, and the jaguar in channel 1. No change. (At this point, I think I was going to throw the laptop at the robot *eyeroll*) We decided to simplify the code even more. We changed to a digital VEX button, added a System.out.println(<status of button, true or false>) and then ran again. We got the same error as usual, "Digital Module 2 is not present" (only got this error printed twice, irrelevant though) and ran the robot. The System.out kept printing false, regardless of whether or not I held the button down.


Extra Info:
Somewhere along the lines, I had the code call the jaguar from a slot where the digital module ACTUALLY was not present. We did NOT get an error from the cRIO, when it physically was not present, but got the error when it physically was present. Ironic, right? We've searched for hours on this, and couldn't find anything related to this problem... kinda annoying. After 4 days of working on this, trying to debug the problem, we need some help.


Soo.... any ideas?
Just please don't tell us to plug in the module
Reply With Quote
  #2   Spotlight this post!  
Unread 12-01-2012, 18:24
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Digital Module not present, when it is

Quote:
Originally Posted by michael714 View Post
Soo.... any ideas?
Just please don't tell us to plug in the module
Plug in the module.....in Slot 2, and update your code to call it as Digital Module 1 instead of Slot 6. See page 15 of the Getting Started with Java document on the WPILib project.
Reply With Quote
  #3   Spotlight this post!  
Unread 12-01-2012, 19:19
sebflippers sebflippers is offline
Registered User
FRC #2914
 
Join Date: Jan 2012
Location: dc
Posts: 56
sebflippers will become famous soon enoughsebflippers will become famous soon enough
Re: Digital Module not present, when it is

I had the exact same problem, only different. Mine was with the solenoid breakout module. Just for clarification you meant page 14 of this guide, right (because there was nothing on page 15):
http://first.wpi.edu/Images/CMS/Firs...va_for_FRC.pdf
Reply With Quote
  #4   Spotlight this post!  
Unread 12-01-2012, 19:35
sebflippers sebflippers is offline
Registered User
FRC #2914
 
Join Date: Jan 2012
Location: dc
Posts: 56
sebflippers will become famous soon enoughsebflippers will become famous soon enough
Re: Digital Module not present, when it is

is there some reason my last reply didn't show up?
Reply With Quote
  #5   Spotlight this post!  
Unread 12-01-2012, 19:36
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Digital Module not present, when it is

Quote:
Originally Posted by sebflippers View Post
is there some reason my last reply didn't show up?
If it had a link it must be approved by moderators before showing up. I would assume based on the speed of some posts here that this requirement goes away once a certain post or rep threshold is reached.
Reply With Quote
  #6   Spotlight this post!  
Unread 12-01-2012, 19:37
sebflippers sebflippers is offline
Registered User
FRC #2914
 
Join Date: Jan 2012
Location: dc
Posts: 56
sebflippers will become famous soon enoughsebflippers will become famous soon enough
Re: Digital Module not present, when it is

guess it didn't. I checked the Getting_Started_with_Java_for_FRC.pdf, and there was nothing good on page 15. Anyway, I am having the same problem with the solenoid breakout, so I really need a fix.

Yea, it did have a link.
Reply With Quote
  #7   Spotlight this post!  
Unread 12-01-2012, 19:40
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Digital Module not present, when it is

Quote:
Originally Posted by sebflippers View Post
guess it didn't. I checked the Getting_Started_with_Java_for_FRC.pdf, and there was nothing good on page 15. Anyway, I am having the same problem with the solenoid breakout, so I really need a fix.

Yea, it did have a link.
Does your document say Rev 5.0 January 5, 2012 on the bottom of the first page? I just checked the one on the WPILib project and it certainly does have the info you are looking for on pages 15 and 16
Reply With Quote
  #8   Spotlight this post!  
Unread 12-01-2012, 19:48
sebflippers sebflippers is offline
Registered User
FRC #2914
 
Join Date: Jan 2012
Location: dc
Posts: 56
sebflippers will become famous soon enoughsebflippers will become famous soon enough
Re: Digital Module not present, when it is

nope, i seem to be looking at the wrong one, but i can't find revision 5. Could you please post the link. you seem like a senior enough member to be allowed to.
Reply With Quote
  #9   Spotlight this post!  
Unread 12-01-2012, 19:50
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Digital Module not present, when it is

Here's the link to the document:
http://firstforge.wpi.edu/sf/go/doc1199?nav=1
Reply With Quote
  #10   Spotlight this post!  
Unread 12-01-2012, 20:12
michael714's Avatar
michael714 michael714 is offline
Registered User
FRC #3863 (Pantherbotics)
Team Role: Teacher
 
Join Date: Apr 2006
Rookie Year: 2007
Location: Newbury Park, CA
Posts: 46
michael714 is on a distinguished road
Re: Digital Module not present, when it is

You rock! That totally helped us. Thanks.
Reply With Quote
  #11   Spotlight this post!  
Unread 12-01-2012, 20:14
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Digital Module not present, when it is

Quote:
Originally Posted by sebflippers View Post
nope, i seem to be looking at the wrong one, but i can't find revision 5. Could you please post the link. you seem like a senior enough member to be allowed to.
I guess I'm not yet. Go to firstforge.wpi.edu and locate the WPILib project. The document is in the Documents section, under C++ and Java documentation and is called Java Getting Started Guide
Reply With Quote
  #12   Spotlight this post!  
Unread 12-01-2012, 20:18
sebflippers sebflippers is offline
Registered User
FRC #2914
 
Join Date: Jan 2012
Location: dc
Posts: 56
sebflippers will become famous soon enoughsebflippers will become famous soon enough
Re: Digital Module not present, when it is

found it. Thanks for the help!
Reply With Quote
  #13   Spotlight this post!  
Unread 20-01-2012, 20:05
Twisted eric's Avatar
Twisted eric Twisted eric is offline
Registered User
FRC #0581
 
Join Date: Jan 2010
Location: San Jose
Posts: 54
Twisted eric is an unknown quantity at this point
Re: Digital Module not present, when it is

I have read through the naming on the pdf and don't know what I did wrong can some one tell me I.


When I load the code It reads out" Digital module 1 is present"
Here is my code

Code:
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Watchdog;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Victor;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.DigitalInput;


public class RobotTemplate extends SimpleRobot {

    private static final long TIME_DELAY = 1000; //in milliseconds
    RobotDrive drive = new RobotDrive(1,2);
    Joystick leftStick = new Joystick(1);
    Joystick rightStick = new Joystick(2);
    Joystick doom = new Joystick(3);
    Watchdog fenrir = Watchdog.getInstance();
    Jaguar spot = new Jaguar(3);
    Jaguar rex = new Jaguar(8);
    Jaguar cooper = new Jaguar(9);
    Jaguar comet = new Jaguar(4);
    Victor Bowser = new Victor(10);
    DriverStation ds;

    public void autonomous() {
        fenrir.feed();


    }

    void clawin() {
        if (doom.getRawButton(2)) {
            spot.set(1.0);
            cooper.set(1.0);
        }
    }

    void clawout() {
        if (doom.getRawButton(3)) {
            spot.set(-1.0);


        }
    }

    void clawout2() {
        if (doom.getRawButton(3)) {
            cooper.set(-1.0);

        }

    }

    void up() {
        if (doom.getRawButton(4)) {
            spot.set(-1.0);

        }

    }

    void up2() {
        if (doom.getRawButton(4)) {


            cooper.set(1.0);
        }

    }

    void down() {
        if (doom.getRawButton(5)) {
            spot.set(1.0);

        }

    }

    void down2() {
        if (doom.getRawButton(5)) {

            cooper.set(-1.0);
        }

    }

    void stop() {
        if (doom.getRawButton(1)) {
            cooper.set(0.0);
            spot.set(0.0);

        }


    }

    void minideploy() {

        if (leftStick.getRawButton(2)) {
            Bowser.set(1.0);

        } else {
            Bowser.set(0.0);
        }
    }

    void mini() {

        if (leftStick.getRawButton(3)) {
            Bowser.set(-1.0);

        } else {
            Bowser.set(0.0);
        }

    }

    void armre() {

        if (leftStick.getRawButton(1)) {
            comet.set(-1.0);

        } else {
            comet.set(0.0);

        }
    }

    public void operatorControl() {
        while (true && isOperatorControl() && isEnabled()) {
            drive.tankDrive(leftStick, rightStick);
            down();
            down2();
            up();
            up2();
            armre();
            clawout();
            clawin();
            rex.set(doom.getY());
            stop();
            clawout2();
            minideploy();
            mini();
            fenrir.feed();
        }
    }
}

Last edited by Twisted eric : 20-01-2012 at 20:13. Reason: minor typo
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 12:21.

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