LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 02/23/2009


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.

Message Edited by Darren on 02-27-2009 11:43 AM
0 Kudos
Message 31 of 36
(1,392 Views)

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.

 

Warning 

Message Edited by Henrik Volkers on 03-26-2009 09:06 AM
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 32 of 36
(1,300 Views)

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.

 

Warning 

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

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 33 of 36
(1,284 Views)

Ben wrote:

 

never saw that one before.


That's because it doesn't exist. I assume it was meant as a feature request.


___________________
Try to take over the world!
0 Kudos
Message 34 of 36
(1,275 Views)

Sorry , missed first of april by one week :smileytongue:

 

and yes, TST it might be a feature request.  

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 35 of 36
(1,270 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 36 of 36
(1,258 Views)