|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||||
|
|||||
|
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.
|
|
#3
|
|||
|
|||
|
Re: Changing digital module
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?
|
|
#4
|
|||
|
|||
|
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
|
|
#5
|
|||
|
|||
|
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!
|
|
#6
|
|||||
|
|||||
|
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.
|
|
#7
|
|||
|
|||
|
Re: Changing digital module
Okay, I'll take a look at those today as well!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|