ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
Hi gents,
I am having trouble figuring out a block in the image below.
Any help would be much appreciated.
This is referencing: https://decibel.ni.com/content/groups/large-labview-application-development/blog/2015/05/14/what-is-...
Is the "input error" in the VISA Write a local variable of "error in (no error)" if so why does it appear that way?
Thanks
I see, I created a control from that that pin and got the same block.
I created a local variable from my "error in" and fed it into the VISA write error.
I don't see why one would want two error inputs. Is there a reason for doing it this way?
Thanks gents!
Many functions, including the VISA function in your example, have Error In and Error Out terminals, all, by default, in the "No Error" condition. What you see in your diagram is a "No Error" cluster, identical to the default Error In terminal, wired to the Error In terminal. It has no real effect on the code -- deleting it would work the same way (as the Error In terminal would simply take on its default value, the same as the removed "No Error" Cluster.
I have sometimes put such an "unnecessary" cluster into a piece of code -- I do it to remind myself that "The Error Line Starts Here", that no Error is present before the following Function starts executing.
Bob Schor
@Dennis_Knutson wrote:
It's not a control, it's a constant.
As Dennis said, it's a constant, not a control. Since it's a cluster, however, it can be shown as an icon (LV 2012+ I believe), and somebody had chosen to do so. Even though it looks a lot like a terminal, a real error control terminal looks like... well, the "error in (no error)" terminal.
@Bob_Schor wrote:
Many functions, including the VISA function in your example, have Error In and Error Out terminals, all, by default, in the "No Error" condition. What you see in your diagram is a "No Error" cluster, identical to the default Error In terminal, wired to the Error In terminal. It has no real effect on the code -- deleting it would work the same way (as the Error In terminal would simply take on its default value, the same as the removed "No Error" Cluster.
I have sometimes put such an "unnecessary" cluster into a piece of code -- I do it to remind myself that "The Error Line Starts Here", that no Error is present before the following Function starts executing.
Bob Schor
I did not put an "no error" cluster at the beginning of the chain and I got a point off on the CLD. I always thought this was unfair until one day I thought about it and realized that if a user-created subVI is the beginning of the chain, someone could've saved a default value that was NOT "no error", and you would be screwed. So now I put one at the beginning of a chain of subVIs if the leadoff is a user-created subVI.