LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
andrej

VI does not execute if there is an incoming error

Status: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.

If one wants to prevent execution of a VI when there is an incoming error, it has to put case structure on the block diagram.

It would be easier to have a property that prevents execution of the VI if there is an incoming error. This property could be set in VI properties or in shortcut menu.

 

 

Error.png

7 Comments
vitoi
Active Participant

I like the idea. Less diagram clutter and could probably be done more efficiently natively. Would be nice if the icon had a indicator in one of the corners showing this behaviour.

 

In any case, the whole issue of error handling could do with a revamp and some official NI documentation on error handling (for large applications) that is correct and efficient.

SnowMule
Active Participant

Case structure with the selector wired to the error cluster in the VI?

 

Then you can handle what the VI does when an error comes in the error case, or do the code in the no-error case.

fabric
Active Participant
An implicit "bypass execution" could be useful but you would still need error terminals on the VI's connector pane. What would you do with the terminals on the block diagram? Could be confusing if someone tries to execute some code on the error case...
Mark_Yedinak
Trusted Enthusiast

While this might sound like an appealing option I would vote against it. When I look at code I should be able to immediately and easily see what the logic flow is. I don't want to have to check a VI's properties to see how the code will execute. A single case structure with the error wired in is not difficult to code nor is it take much block diagram space. On the flip side it is immediately obvious that this code is explicitly doing error checking.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
elset191
Active Participant

@Mark Yedinak wrote:
When I look at code I should be able to immediately and easily see what the logic flow is.

Something along the lines of  Visual indication that VI will run even on error (but NOT run) would help with that concern.  I do agree though, that for as little space and effort as it saves, it's probably not worth implementing.

--
Tim Elsey
Certified LabVIEW Architect
AristosQueue (NI)
NI Employee (retired)

I dislike this on the general grounds that it is setting an editor option in the wrong place. In the idea, you would pop up on a node in the caller diagram. If the goal is for this subVI to be skipped every time it is called from anywhere, then such editor notation belongs on the subVI's diagram. If the goal is to only skip this one single call to that subVI on this particular caller diagram, this works for the first subVI, but as soon as you have more than one subVI, you're right back to the case structure, and it's better to have a single notation rather than two notations.

 

I agree that the error handling could use serious revamp.

 

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.