Motion Magic in Command and Control

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).


Capture the self-test while the device is misbehaving and post it.

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.

Like I mentioned above, this Talon/motor works fine in the CTRE examples.
Drawer_subsystem.pdf (480.4 KB)
drawer_test.txt (1.1 KB)

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.

Inside your other cases, make sure you at least pass the cluster through the case. Otherwise your device reference is invalid.

This is also documented in the ReadTheDocs, here:

I feel so stupid!

Thank you!

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”.

Works great now.

– Len

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.