FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Reentrant VIs Don't Clone on Double-Click?

We recently converted our project to the Advanced Framework and had to rewire our Drive VI to eliminate the loop and shift register but to retain a few Feedback VIs to preserve previous values.  Because we implemented a "Side Drive" VI and instantiated it twice (once for left and once for right), we ran into an issue with the embedded Feedback arrows.  They were cross-polinating their values between the left and right invocations of the VI.

After creating a simple 2 VI project (a main which instantiated 2 instances of a subVI containing a single Feedback arrow wired from input to output), we confirmed the issue.  After much research, we learned about a Reentrant VI that causes each instance to have its OWN copy of any local data.  Problem solved, at least the crossed values problem was solved.

In our test VI project, double clicking on the Reentrant VI instance opens a probable clone allowing debugging.

However, when we changed our Side Drive VI in our main FRC advanced project, double-clicking the instances still opens the VI, but not a clone and the Probe option on the popup menu is grayed out even when the robot is running.

What are we missing?  We really need the ability to probe our traction control system, but we need the reentrancy to keep local copies of the previous values of various parameters.

Lynn (D) - Team Voltage 386 Software Mentor

0 Kudos
Message 1 of 3
(6,037 Views)

Unfortunately, reentrant VIs are not debuggable on real time targets such as the cRIO-FRC you are using.

So you are running your test VI under My computer in your project, and you were able to debug it. but if you move that same VI under the cRIO you will not be able to debug it.

Stephen B
0 Kudos
Message 2 of 3
(2,680 Views)

Thanks for the answer and the support!  We watched the State Machine video last night and learned a few more things about typedefs, state machines, and retaining state by way of the Robot References, so we're actually migrating all of our (what amounts to state information) drive remembered data out of that particular VI and into the global data with instances for each of the robot sides (left and right).  In the end, we'll be eliminating the Feedback Node and eliminating the need for seperate local data copies for each instance of the VI which will then allow us to remove the Reentrant feature and restore debugging.

Great and helpful videos, BTW, too bad the State Machines one wasn't out (or we had noticed it) before last Saturday when we implemented our Autonomous code!  However, it wasn't TOO late as we're retro-fitting it to match that nice, clean, implementation structure.

Now, if there were only more hours in the days between now and 2/17...

Lynn (D) - Team Voltage 386 Software Mentor

0 Kudos
Message 3 of 3
(2,680 Views)