Talon SRX Magnetic Encoder programming in Labview

Hi everyone,

We’ve been trying something new this year with magnetic encoders wired to the talon. I’ve read through the manuals, but as a relatively new programmer a lot of it didn’t make sense to me. I’ve also downloaded the example programs, but all they showed me was how to declare the SRXs. Can anyone give me a good starting point and a quick explanation of the programming involved?

Side note: The motor and the magnetic encoder are wired to two separate talon srxs. Could this cause an issue?

So the setup is really the hard part here IMO. I am not sure exactly why you have them wired to two different Talon SRXs but I assume you have a good reason. That is not a deal breaker it just makes your setup a little more complicated. You will need to use the Configure Remote Source VI, but it sounded like you had a handle on the setup part so lets talk about the actual use of the Mag Encoder.

Once you have the encoder set up it depends on what you want to do with it! If we know what this motor is powering we can likely give better advice. Having the sensor configured will allow you to use the other set options. For example you could command it to a specific position. If you wanted to get more complicated you could use motion magic to do this. There are numerous possibilities really too many to give advice on till we have a better idea of what you want to do. One thing I will warn about is don’t forget the CTRE mag encoder has 4096 CPR.

If you go to the RemoteClosedLoop example it has just about everything you could ask for (albeit a little confusing). The case structure with “EXAMPLES” above it in Periodic Tasks has all of the common Control Modes.

I want the magnetic encoder to detect when the motor turns a certain number of rotations, and then I want the motor to lock. Is what I’m describing possible with our setup?

Also, I’m not sure that my setup is correct. I just copied what I saw from the Talon SRX Labview Examples.

Do you think you could post a screenshot of your setup or at least tell us which of the examples you copied it from (there are a lot of them)?

Sounds like you just want to do a simple position movement. I am not sure what you mean by lock. Do you mean just stay at that point? Is this a system likely to backdrive?

Is looks like you can probably use the Position Closed Loop example right out of the box with a single modification to the begin to add the Config Remote Sensor I mentioned before. I would then manually move the object to make sure you see a change in the encoder display on Teleop.vi then you can use button to do an up to 10 rotation movement (obviously change the numbers here if that doesn’t work with your system)