LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Merge Error Single Input

Hi everyone,

I was looking at the Queued Message Handler Template and realized that in several Message Loop cases there is a Merge Errors function with only 1 input.

Does anybody know if this provides any functionality?

 

Merge error.png

 

 

My best guess so far is that it is there because the "--Copy This Frame--" case has it. So you don´t have to add it when you are using queues, user events and/or notifiers. 

Is my assumption correct? or does anybody know about any Merge Errors extra functionality?

 

 

Kudos are welcome 😉 marked solutions are awesome!
0 Kudos
Message 1 of 4
(3,645 Views)

I'm pretty sure this was placed in the template because other Code may need to be added and NI is hoping that users will make use of a (possibly-separate) Error Line in the VIs and Functions that they use.  Since Errors are something that need to be handled in the QMH, NI put "Merge Errors" in here so there is "no excuse" for allowing an error in user-added code to be over-looked.  I suspect that if "not expanded", the Merge Error function doesn't impact your code, so it is safe(r) to leave it alone.

 

Bob Schor

Message 2 of 4
(3,630 Views)

Yeah I think it is just easier to have it there than not, and we probably cannot even measure the minuscule amount of processing time it adds (if any). Similarly, the JKI State Machine has the "add states to queue" in every single frame, even if no states are being added to the queue, just out of convenience for the programmer.

0 Kudos
Message 3 of 4
(3,601 Views)

@Gregory wrote:

Yeah I think it is just easier to have it there than not, and we probably cannot even measure the minuscule amount of processing time it adds (if any).


I am actually willing to bet the compiler will optimize out the Merge Error when there is just the one input.  So the only negative thing it does is maybe confuse some people trying to read the diagram.  But it definitely makes it easier to merge state errors with communication errors when needed.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(3,581 Views)