BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Wire = variable..... or wire != variable...


@Ray.R wrote:

You're not Sheldon, are you??



I surely hope i'm more socially competent ...

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 11 of 31
(11,527 Views)

@Yamaeda wrote:

@altenbach wrote:

But does the mere act of reading the value of the wire potentially change it's value? 😄



Actually it does, since i found a bug in 2010 beta whereas a calculation would fail unless i had it wired to an indicator ...

/Y


LV will skip code that is not used down stream since as far back as 5.0 to my knowlege.

 

THe has never been a one to one relationship between wires and storage allocation. That is what made Wack-a-mole so much fun. We express out idea in the diagrms and LV inteprets what we say but rarely do we direct variables. LV decides.

 

Q SRs in AEs?

 

Variables?

 

Ben 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 31
(11,514 Views)

@Ben wrote:

LV will skip code that is not used down stream since as far back as 5.0 to my knowlege.

 


That clearly states it.  There is no such thing as a variable in LabVIEW..

 

🙂

0 Kudos
Message 13 of 31
(11,498 Views)

Just throwing in some points that pop out of my brain:

 

1. We must take into account the knownledge and aims of our discussion partners. If they come from a background of text-based programming languages, they ask for 'the variable' and we are right to tell them it's 'the wire'. As normal LV-users they don't really care about memory-allocation and other compiler issues. I don't think they would benefit if we would use a more scientific precise explanation such as 'the wire is the construct to be used equivalent to a variable'. Better KISS (Keep it short & simple).

 

2. If they are clever (in terms of math/CS), they will ask how to make a loop invariant. So we present them the shift-register. Well, that's closer to what I would think about as 'variable', 'cause the value changes (in the LV-world).

 

3. I just checked wikipedia on variable:

In computer programming, a variable is a symbolic name given to some known or unknown quantity or information, for the purpose of allowing the name to be used independently of the information it represents

My interpretation: So a very important point on variables is to make it human-readable like 'i' or 'pressure' and not #00123ABC. A wire doese make that identification.

 

Felix

Message 14 of 31
(11,434 Views)

I think

 

Controls is a data container[Controls are similar to the data containerbut the controls is not variable.


Wire equal to the assignment (=)


Control data is passed to the indicator, through the line, the equivalent of an assignment


LV have variables, local variables, global variables, shared variables

 

My English is poor, the expression is not clear.

" 一天到晚游泳的鱼"

labview@263.net

我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview
0 Kudos
Message 15 of 31
(11,410 Views)

I think


Controls is a data container[Controls are similar to the data container]but the controls is not variable.


Wire equal to the assignment, Such as "="


Controls data is passed to the indicator, through the wire, the equivalent of an assignment


LV has variables. Such as local variables,global variables, shared variables

 

My English is poor, the expression is not clear.

" 一天到晚游泳的鱼"

labview@263.net

我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview
0 Kudos
Message 16 of 31
(11,314 Views)

@jwdz wrote:

I think


Controls is a data container[Controls are similar to the data container]but the controls is not variable.


Wire equal to the assignment, Such as "="


Controls data is passed to the indicator, through the wire, the equivalent of an assignment


LV has variables. Such as local variables,global variables, shared variables

 

My English is poor, the expression is not clear.


Controls and indicators should not be viewed as equivalent to variables. When they are you end up with code that has tons of controls and indicators whose only purpose is to hold a value. Overuse and incorrect use of local/global variables also lead to race conditions since you are breaking dataflow simply to access data on the block diagram. (Shared variables are a little different and I generally avoid using them. I prefer to define an actual API between processes for passing data between them.)

 

Controls and indicators should be only viewed as user interface elements or inputs and outputs from a subVI.



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
Message 17 of 31
(11,293 Views)

I actually like 'jwdz's view. While it might be completely wrong concerning the LV compiler, from the user perspective it's very clear. You 'assign' one output of a SubVI/function as an input to another one (or more). This idea emphasises that no other process/operation can alter the value of that 'variable'. That's much closer to the 'signal' concept of LV/dataflow than the 'variable'.

But then again, the 'variables' (include controls and probes) are buffered test points from an EE (electrical engineer) point of view.

 

Hope you ('jwdz') can follow my thoughts, despite language barriers. Privately, may I ask you where you come from/are located (mainland zonghua?)?

 

Felix

Message 18 of 31
(11,282 Views)

 


F. Schubert 已写:

I actually like 'jwdz's view. While it might be completely wrong concerning the LV compiler, from the user perspective it's very clear. You 'assign' one output of a SubVI/function as an input to another one (or more). This idea emphasises that no other process/operation can alter the value of that 'variable'. That's much closer to the 'signal' concept of LV/dataflow than the 'variable'.

But then again, the 'variables' (include controls and probes) are buffered test points from an EE (electrical engineer) point of view.

 

Hope you ('jwdz') can follow my thoughts, despite language barriers. Privately, may I ask you where you come from/are located (mainland zonghua?)?

 

Felix


I am come from People's Republic of China (Harbin),mainland 。

" 一天到晚游泳的鱼"

labview@263.net

我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview
0 Kudos
Message 19 of 31
(11,273 Views)

True that I do not understand the LV compiler.

Controls and indicators used to store data, but they are not C language variables.

Controls and indicators is the data container (shell)。

Wires equal to the assignment, Such as "=",Similar to the an equal sign。

Wires are not a variables.

Local variables is from the controls(data) and indicators(data).

Global variables is also from the controls(data) and indicators(data)

" 一天到晚游泳的鱼"

labview@263.net

我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview
0 Kudos
Message 20 of 31
(11,267 Views)