TalonSRX in position mode Help please

Our setup:
2 CIM (per side) single speed drivetrain (kit bot) controlled by 4 TalonSRX controllers 2 of which have a quadrature encorder (one per side) directly wired (through the breakoutboard) to the Talons. The talons are wired over the CAN bus and have been given ID numbers over the web interface.

We are currently driving just fine in teleop but now want to focus on autonomous and some semi-autonomous functions in teleop.

We have searched and searched, and read the CTRE software manual but are still very unsure how to drive a set distance using the talons and encoders (using labview).

Ultimately, in autonomous we would like to drive a set distance, stop, turn some amount, stop, drive a set distance, stop. I have also looked into the motion profiles but was confused.

We would love some help or direction on a good resource that can take us from start to finish on this.

Thanks CD.
Team 6323

There are 2 SRX manuals: the User’s Guide and the Software Reference Manual.

Have you read the Software Reference Manual?

If so, could you be a bit more specific about what part you did not understand?

In Section 7.1 of the software manual, Where is the pink wire (going into the Talon Set Ref) coming from?

I’m looking for an example where I give the Talon an encoder position (or count) to drive to.

In section 10.1 it talks about Position Closed-Loop but I don’t think it’s giving me what I need.

In our begin.vi we currently have 4 Open Talon blocks which is wired to an Open 4 Motor Drive block.

*I will step aside and let the LabVIEW gurus take over from here.

The pink wire is the Talon SRX Reference - it’s the same pink wire that is created from the Open VI and then used in a normal Motor SetRef VI. It is not the Reference from an Open 4 Motors VI.

We have several examples (for all FRC languages, including LabVIEW) on our GitHub here.

Take a look at the LabVIEW Position Control Example and it should give you what you need.

As a note, if you want to use the Talon SRX’s built-in closed loop features, you shouldn’t use the Open 2/4 Motor VIs. You’ll need to use the Talon SRX VIs as shown in the Manual and Example Code.

One final note, I noticed you had mentioned Motion Profiling. If you want to try it, take a look at Motion Magic - it’s much simpler to set up than Motion Profiling but gives you the same benefits. (We have an example for this, too!)

Thank you for your replies.
Just to clarify, if I am trying to use motion magic or any sort of closed loop on my drivetrain (which is controlled by 4 talon srx’s and encoders) I should or should not have 4 open talon vi’s feeding into an “open 4 motors” vi block as in my begin.vi (Just like in the Talon Software manual section 3.4.1).

If I should not have the above, how do I set up my 4 talons as a drivetrain?

Thanks again,
Team 6323