Go to Post F.I.R.S.T. Troubleshooting Rule #1 - If you work on software, the problem is always with hardware. If you work with hardware, the problem is always with software ;) - Redneck [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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: 44
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
 


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:38.

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