We are happy to announce that a plugin for the 2CAN is now available. The plugin will allow 2CAN users to send and retrieve data to/from Jaguars over CAN using c/c++, Java or Labview. Links to the latest Firmware, Firmware utility and the Plugin are posted at: http://www.crosstheroadelectronics.com/2CAN.htm. The links will be available on the AndyMark website as well. The plugin will also be available on First Forge at: http://firstforge.wpi.edu). The plugin is necessary for the 2CAN to be used in the 2010 FRC.
We installed the 2CAN plug-in as well as installing the newest firmware. We have it hooked up to Ethernet 2 and have done all the necessary steps from the user manual to get it to work. We put the plug-in in the correct folder and have changed the startup DLLs line in the ini file, and we have been getting this error message from the net console during boot:
* Loading StartupDlls: FRC_2CANPlugIn
task 0x1d84c48 (t2) deleted: errno=0 (0) status=0 (0)
Warning: module 0x1de0498 (FRC_2CANPlugIn.out) holds reference to undefined symbol _ZN12SynchronizedC1EP9semaphore.
NI-VISA Server 4.5 started successfully.
task 0xe626f0 (t1) deleted: errno=1835009 (0x1c0001) status=1 (0x1)
Warning: module 0x1de0498 (FRC_2CANPlugIn.out) holds reference to undefined symbol _ZN12SynchronizedD1Ev.
(unloading partially loaded module FRC_2CANPlugIn.out)
...FRC_2CANPlugIn failed to load.
Can anybody explain why this has been happening?
Thanks
-Niles (Team 294)
Ok, Now we have managed to get the plug-in to load, however we are getting these messages that continue as long as the robot is on, and we still are unable to drive the motors connected to the CAN:
* Loading StartupDlls: FRC_UserProgram
task 0x1d84c10 (t2) deleted: errno=0 (0) status=0 (0)
NI-VISA Server 4.5 started successfully.
task 0xe62708 (t1) deleted: errno=1835009 (0x1c0001) status=1 (0x1)
WPILib was compiled from SVN revision 2069
* Loading StartupDlls: FRC_2CANPlugIn
Duplicate symbol:"_Z14wpi_fatal_impliPKcS0_jS0_" loading module FRC_2CANPlugIn.out
2CAN Driver loaded
task 0x21f1ed8 (FRC_2CAN Rx) deleted: errno=0 (0) status=0 (0)
task 0x21ece18 (FRC_2CAN Tx) deleted: errno=0 (0) status=0 (0)
task 0x21f1ed8 (FRC_2CAN Rx) deleted: errno=0 (0) status=0 (0)
Welcome to LabVIEW Real-Time 8.6.1f2
task 0x21ece18 (FRC_2CAN Tx) deleted: errno=0 (0) status=0 (0)
task 0x21f1ed8 (FRC_2CAN Rx) deleted: errno=0 (0) status=0 (0)
task 0x21ece18 (FRC_2CAN Tx) deleted: errno=0 (0) status=0 (0)
task 0x21f1ed8 (FRC_2CAN Rx) deleted: errno=0 (0) status=0 (0)
task 0x21ece18 (FRC_2CAN Tx) deleted: errno=0 (0) status=0 (0)
task 0x21f1f58 (FRC_2CAN Rx) deleted: errno=0 (0) status=0 (0)
task 0x21ece18 (FRC_2CAN Tx) deleted: errno=0 (0) status=0 (0)
task 0x21f20a8 (FRC_2CAN Rx) deleted: errno=0 (0) status=0 (0)
task 0x21ece18 (FRC_2CAN Tx) deleted: errno=0 (0) status=0 (0)
task 0x21f21f8 (FRC_2CAN Rx) deleted: errno=0 (0) status=0 (0)
task 0x21ece18 (FRC_2CAN Tx) deleted: errno=0 (0) status=0 (0)
task 0x21f21f8 (FRC_2CAN Rx) deleted: errno=0 (0) status=0 (0)
>>>>ERROR: status == -10 (0xFFFFFFF6) in sendMessage() in C:/WindRiver/workspace/FRC2010/CANJaguar/CANJaguar.cpp at line 181
>>>>ERROR: status == -52007 (0xFFFF34D9) in sendMessage() in C:/WindRiver/workspace/FRC2010/CANJaguar/CANJaguar.cpp at line 176
The status light appears to be blinking orange/red.
Any Reason this would happen?
-Niles (Team 294)
How did you get the plugin to load.
Thanks,
Julian
Follow the directions in the 2CAN user manual to edit ni_rt.ini on the robot and add a reference to FRC_2CANPlugIn to the StartupDlls line.
The first time around we didn’t follow the 2CAN instructions exactly, and put the reference to FRC_2CANPlugIn before FRC_UserProgram like the black jaguar plugin instructions tell you to. Apparently the FRC_2CANPlugIn uses some functions in WPILib (Synchronization class) that aren’t loaded until the FRC_UserProgram is loaded, which is why we got the errors the first time around. Moving the 2CAN plugin after the UserProgram fixed this error and allowed the plugin to load.
That said, we still don’t have CAN bus control yet via the plugin, per Niles’ latest post. We’ll see if we get any further Friday evening.
I think we are seeing similar behavior as noted in this thread: http://www.chiefdelphi.com/forums/showthread.php?threadid=80821
I will work on it tonite and report back. At least the Jag talks to the 2CAN!
We are looking into these issues and will get back to you soon. If you find the problem please post the solution.
Is the LED on the 2CAN blinking?
If yes, is it blinking orange then off or orange then red?
Yes, it’s blinking. Orange/off/orange/off from what I recall; I’ll doublecheck in a couple hours when we’re back in the lab.
We can connect to the 2CAN using the web interface and it can see the Jaguar on the CAN bus.
The same with us (blinking red while being able to see the 2CAN network on the browser). Noticing on trying to download code that the FRC_2CANPlugIn.out fails to load.
I suspect the problem is that FRC_UserProgram isn’t imaged in when the cRIO is imaged for labview. Since the 2CAN plugin uses some of the library that’s probably why its crashing. Darn, I thought i had removed all references to classes in the library (Nice catch peterjohnson). Expect an update soon.
Omar Zrien
CTRE Software/Firmware Engineer
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
Ours is working now (basically as soon as I turned on the robot). The 2CAN is still blinking orange/off/orange/off but the motor now drives via CAN! We fixed a couple of things very late in the day on Wednesday in both wiring (e.g. connecting the motor) and programming, so it’s likely we didn’t hit everything in testing we should have.
The key thing is indeed to order the StartupDlls correctly (for C++), at least until Omar gets the update out :).
Hi - just curious, will the plugin source also be available on firstforge as with the BlackJag plugin? Hoping the answer is “yes” - great stuff for student team members to learn from, and also provide a way for the community to contribute.
- Ron
Team #2607 controls mentor
Yes, it will be available soon. As soon as we update the plugin.
We are able to get the 2CAN to communicate via the cRIO with the jaguars. We are able to get the voltage bus and the temp. The 2CAn blinks green as long as we are in teleop. We cannot get the robot to move via the 2can. This occurs even if we set the CanJaguar to 1.0
Thanks for any help,
Julian Binder
I’m now having an issue with the 2CAN plugin vs. camera dashboard. If the 2CANPlugin is loaded in StartupDlls, I get no camera at the dashboard (or camera data inside the UserProgram). If I delete the 2CANPlugin from the list of StartupDlls and reboot the cRIO, I get camera data at the dashboard. Any suggestions? I’m guessing there’s some sort of networking contention issue between the UserProgram and the plugin? There is no CANJaguar code in the UserProgram, only camera dashboard/processing.
The plugin needs to be loaded before the user program so that when the user program tries to use the CANJaguar class it won’t get an error about the plugin not being loaded. The plugin definitely needs to not depend on WPILib entry-points.