05-23-2012 02:55 PM
I'm trying to develop a custom VI analyzer test, following steps found here: Designing a Custom VI Analyzer Test, which will check a VI's reentrancy status. If it is reentrant - I want to then check for any while loops with uninitialized shift registers (USR's) or feedback nodes on the block diagram and compare that with the reentrancy type (share clones or preallocated). If there are USR's or Feedback nodes and the reentrancy type is share clones I would like to flag this as a failure. It's easy to check for reentrancy and the type using VI server, shown in VI snippet below, but I haven't figured out how to test for USR/Feedback nodes. Maybe there is a GObject property??
If a reentrant VI maintains state data between calls and is set to share clones then there is no gauarantee that the state wil be maintained appropriately between subsequent calls when a top-level VI calls it from multiple locations. Great article by Brian Powell on LabVIEW Field Journal found here: http://labviewjournal.com/2012/02/maintaining-state-1/.
Any help would be greatly appreciated as this is for a customer that wants to use this to test thousands of VI's rather than opening each one and checking... Thanks.
Solved! Go to Solution.
05-23-2012 04:33 PM
Instead of writing your own test, can you use the Reentrant VI Issues test (in the Block Diagram > Warnings category) from the VI Analyzer Toolkit to check for this?
If for whatever reason the shipping test doesn't do what you need, you can check out its source code here:
<LabVIEW>\project\_VI Analyzer\_tests\Block Diagram\Warnings\Reentrant VI Issues.llb\Reentrant VI Issues.vi
None of the VIs for this test are password-protected (in LabVIEW 2011), so you can see the scripting code I used to find uninitialized shift registers and uninitialized feedback nodes. Let me know if you have any other questions.
05-23-2012 04:50 PM
Thanks Darren. I guess I couldn't find that test when perusing through the VI Analyzer selection. Yes, that test gives pretty much all the functionality that my customer will need.
Alas, I must also ask something else. They are using LabVIEW 7.1 and 8.6 right now and will be upgrading to 2011 in soon. Do you happen to know if VI Analyzer contained this test back in those versions?
Thanks,
Tim
05-23-2012 04:53 PM
@tsileo wrote:They are using LabVIEW 7.1 and 8.6 right now and will be upgrading to 2011 in soon. Do you happen to know if VI Analyzer contained this test back in those versions?
Reentrant VI Issues has been available in the VI Analyzer Toolkit since version 1.0. They should be fine, assuming they have VI Analyzer Toolkit 1.0f1 (for LabVIEW 7.1), and VI Analyzer Toolkit 1.1.1 (for LabVIEW 8.6).