trouble with reentrant VIs on cRIO

we have our code designed this year so that our code for keeping a shooter motor at speed is a subvi called from Periodic Tasks. It’s being passed in a reference to the motor’s speed Counter, a constant telling how many Counter ticks there are per revolution, and the target RPM. The outputs are motor power and the actual current RPM. We plan to use this in multiple places (multiple shooter motors), hence the use of a sub VI.

I’ve noticed when we mark this subVI reentrant, we cannot probe it (even with the “allow debugging” checkbox checked), and LV tends to act like the VI is running when it’s not (it doesn’t allow editing, for example, unless we close the VI and the calling VI’s windows and reopen them). Problems go away if we don’t mark it reentrant, but that destroys our reusability of the subVI (it has feedback nodes in it, which I believe break when shared among callers).

I recall check the whole reentrancy thing over the holidays (you could probe reentrant VIs, you just got a separate pane for each instance, I recall), but the target then was the PC. Are there bugs or restrictions in doing reentrant VIs on the cRIO?

I found a post on the NI support forums that indicates it is or was not supported for RT. What I usually do is make it non reentrant and make myself feed in lots of good test vectors so that the obvious bugs are out of it before making it reentrant. And sometimes I add extra outputs so that I can probe the caller’s location.

Greg McKaskle

There is no good way to do this, except to remove all instances except 1 of them, make it non-reentrant, debug it completely, then make it reentrant again and replace all the ones you removed.