Struggling with LabView and Talon SRX CAN

No one on my team is very versed with LabView. I have just been recycling the same code year after year. Unfortunately? I am unable to do that this year, as we are planning to use CAN motor controllers. We got them all updated and programmed yesterday so they have their own ID numbers. I can’t for the life of me figure out how to program them though. We used to just pick an Open 4 Motor and assign the PWMs and boom, we were done. I just can’t figure this out. ANY help is appreciated. I read the Software Reference Manual for the Talon SRX, installed the special vi’s, but it doesn’t make any sense to me.

Thanks in advance.

  1. You should really read the rules in the manual as they pertain to software development before Kickoff. (I don’t know for sure if you’d be violating them, but it’s possible.)
  2. As was announced months ago on the FRC blog, third-party device code is out of WPILib starting this year. Read this: http://wpilib.screenstepslive.com/s/4485/m/13811/l/599752-talon-srx-can
  1. By recycling I mean rebuilding. It’s pretty simple code to re-write. We create a fresh version of the code every year.

  2. I saw that, I installed the stuff that gave me the vi’s pertaining to the Talon, but I don’t know what to do with them, which is where the problem lies.

Our team did the same thing and we switch over to CAN Talon SRX. I found that you had to mix the Motors controllers and specially VI’s. I also found code examples by searching in google images “CAN Talon SRX Example Code”. If you need any help I am also available via skype or email. Just direct message me. Also Github has examples.
Happy building

1 Like

First, download the toolsuite. The CAN SubVIs are not included in this year’s labview distribution.

http://www.ctr-electronics.com/downloads/installers/CTRE%20Toolsuite%20v4.4.1.9.zip

Install, then download the FRC examples – use these for some guidance.

The basic programming of the Talon SRX is the same as the old Talon, but the SRX can do much much more! Have Fun!

I had this struggle because I wanted to open four motors for the mecanum drive. This is what worked for me:

Download the CTR SRX libraries.
Modify the open 4motor vi by replacing the open motors, with the open motors from the srx palette. Replace variable accordingly.

If you have any questions on the exact process, let me know, I’d love to help.

You should not have to modify any existing sub-VIs to have CAN Talon SRX work with the Open 2/4 Motor VIs. In fact, I would definitely recommend not doing these modifications unless you are extremely proficient in LabVIEW.

To use CAN Talon SRX with these multi-motor Open VIs, wire the output of the Talon SRX Open VI to the input of the Open 2/4 Motor VI when “Existing Motors” is selected from the drop-down. There is an example of this in our LabVIEW Simple Arcade Drive Example on GitHub.

For those who don’t want to go digging around in GitHub, here’s a screenshot of what this should look like.

The numbers (1,2,3,4) correspond to the Device IDs you gave the Talons when you set them up on the Rio’s configuration page.

You may have to change which motors are inverted based on your robot’s setup.

Drive - Open 4 Talon SRX.PNG


Drive - Open 4 Talon SRX.PNG

Thank you for the diagram. My programmers took one look and left smiling!

I just want to thank you all for this thread. I am an English teacher who tinkers with tech and became the lead programmer/ tech mentor for my school’s rookie year. As an English teacher, the syntax-light metaphoric approach labview takes to programming is right up my alley. However, I find myself struggling any time I want to perform an advanced task (if/ then statements took a long time to really understand in labview). So, as we prepare for kickoff, I am multitasking…

  1. Teach students the basics of labview and how to use it to control a robot.
  2. Learn how to use can to introduce finesse to our design.
  3. Learn targeting.
  4. Learn pneumatics.

Step 1 is going well with a new team of electricians/programmers, and thanks to this thread, Step 2 is well on its way. Thanks again for this resource.