Go to Post it's much easier to build safety in to a system than to add it on a Thursday at a regional. - dtengineering [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 25-01-2014, 15:41
peronis peronis is offline
Team Leader
FRC #3950 (RoboGym)
Team Role: Mentor
 
Join Date: Sep 2011
Rookie Year: 2012
Location: Glen Head NY
Posts: 43
peronis is on a distinguished road
Digital Module 2 Error Message

Hi all,

We are trying to get our drive running...I know it is a little late. We keep getting the following error on the driverstation.


ERROR: Allocating module that is out of range or not found: Digital Module 2 ...in InitPWM() in C:/WindRiver/workspace/WPILib/PWM.cpp at line 36

We checked the code over and over, and all electrical connections. We opened up the imaging utility and the module status does say ok and the module is green. The digital module is plugged into module 2 on the 4 slot crio. The code uploads fine, and the status light is blinking normally until we run the code. Then the 5V indicator on the digital sidecar and the status light both go out when we enable the robot.

Our robot code is written in C++ using the Command Based model. We've debugged and checked that the default DriveCommand is executing and calling the correct tank drive method with values from the joysticks. Here's the initialization code for the DriveTrain please let us know if you spot anything that could be wrong. It was generated with RobotBuilder.

Code:
void RobotMap::init() {
	// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
	LiveWindow* lw = LiveWindow::GetInstance();
	driveSubsystemSpeedController1 = new Victor(2, 1);
	lw->AddActuator("DriveSubsystem", "Speed Controller 1", (Victor*) driveSubsystemSpeedController1);
	
	driveSubsystemSpeedController2 = new Victor(2, 2);
	lw->AddActuator("DriveSubsystem", "Speed Controller 2", (Victor*) driveSubsystemSpeedController2);
	
	driveSubsystemSpeedController3 = new Victor(2, 3);
	lw->AddActuator("DriveSubsystem", "Speed Controller 3", (Victor*) driveSubsystemSpeedController3);
	
	driveSubsystemSpeedController4 = new Victor(2, 4);
	lw->AddActuator("DriveSubsystem", "Speed Controller 4", (Victor*) driveSubsystemSpeedController4);
	
	driveSubsystemRobotDriveMecanum = new RobotDrive(driveSubsystemSpeedController1, driveSubsystemSpeedController2,
              driveSubsystemSpeedController3, driveSubsystemSpeedController4);
	
// RobotBuilder generated	driveSubsystemRobotDriveMecanum->SetSafetyEnabled(true);
	driveSubsystemRobotDriveMecanum->SetSafetyEnabled(false);
        driveSubsystemRobotDriveMecanum->SetExpiration(0.1);
        driveSubsystemRobotDriveMecanum->SetSensitivity(0.5);
        driveSubsystemRobotDriveMecanum->SetMaxOutput(1.0);
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}
Here's the code in the Drive Subsystem that calls tank drive:

Code:
void DriveSubsystem::TankDrive(float left, float right)
{
	printf("DriveSubSystem::TankDrive->left = %f, right = %f\n", left, right);
	robotDriveMecanum->TankDrive(left, right);
	
}
Thanks,

Team 3950
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2014, 16:24
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,557
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: Digital Module 2 Error Message

Quote:
Originally Posted by peronis View Post
The digital module is plugged into module 2 on the 4 slot crio. The code uploads fine, and the status light is blinking normally until we run the code.
As described at the site below, the digital module in slot 2 is the first digital module and should be referenced as module 1.

http://wpilib.screenstepslive.com/s/...-and-variables

Quote:
Originally Posted by peronis View Post
Then the 5V indicator on the digital sidecar and the status light both go out when we enable the robot.
This indicates a problem with the power to the digital sidecar. Make sure it is connected to a 20 amp breaker in the PDB.
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 02:45.

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