First year with CAN in Labview. I successfully used and changed the example code found on the website CTRE website but ran into a problem trying to implement them in our current code. All the .vis require a “CAN Talon SRX Ref” input that is available when I use a normal motor vi block, but not a drive vi block. We’re using a 4 motor tank drive vi block and have 4 Talons running CAN going into it. Drives fine but won’t let me implement more CAN vis to better control it. Should I just control each drive motor separately with a motor vi block? Likely 2 Talons will be followers if that helps. The end goal is to use closed loop velocity to drive each side at the desired speed, instead of voltage based.
All the PID setting and controller mode setting should be in Begin.vi, right? Well, if you set your Drive Open VI to “Existing Motors” you can then feed it motor refnums rather than CAN Device IDs. That should allow you to use the motor refnums to initialize/set up your controllers.