Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Changing digital module (http://www.chiefdelphi.com/forums/showthread.php?t=128293)

Zach S. 28-03-2014 10:26

Changing digital module
 
In the robotics class I help teach we are trying to get the class to build a bot for their final project. We have an 8 slot crio available for them, however, slot 2 for the digital module is faulty and we MUST use slot 6 for it. I have tested the slot in lab view and know it works.

My question is how in C++ do I change the digital module slot for the robot drive motors?

Alan Anderson 28-03-2014 10:54

Re: Changing digital module
 
Instantiate each of the drive motor controllers explicitly. Then, instead of giving PWM channels to the 'drive constructor, pass the motor controller objects.

Zach S. 28-03-2014 12:47

Re: Changing digital module
 
Quote:

Originally Posted by Alan Anderson (Post 1365938)
Instantiate each of the drive motor controllers explicitly. Then, instead of giving PWM channels to the 'drive constructor, pass the motor controller objects.

Okay! I've initialized the jaguars and plugged those into RobotDrive. The only issue now is when I run the code on the robot the forward works, yet when I try to go reverse the motor does not move. I can see that the jaguar IS getting the code (turns red on reverse as it should) just the motor does not move. Could this be an error with the motor itself, or possible to still be within the code?

Zach S. 28-03-2014 12:54

Re: Changing digital module
 
Update: just tested with a different drive motor and still no reverse so the problem either lies in the jaguar or the code if I am correct

Zach S. 28-03-2014 13:26

Re: Changing digital module
 
Update 2: it seems the jaguars we had were broken and don't go reverse, I hooked one of the drive ones from our main robot onto it and it worked fine. All is working now, thank you again!

Alan Anderson 28-03-2014 13:44

Re: Changing digital module
 
If a Jaguar runs a motor in one direction but not the other, make sure both of its limit switch jumpers are correctly installed.

Zach S. 31-03-2014 07:25

Re: Changing digital module
 
Quote:

Originally Posted by Alan Anderson (Post 1365993)
If a Jaguar runs a motor in one direction but not the other, make sure both of its limit switch jumpers are correctly installed.

Okay, I'll take a look at those today as well!


All times are GMT -5. The time now is 12:09.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi