LabVIEW Idea Exchange

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

Add error wire on all VIs even if they do not deal with it (for dataflow control)

Status: New

When you need to wait during the execution of a program, there is no elegant way to insert the wait vi in the dataflow. The only option is to add a one frame sequence structure.

Before

With an error wire passing thru, the control of the dataflow is easier:

NI_IdeasAfter.jpg

the dimmed error wire on the icon specify that the error is not being dealt with.

 

4 Comments
dthor
Active Participant

OpenG code has this for many oft-used functions that rely on dataflow, such as the Wait (ms) funstion that you have in your example.

 

However, I would agree that most functions that have the room for it on their connector pane should have Error In/Out connectors. I definitely would not not error in/out on something like an "Add" node though...

tst
Knight of NI Knight of NI
Knight of NI

Sounds similar to this - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/quot-Sequence-Containers-quot-to-force-execution-flow-...


___________________
Try to take over the world!
David S.
NI Employee (retired)

I have to disagree with this one. The error wire has a function, and that is not to enforce dataflow. It became customary to use it for dataflow enforcement long before I started using LV, but doing so often eschews good error handling practices. The best bet here is to use structures and encapsulating VIs to handle dataflow, and to merge/handle/ignore your error outputs as appropriate for the application or tool you're writing.

 

The version tst linked above is interesting, but I'm torn about it...

David Staab, CLA
Staff Systems Engineer
National Instruments
akeister
Member

Besides, for VI's for which this would be the most useful, i.e., the VI's you use the most, you can just create your own wrapper around it, and create whatever error handling you want. 

Adrian C. Keister, Ph.D.

Certified LabVIEW Architect
Certified Professional Instructor

B.S. in Applied Physics/Computer Hardware and Software Systems, Mathematics, 2001, Grove City College.
M.S. in Mathematical Physics, 2004, Virginia Polytechnic Institute and State University.
Ph.D. in Mathematical Physics, 2007, Virginia Polytechnic Institute and State University.