We’re having trouble getting motors to work with Motion Magic under Command and Control. When we use the CTRE LabVIEW examples which use the basic LabVIEW framework, the Talon and motor behave as expected. When we use the same code within our robot Command and Control project, nothing happens. The proper code seems to be executing, but no movement. Also, the check for limit switches after the output set, gives only a false output regardless of the state of the attached limit switch.
Has anyone out there hit this problem and solved it?
I need to get an image of our code (writing this on an iPad).
OK, I’ve attached the self-test and a diagram of our subsystem code to this post. We did some further checking, and found that in our “Out” command where we check the position to see if we hit the end, the returned position is always 0. We cranked the output shaft, and it still shows 0 as the position.
We see that we are calling and executing both the “In” and “Out” commands.
I should mention, I get the Error 91 Variant message with this code, but that doesn’t happen with the examples.
– edit –
Also, we are using this Talon with the Talon Tach as the reverse limit. It reports to us as “Closed” when it isn’t triggered, so we set it to “Normally Closed” in the code. For this test, we were at the reverse limit. The self-test correctly says “Open”, which shows the reverse limit is triggered. In LabVIEW, the get VI tells me that the reverse limit is not triggered.
You’re losing your device reference inside your project, I can see right here that you set the cluster to the default if it’s not wired, where default is an invalid controller.
That makes a lot of sense. We were grabbing data from a non-existent Talon. I think that connection was eliminated with an inadvertent bulk delete of “stuff”.