06-10-2016 01:51 PM
Just wondering if there is a built in VI to clear the warnings in the error cluster, essentially setting the error code to 0 if error status is false. It is a trivial matter to write on such VI oneself, but I am just wondering if there is any built in VI to do this.
I find this function useful when propagating error cluster through out a loop. If a warning is generated by a vi inside the loop, it will get propagated into next iterations, which makes all the error out terminals inside the loop to have this warning . This makes it hard to tell where does that error comes from.
Solved! Go to Solution.
06-10-2016 01:56 PM
Do you have an example of the code that you are mentioning?
06-10-2016 02:23 PM
@AuZn wrote:Just wondering if there is a built in VI to clear the warnings in the error cluster, essentially setting the error code to 0 if error status is false. It is a trivial matter to write on such VI oneself, but I am just wondering if there is any built in VI to do this.
Clear Error will do what you are asking for.
06-10-2016 02:27 PM
06-10-2016 02:34 PM - edited 06-10-2016 02:35 PM
@crossrulz wrote:
@AuZn wrote:Just wondering if there is a built in VI to clear the warnings in the error cluster, essentially setting the error code to 0 if error status is false. It is a trivial matter to write on such VI oneself, but I am just wondering if there is any built in VI to do this.
Clear Error will do what you are asking for.
But that would clear all errors, not just warnings. If you wrapped that in the non-error case of a case structure, then you'd be okay.
06-10-2016 05:47 PM
@RavensFan wrote:
@crossrulz wrote:
@AuZn wrote:Just wondering if there is a built in VI to clear the warnings in the error cluster, essentially setting the error code to 0 if error status is false. It is a trivial matter to write on such VI oneself, but I am just wondering if there is any built in VI to do this.
Clear Error will do what you are asking for.
But that would clear all errors, not just warnings. If you wrapped that in the non-error case of a case structure, then you'd be okay.
Or if you knew the specific warning number, wire that into the Clear Error and it would only clear that single warning.
06-10-2016 07:00 PM - edited 06-10-2016 07:09 PM
Another thing you could do when debugging is wire the error cluster into the conditional terminal of your loop. I don't know what you're doing and if this would be detrimental to your architechture, but I use this when designing so I can get detailed information for debugging purposes (iteration, source, etc). You could also simply use a tunnel with a conditional terminal, like so:
And essentialy wire your own logic to the terminal. This lets you have whatever behavior you want. Note that I did not use a shift register because in this application, the error state of previous iterations shouldn't be propogated. You could, for example, use the conditional terminal on an indexing output to build up an array of ALL warnings, or ALL errors, or ALL errors with a specific code, etc. The reason is up to you as the developer. All the tools are there to get whatever behavior you desire.
I've attached the VI so you can check out the error case.
06-10-2016 08:07 PM
03-22-2023 02:37 PM
03-22-2023 04:30 PM
@paulmw wrote:
Wrapped in a VI (with a small icon)