03-20-2020 05:12 PM - edited 03-20-2020 05:18 PM
Why does the event not get signalled when there is an error?
Below image shows an event structure with a value signaling property node having a constant (True) error cluster constant wired to its error input terminal. The value signal event does not work when there is incoming error. Why? Where is the documentation for such behavior???
I know the case is being executed because the Numeric is incremented, however, an event does not get generated.
FYI my real use case is to programmatically handle a stupid intermittent VISA error (dumbed down image below).
My current work around is to just not use error wire into the property node. Seems very anti-labview...
03-20-2020 05:40 PM - edited 03-20-2020 05:41 PM
What is the default behavior of a node if there is an error on the error in terminal?
If you want the node to execute even if an error has occurred, it is certainly acceptable to leave the error in unwired. Just make sure you have some other means of controlling dataflow.
03-20-2020 07:40 PM
Seems very anti-labview...
One of the main ways LabVIEW works is that when an error occurs, everything downstream of the error wire is skipped until it reaches an error handler. I'd go so far as to say it's one of the most core concepts of LabVIEW.
Part of LabVIEW programming is knowing when NOT to just thread an error wire through everything, and this is exactly one of those times. When you're in the "error" part of an "No error/error" case statement, that is exactly the time to not wire it through anything you actually want to run. (With the exception of things that either parse the error or clear it, of course...)
03-21-2020 04:37 AM
You already got good advice, but if you insist of showing images instead of attaching code, at least show the labels of the property nodes! There is absolutely no way for us to tell what control belongs to them. Maybe there is another event case containing 50 boolean controls. 😮
And yes, as you correctly spelled out, self triggering events are pretty stupid in general. Can you explain why you think you need that? I am sure there are much better solutions to whatever you are trying to do. 😉
03-21-2020 04:42 AM
@Kyle97330 wrote:
One of the main ways LabVIEW works is that when an error occurs, everything downstream of the error wire is skipped until it reaches an error handler. I'd go so far as to say it's one of the most core concepts of LabVIEW.
Be careful here. There are quite a few things that execute even if an error occurs, but these exceptions are usually described in the help. One such example is VISA Close, where: "This node runs normally even if an error occurred before this node runs."
03-22-2020 06:48 AM - edited 03-22-2020 06:49 AM
There is a general rule in LabVIEW that is enforced since around LabVIEW 7 rather strictly with all shipping nodes/VIs that any node with an error in does not perform anything inside except any Close nodes/VIs that generally close any kind of LabVIEW refnums (VISA, File, network, ActiveX, .Net, etc). The Actor Framework and other OOP frameworks usually recommend to do the same for their Cleanup method.
Notable exception to above rule is the Delay Express VI which waits anyways and is the main reason I never use that VI, which otherwise would be one of the very few really useful Express VIs!