02-27-2009 11:42 AM - edited 02-27-2009 11:43 AM
Phillip Brooks wrote:
I'm not positive, but I think VI Analyzer can detect the cases with nothing but wires running through it as 'unused code'. If you've got 40+ of these, then you would have to set the threshold to more than 5 to find them all at once. It doesn't fix the problem, but can help you find the mistake if you didn't already notice it. As for being a compulsive saver, just let "Automatic Saving for Recovery" save when you run the VI instead.
...
I'm upgrading from 7.0 to 8.6 and modified our state machine templates to use auto-linked wires. I haven't released these to the group yet, and now I'm wondering if I should take them out!
The VI Analyzer test you're thinking of doesn't *quite* do this. One of the things the Unused Code test looks for is wires that go through Sequences and Loops (but not Case structures) and sees if they're being used for anything. If the wire just goes straight through the sequence or loop, we return it as a failure. We do not currently check wires that just go straight through a Case structure, as that is pretty common for cases that don't manipulate the wire data (when there are probably other cases that do). I suppose we could try to make the test smarter and have it detect wires that aren't used in any case, but that's not currently on the roadmap. Also, I've seen state machine templates that pre-wire several variant wires through the case structure that aren't currently used for anything, but are there for "future use"...those would be returned as false failures by the proposed analyzer test.
I recommend sticking with the Linked Input Tunnels...the case described earlier in this thread of accidentally creating a case for every value, then not being able to delete the empties, although painful, seems pretty uncommon. I feel that going forward, Linked Tunnels should be the standard practice when dealing with state machines.
03-26-2009 03:03 AM - edited 03-26-2009 03:06 AM
old thread, however I miss the third case in Error handling , that shines up when you add a case on an error case and will be selected when there is no error but the description field is not an empty string.
03-26-2009 06:09 AM
Henrik Volkers wrote:old thread, however I miss the third case in Error handling , that shines up when you add a case on an error case and will be selected when there is no error but the description field is not an empty string.
Message Edited by Henrik Volkers on 03-26-2009 09:06 AM
Nope never saw thatone before.
THanks Henrik! You are a LV Scholar!
Ben
03-26-2009 06:56 AM
Ben wrote:
never saw that one before.
That's because it doesn't exist. I assume it was meant as a feature request.
03-26-2009 07:09 AM
03-26-2009 07:28 AM
OK it looks I got suckered in by that one. Durring my drive to work I was already starting to think about how I would incorporate that new feature into my code.
Ben