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.
Available in LabVIEW 2019 and later. You can now specify one or more error frames on an Error case structure, and use numeric ranges in those frames for ranges of error code values in the error cluster.
When you connect the error wire to a case structure selector, you get two cases for error and no error. I think you should be able to add in cases for specific error numbers so you can handle specific errors differently. You could do this currently, but you would have to unbundle the error and use the error code.
but i dont see any great use for this. As you yourself have said this can be done by unbundling it. and as such you cant do much in the program for the error. A wiser thing would be to display the error message no matter what error occurs.
Sounds like a good idea. We should not be allowed to remove the plain error case, which would act as default for all errors that don't have a specific case defined.
However, I would suggest to enter the error number as integer, not as a string with quotes. It could even format it more descriptive, so if I enter 7, it would show as [Error 7] and also have a red frame. A case with multiple errors would show as [Error 7, 2000, 12345]
How about allowing a case for warnings (with e.g. an orange frame)?
The idea is great, but how @RandyP noticed, there are some more aspects to consider.
If there are different cases for errors (red) and warnings (yellow),it should be possible to enter a code without distinguish between warning and error. Indeed it should be user selectable. I would suggest an orange frame for this.
Because the concept behind the idea of @Hueter is more powerful than just to apply a single code to a case, combinations of codes which apply only to an error or a warning and codes which apply to both are possible too. That could look like this:
The brown case applies to all possible combinations of more than one category.
Because it isn't intuitive for a beginner, how to express a complex combination which applies to a state, I would recommend an editor like this ...
If now somebody complains, what's about a generic warning state, it could look like [Warning ..-1, 1..] or simply [Warning].
gerh: Generally I like the proposal, but I wonder if you have any thoughts on how to differentiate those frames via something other than color. I already hear complaints about red/green on the error case as it stands from color blind folks. You have some pretty subtle shading in your current picture. Can you propose anything to differentiate the border by pattern that wouldn't disrupt your reading of the diagram?
Also, I would expect people to want a frame that handles both one specific error and no error -- that would crop up when trying to filter one error out but report all other errors. Similarly, one frame for no error and a warning, and for no error and an error and a warning.
What if we didn't do any new color differentiation at all? Green for the no error case (even if it had other errors in the same case) and red for all the others, regardless of the error/warning mix?
Available in LabVIEW 2019 and later. You can now specify one or more error frames on an Error case structure, and use numeric ranges in those frames for ranges of error code values in the error cluster.