From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How about an Error Case structure with warning?

Hi,
 
while wiring some vis and thinking about error handling....
In most cases the simple case structure feet by the error cluster will do the job. However in some cases when you deal with warnings, wouldn't it be nice to have an additional (optional) warning case that is true for a not empty source string and/or an error number?
 
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 1 of 5
(2,400 Views)

An interesting thought, but it might be a little tedious if the additional warning case was always there by default - you'd probably want it as an "right click menu option".

Of course - it's probably just as easy to add a sub case to the "No Error" case to handle warnings.

Greetings from the U.K.

Mark H.

0 Kudos
Message 2 of 5
(2,399 Views)
You could place a subvi before the case-structure, where you decide if there is an error, a warning or no error. According to this decision you can return an enumeration value, which is wired to the case-structure.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 3 of 5
(2,396 Views)
I forget to mention: Of course there is a solution possible by unbundling the cluster and check the error number and string followed by a case. I still remember the time when the case selector couldn't handle the error cluster ... (started with LV3.1 Smiley Wink )
I just thought it would be a nice thing when you wire the error cluster to the selector and get the red and green case and you can right click, add a case and get a yellow(?) case named 'warning' Smiley Happy
 
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 4 of 5
(2,387 Views)

Yes, this was not bad indeed. But therefore the boolean control in the error cluster should be replaced with a tristate control.

I can't exactly remember where, but there is a link, where you can post improvement suggestions.

Maybe this could be a new feature in LV9.0 Smiley Wink

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 5 of 5
(2,383 Views)