I attempted to implement PID control for a CIM motor controlled by the Victor SPX on the roboRIO. However, there is a challenge as the encoder is not a CANcoder and is connected to the roboRIO’s DIO port. I haven’t been able to locate a straightforward solution using CTRE’s built-in Closed Loop functionality.
Nonetheless, I’ve included some screenshots to provide a visual representation of our current setup. Thank you, everyone, for your assistance.
I’m rusty, but I think that you’ll have to run the PID on the RoboRio ~using the WPILIB~. If you want to do the closed loop on controller, you’ll need a Talon SRX and appropriate breakouts to plug the encoder directly in to the controller ~or a CANIfier/CANCoder~.
Have you considered using a language other than LabView?
Per the most recent usage statistics, barely anyone is still using LabView anymore and it’s increasingly hard to find reliable programming help in that language.
CTRE’s closed loop functionality is only for Talon motor controllers, not Victors. Victors do not support this feature.
The LabVIEW port of WPILib isn’t feature complete and doesn’t include a PID controller. LabVIEW has its own included PID controller, though I personally amAndyMark not fond of it for FRCFIRST Robotics Competition use. The unofficial WPILib LabVIEW Math library could be used, or a simple PD controller could be written (they’re not particularly complicated).
I couldn’t find any information indicating that WPILIB supports LabVIEW when I checked. Additionally, there don’t appear to be any available resources for CANIfier or CANCoder at the moment.
This isn’t supported by CTRE’s library in any language.
I’m having trouble understanding this compared to your recommendation of Python in the thread below, given that LabVIEW has >3x the teams using it as Python.
Python is extremely closely-related to other WPILib APIs; it is generally pretty easy to get support for Python from someone who knows Java, or vice-versa. The “small ecosystem” effects are way less crippling.