|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
CRIO Slot 4 "Digital module 4 is not present."
We have reimaged the CRIO with the slots in 1,3 and 4 (1=analog,3=pneumatic,4=digital) and deployed code where the speed controllers are declared using
Code:
SpeedController s = new Talon(4,1); Output when deployed: Code:
[cRIO] Digital module 4 is not present. [cRIO] Uncaught exception in Thread.run(): [cRIO] on thread testing.Test - main [cRIO] edu.wpi.first.wpilibj.util.AllocationException: PWM channel 1 on module 4 is already allocated [cRIO] at edu.wpi.first.wpilibj.PWM.initPWM(PWM.java:116) [cRIO] at edu.wpi.first.wpilibj.PWM.<init>(PWM.java:135) [cRIO] at edu.wpi.first.wpilibj.SafePWM.<init>(SafePWM.java:43) [cRIO] at edu.wpi.first.wpilibj.Talon.<init>(Talon.java:59) [cRIO] at testing.Test.<init>(Test.java:26) [cRIO] in virtual method #11 of com.sun.squawk.Klass(bci=53) [cRIO] at com.sun.squawk.imp.MIDletMainWrapper.main(99) [cRIO] in virtual method #95 of com.sun.squawk.Klass(bci=25) [cRIO] at com.sun.squawk.Isolate.run(1506) [cRIO] at java.lang.Thread.run(231) [cRIO] in virtual method #47 of com.sun.squawk.VMThread(bci=42) [cRIO] in static method #3 of com.sun.squawk.VM(bci=6) Full code of test: Code:
public class Test extends IterativeRobot {
private Joystick j = new Joystick(1);
private SpeedController s1 = new Talon(4, 1),
s2 = new Talon(4, 2),
s3 = new Jaguar(4, 3),
s4 = new Jaguar(4, 4),
s5 = new Jaguar(4, 5),
s6 = new Jaguar(4, 6);
/**
* This function is called periodically during operator control
*/
public void teleopPeriodic() {
double speed = j.getRawAxis(3);
SmartDashboard.putNumber("Speed", speed);
s1.set(speed);
s2.set(speed);
s3.set(speed);
s4.set(speed);
s5.set(speed);
s6.set(speed);
}
}
|
|
#2
|
||||
|
||||
|
Re: CRIO Slot 4 "Digital module 4 is not present."
Forgot to mention that CRIO is the 4 slot model. It is properly imaged with v47 of Java image.
|
|
#3
|
||||
|
||||
|
Re: CRIO Slot 4 "Digital module 4 is not present."
The reason that is not working is that when you put a module in slot 4, the code sees that as module 2 of that type. So instead of declaring (4,1) declare (2,1) and it should work. Also there has to be a digital module in slot 2 because of the rules. This is so the RSL light has a place to connect to.
|
|
#4
|
||||
|
||||
|
Re: CRIO Slot 4 "Digital module 4 is not present."
Thanks. Solved.
|
|
#5
|
|||
|
|||
|
Re: CRIO Slot 4 "Digital module 4 is not present."
As of 2012, instead of declaring each slot number, you now have to only say if the module is in it primary position (1), or its secondary position (2).
|
|
#6
|
||||
|
||||
|
Re: CRIO Slot 4 "Digital module 4 is not present."
Please pay close attention to what the previous poster said about digital side car position.
In 2011, we thought we were able to put it in the secondary slot (we had some dimensional interferences with it in the first slot). At inspection, we found that you MUST have one in the first slot. Your robot may work fine other than the signal light, but you will not pass inspection if your inspector is on the ball. |
|
#7
|
||||
|
||||
|
Re: CRIO Slot 4 "Digital module 4 is not present."
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|