07-14-2015 05:59 PM
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
07-14-2015 06:21 PM
Hello
you can get it by right cliking on the "error in" pin and select creat control from the menu.
kamdy
07-14-2015 06:24 PM
07-14-2015 07:39 PM - edited 07-14-2015 07:40 PM
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!
07-14-2015 07:45 PM
just right click the 'error in' and select "create > Local Variable".
07-14-2015 10:11 PM
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
07-14-2015 11:11 PM
@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.
07-14-2015 11:18 PM
@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.
07-15-2015 07:20 AM
Good Point, Billko. Thanks for justifying my "gut feeling" ...
BS